[MMTK] Distance atoms, trajectory, and current configuration

Konrad Hinsen research at khinsen.fastmail.net
Thu Feb 11 07:35:08 UTC 2010

>> atoms along the trajectory. The kind of sequences that I´ve been  
>> using
>> are the following:
>> trajectory = Trajectory(None, 'Trajectory.nc')
>> universe = trajectory.universe
>> for step in trajectory:
>>    d = step['configuration']
>>    universe.setConfiguration(d) # to update the current configuration
>>    universe.distance(atom1, atom2) # two atoms being part of a  
>> covalent
>> bond in the backbone, e.g. Ala4.peptide.N and Lys3.peptide.C

That looks fine.

>> This instruction gave me the same value for every step, about 0.13  
>> nm,
>> which is the expected value for this covalent bond. It seems that no
>> configuration updating was posible and the value correspond to a  
>> unique
>> configuration (the first current configuration probably)

Unless you have a simulation with bond-length constraints.

>> Then I tried some modification of the same:
>> for configuration in trajectory.configuration:
>>    universe.distance(atom1, atom2, configuration)
>> This gave me different values of distance for every step. The  
>> values were
>> about 0.5 nm, quite far from the expected 0.13.
>> other forms such as: (atom1.position()-atom2.position()).length()  
>> were
>> still giving values of about 0.5 nm.

Is that a periodic universe? In that case, perhaps something went  
wrong during conversion, resulting in invalid box sizes.

You can check the box parameters using

	print universe.basisVectors()

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: research at  khinsen dot fastmail dot net

More information about the mmtk mailing list