Hi Osvaldo,
I could have been more clear I guess. First of all, let's say I have
obtained the atom list of a selection:
X = cmd.get_model(selection1).atom
I'm doing stuff with that (PCA, to be exact), but now I want to display the
result only for a subselection. Probably getting the
Hi Tsjerk,
Do you mean something like this?
cmd.index("sel_1 and sel_2")
I do not get the differences between your two cases. Whats the difference
between “atoms which are both in selection 1 and 2” and “matching atoms in
the two selections”
Cheers,
Osvaldo.
On Mon, Oct 26, 2015 at 10:33 AM,
So, you want to know the best way to do this?
Z = [at_x for at_x in X for at_y in Y if at_x.id == at_y.id]
Or am I still not getting it right?
Cheers,
Osvaldo.
On Tue, Oct 27, 2015 at 10:56 AM, Tsjerk Wassenaar
wrote:
Hi Osvaldo,
>
> I could have been more clear I guess.
Hi Osvaldo,
Probably that's the trick, although I'd need the indices, but that's simple
enough.
The 'equivalence' one is still standing though :)
Thanks,
Tsjerk
On Tue, Oct 27, 2015 at 11:44 AM, Osvaldo Martin
wrote:
> So, you want to know the best way to do this?
>
>
Tsjerk–
You might be able to extract the ids of the aligned residues from an
alignment object:
cmd.align(sele1,sele2copy,object="aln")
[a.id for a in cmd.get_model('aln').atom]
Since the alignment is sequential, I think this should contain all the
aligned atoms from sele1 concatenated with the