[MMTK] PartitionedCollection.selectShell

Chris MacRaild c.a.macraild at leeds.ac.uk
Mon Jan 22 10:10:41 UTC 2007


Hi Konrad,

I first noticed this in a system setup to allow simple sidechain rotamer
operations, but I can reproduce it simply by creating a peptide chain
from a pdb file:

from MMTK import *

configuration = PDB.PDBConfiguration('../1UBQ.pdb')
chains = configuration.createPeptideChains()
chain = chains[0]
universe = Universe.InfiniteUniverse()
universe.addObject(chain)

bb = PartitionedCollection(1.0,
       chain.backbone().atomsWithDefinedPositions())
res = chain[15]
rPos = res.position()

print bb.selectShell(rPos, 0.3).atomList(), '\n'

for atom in bb:
    if universe.distance(rPos, atom.pos) <= 0.3:
        print atom, universe.distance(rPos, atom.pos)

bb = Collection(chain.backbone().atomsWithDefinedPositions())
print '\n', bb.selectShell(rPos, 0.3).atomList(), '\n'



This prints:

[]

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

[Atom .Glu16.peptide.C, Atom .Glu16.peptide.C_alpha,
Atom .Glu16.peptide.H, Atom .Glu16.peptide.H_alpha,
Atom .Glu16.peptide.N]


I've now had a quick look at what seems to be the relevant code. In
MMTK/Collections.py the PartitionedCollection.selectShell method treats
the cases where the current partition is completely enclosed in the
shell (ie. dmin >= minsq and dmax <= maxsq), and also one case where the
two regions partially overlap (dmax >= minsq and dmin <= maxsq). The
problem seems to be the case where the centre of the shell is in the
current partition and both dmin and dmax are greater than maxsq. Or have
I missunderstood what is going on here?


Sorry the initial report lacked detail.

Chris



On Mon, 2007-01-22 at 08:46 +0100, Konrad Hinsen wrote:
> On 19.01.2007, at 18:39, Chris MacRaild wrote:
> 
> > Shouldn't these procedures give the same set of atoms?
> 
> At first sight, yes, but there could always be some subtle  
> differences elsewhere in the script. Could you please send/post a  
> complete script that demonstrates this behaviour?
> 
> Konrad.
> --
> ---------------------------------------------------------------------
> Konrad Hinsen
> Centre de Biophysique Moléculaire, CNRS Orléans
> Synchrotron Soleil - Division Expériences
> Saint Aubin - BP 48
> 91192 Gif sur Yvette Cedex, France
> Tel. +33-1 69 35 97 15
> E-Mail: hinsen at cnrs-orleans.fr
> ---------------------------------------------------------------------
> 
> 
> 




More information about the mmtk mailing list