[MMTK] keeping the normal modes array in a file

Konrad Hinsen hinsen at cnrs-orleans.fr
Mon May 4 06:27:18 UTC 2009


On 01.05.2009, at 14:55, Jean Didier Pie Marechal wrote:

> I want to keep the normal modes vectors in a  file so that I can  
> use them in an outside program.
> I have to same requests:
>
> 1. what is the correct syntax to do so? I have for the moment in my  
> script an export loop like this:
> for n in [6, 7, 8]:
>   universe.writeToFile('mode_%d_plus.pdb' % n, conf+scale*modes[n])
>   universe.writeToFile('mode_%d_minus.pdb' % n, conf-scale*modes[n])
>   universe.writeToFile('file' %n, modes[n].array)

If you want PDB files, that's the way to go.

> 2. IN the only discussion in the archives regarding this type of  
> queries,  Konrad mentioned to be careful in using the vectors for  
> outside MMTK purposes. Could you tell me why?

Because if all you have is the arrays, you don't know which entry  
corresponds to which atom. The internal atom order is not deducible  
from the way the universe was constructed. However, if you export  
your displacement vectors to PDB files, you should not have any  
problem with that.

One caveat: PDB export is intended for configurations, not for  
displacement vectors. For an infinite universe (as you are probably  
using for normal modes), this makes no difference. But if you  
calculate normal modes in a periodic universe, the transformations  
applied during PDB export can ruin your displacement vectors. In that  
case, you should better export the displaced configurations, as you  
do in your first two lines.

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