Hi Tsjerk, Spencer, Osvaldo,
cmd.get_raw_alignment() might be what you are looking for.
http://pymolwiki.org/index.php/Get_raw_alignment
Cheers,
Thomas
On 27 Oct 2015, at 12:49, Spencer Bliven wrote:
> Tsjerk–
>
> You might be able to extract the ids of the aligned residues from an
> alig
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 a
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?
>
> Z = [at_x for at_x in X
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. First of all, let's s
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 intersection
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,
Hi Thomas e.a.,
Given two selections, would there be an easy way to
1. find the atoms which are both in selection 1 and 2, and the indices of
those in the selections
and
2. find the matching atoms in the two selections, like align does, and the
indices of those in the selections
Thanks,
Tsjer