[MMTK] PartitionedCollection.selectShell
Chris MacRaild
c.a.macraild at leeds.ac.uk
Fri Jan 19 17:39:43 UTC 2007
I'm probably missing something basic here, but I'm not getting the
results I expect from PartitionedCollection.selectShell
eg. if I do:
>>> bb = PartitionedCollection(1.0,
... chain.backbone().atomsWithDefinedPositions())
>>> res = chain[15]
>>> rPos = res.position()
>>> bb.selectShell(rPos, 0.3).atomList()
[]
whereas:
>>> for atom in bb:
... if universe.distance(rPos, atom.pos) <= 0.3:
... print atom, universe.distance(rPos, atom.pos)
...
Atom .Glu16.peptide.C 0.278183394332
Atom .Glu16.peptide.C_alpha 0.162686972188
Atom .Glu16.peptide.H 0.2878402478
Atom .Glu16.peptide.H_alpha 0.206802524354
Atom .Glu16.peptide.N 0.250664650392
likewise:
>>> bb = Collection(chain.backbone().atomsWithDefinedPositions())
>>> bb.selectShell(rPos, 0.3).atomList()
[Atom .Glu16.peptide.C, Atom .Glu16.peptide.C_alpha,
Atom .Glu16.peptide.H, Atom .Glu16.peptide.H_alpha,
Atom .Glu16.peptide.N]
Shouldn't these procedures give the same set of atoms?
Thanks,
Chris
More information about the mmtk
mailing list