[MMTK] Questions on adding a displacement to the co-ordinates of a Protein

khinsen at cea.fr khinsen at cea.fr
Mon Nov 28 23:12:30 CET 2005


On 28.11.2005, at 22:59, vanitha at cs.wisc.edu wrote:

> 1) When I try to print the configuration of a protein in a  
> universe, I get
> the result <MMTK.ParticleProperties.ParticleScalar instance at  
> 0xb71770ac>
> How can I print the vector of co-ordinates of the Protein? I'm a  
> MATLAB
> person, so I'm comfortable thinking in terms of vectors and  
> matrices. Can
> somebody shed light on how to do this in MMTK?

After

	configuration = universe.configuration()

you can do

	print configuration.array

to get the coordinates printed as a Nx3 array. However, this won't be  
of much use unless you also know which atom corresponds to which  
index. You can get that information by

	for atom in universe.atomList():
		print atom.index, atom

However, by working at the array level you are giving up on all the  
nice functionality of Configuration objects, which are described in  
the MMTK manual. Configuration objects work a bit like "value-added"  
arrays: you can add and substract them like arrays, but you can index  
them with atom objects (no need to look up indices), calculate norms,  
add normal mode displacements, etc.

> # Get the co-ordinates of the protein
> configuration = universe.configuration()
>
> # This line does not do what I'm expecting it to!
> print configuration.length()

What you are doing there is calculate the length of the position  
vector for each atom!

> 2) Can I use the universe.addToConfiguration(some particle vector)  
> method
> to add a displacement to the current configuration?

Yes. Note that the displacements must be given as a ParticleVector  
object - an array will not work.

> 3) Can I add two proteins to a universe? This is probably a dumb

Yes, certainly. Any number you want.

> question... but is this equivalent to doing a co-oridinate  
> transformation
> of one of the proteins to bring it into the same reference frame as  
> the
> other protein?

No. You just have two proteins. All operations in MMTK are explicit -  
if you want to superpose two proteins, you have to do so explicitly.

> 4) Another related question... Can I add a ligand and receptor to  
> the same
> universe and compute the energy and gradients for the resulting  
> pair? If
> so, how can I update the displacements of the individual proteins?

Energies are by default calculated for the whole universe, so the  
answer to the first question is yes. You can update the positions of  
the individual proteins by using displacement vectors that have non- 
zero entries only for one protein. You can also use the various  
geometric operations defined for all MMTK objects (thus including  
proteins), such as translateBy() or rotateAroundCenter().

Konrad.
--
------------------------------------------------------------------------ 
-------
Konrad Hinsen
Laboratoire Leon Brillouin (CEA-CNRS), CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
------------------------------------------------------------------------ 
-------





More information about the mmtk mailing list