[MMTK] setting the value of chi

Geoff Rollins geoffrey.rollins at ucsf.edu
Sun Mar 6 20:45:43 UTC 2011


In the following code snippet, I repeatedly change the value of chi to  
one of three possible values for a chosen residue. I was surprised to  
see that changing chi seems to jitter the backbone. I expected that  
changing chi would alter the sidechain, leaving the backbone fixed.  
I'm wondering if there's something wrong, either in my code or in the  
way that I'm thinking about this. I'm using MMTK 2.7.3.

Thanks,
Geoff


import numpy
from MMTK import Features, Units, InfiniteUniverse
from MMTK.Proteins import Protein
from MMTK.ForceFields import Amber99ForceField
from MMTK.Trajectory import Trajectory, TrajectoryOutput,  
SnapshotGenerator

universe =  
InfiniteUniverse(Amber99ForceField(mod_files=['frcmod.ff99SB']))
universe.protein = Protein('1L2Y.pdb') # trp-cage structure from PDB

traj = Trajectory(universe, "test.nc", "w", "A simple test case")
traj_output = TrajectoryOutput(traj, ("energy", "configuration"), 0,  
None, 1)
snapshot = SnapshotGenerator(universe, actions=[traj_output])

trp_rotamers = numpy.array([52.8, 49.3, -178.2])
trp_rotamers *= numpy.pi / 180. # convert to rad

residues = universe.protein.residues()
selected_residue = residues[5]
print selected_residue.name # should be Trp6
chi = selected_residue.chiAngle()

for i in range(100):
     rotamer_index = numpy.random.randint(0, trp_rotamers.shape[0])
     chi.setValue(trp_rotamers[rotamer_index])
     snapshot()

traj.close()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/mmtk/attachments/20110306/cd4473c4/attachment.htm>


More information about the mmtk mailing list