[MMTK] Copy/Replace Operations
Konrad Hinsen
research at khinsen.fastmail.net
Mon Oct 12 09:42:18 UTC 2009
On 08.10.2009, at 22:36, tezcan at ecs.umass.edu wrote:
> I am trying to modify/transform a sidechain of a residue, save it
> and replace sidechains with modified versions as necessary.
> Following might give you a better idea of what I am trying to do:
> (suppose I have a function called modify()):
In your example, modify() is not a function but a method on residue
objects. There is no such method in MMTK, so I wonder where it comes
from.
> What is the proper way of doing this type of copy/replace operations
> in MMTK?
The proper way is the use of indexed assignment:
universe.protein[0][1] = new_second_residue
Some caveats:
1) The new residue should be newly created, not taken from an existing
peptide chain.
2) Residues, like all groups and molecules in MMTK, cannot be
modified. They are created from a database description or from a
molecule factory and are immutable after creation. This is done to
permit reasonably efficient operations on them. Only chain molecules
can be modified, by substituting residues as shown above.
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: research at khinsen dot fastmail dot net
---------------------------------------------------------------------
More information about the mmtk
mailing list