[MMTK] Conjugate gradient minimization in 2.2b6

Berit Hinnemann Berit.Hinnemann@fysik.dtu.dk
Fri, 17 Aug 2001 10:46:25 +0200


This is a multi-part message in MIME format.
--------------580F8D489AE1CA62141D73E2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi all,

I am trying to do conjugate gradient minimization with fixed atoms, now
with the beta version of MMTK, 2.2b6, and I encounter the same problems
as I described in an earlier email.

I am using the script "chain_allCH3.py" and the input file "gly.pdb"
attached to the email. This is a simulation of two small glycine chains
terminated with "ace_beginning_nt" and "nmethyl_ct". I keep the four
C-atoms of the end methyl groups (CH3) fixed. Comparing the output file
"gly_allCH3_end.pdb" of the end configuration with the input file one
can see that only the first atom "unverse.proteins[0][0].CH3" has been
kept fixed. The positions of the other CH3 atoms have changed.

I have tried to keep different atoms fixed. The only atom which is kept
fixed is "unverse.proteins[0][0].CH3", all other atoms or combinations
of them change their positions even though their attribute "fixed" is
set to one. Another observation is that when I try to keep different
sets of atoms fixed, I get a different end configuration each time, just
that the atoms with atribute "fixed" set to one also change their
positions.

Has anybody encountered the same problems in the beta version?

Thanks,
Berit

-- 
Berit Hinnemann
Center for Atomic-Scale Materials Physics (CAMP)
Dept. of Physics, Technical University of Denmark
Building 307, DK-2800 Lyngby, Denmark 
Phone: +45 4525 3209, Fax: +45 4593 2399
--------------580F8D489AE1CA62141D73E2
Content-Type: text/plain; charset=us-ascii;
 name="chain_allCH3.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="chain_allCH3.py"

from MMTK import *
from MMTK.Proteins import PeptideChain, Protein
from MMTK.ForceFields import Amber94ForceField
from MMTK.Minimization import ConjugateGradientMinimizer
from MMTK.Visualization import view
from MMTK.PDB import PDBConfiguration, PDBOutputFile 
from MMTK.Trajectory import Trajectory, TrajectoryOutput, LogOutput, StandardLogOutput
from MMTK.DCD import writeDCDPDB

universe = InfiniteUniverse(Amber94ForceField())


conf = PDBConfiguration('gly.pdb')

#Change that for other output file names
fil = 'gly_allCH3'

chains = map(PeptideChain, conf.peptide_chains) 
universe.proteins = Protein(chains)
outfile = PDBOutputFile('gly_control.pdb')
outfile.write(universe.proteins)
outfile.close()
trajectory = Trajectory(universe, fil+".nc", "w", "CG on chain")

#Fix the end-carbon atoms
upr = universe.proteins

upr[0][0].CH3.fixed = 1
upr[0][-1].CH3.fixed = 1
upr[1][0].CH3.fixed = 1
upr[1][-1].CH3.fixed = 1


# Minimize
minimizer = ConjugateGradientMinimizer(universe,
                                       actions=[TrajectoryOutput(trajectory, ("energy",
                                                    "configuration"),0, None, 20),
                                      StandardLogOutput(10),
                                                LogOutput(fil+'.log', first=0, last=None, skip=10)])
minimizer(convergence = 1.e-3, steps = 10000)

writeDCDPDB(trajectory.configuration, fil+'.dcd', fil+'.pdb')
outfile2 = PDBOutputFile(fil+'_end.pdb')
outfile2.write(universe.proteins)
trajectory.close()

view(universe)

--------------580F8D489AE1CA62141D73E2
Content-Type: text/plain; charset=us-ascii;
 name="gly.pdb"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gly.pdb"

ATOM      1  CH3 ACE A   1      14.295   4.506   3.955  0.00  0.00           C
ATOM      2 HH31 ACE A   1      14.051   3.600   4.551  0.00  0.00           H
ATOM      3 HH32 ACE A   1      14.887   4.213   3.063  0.00  0.00           H
ATOM      4 HH33 ACE A   1      14.887   5.209   4.578  0.00  0.00           H
ATOM      5  C   ACE A   1      13.033   5.169   3.520  0.00  0.00           C
ATOM      6  O   ACE A   1      13.059   6.196   2.844  0.00  0.00           O
ATOM      7  N   GLY A   2      11.836   4.445   3.325  0.00  0.00           N
ATOM      8  O   GLY A   2       9.588   3.012   3.087  0.00  0.00           O
ATOM      9  HA  GLY A   2      10.585   6.065   2.883  0.00  0.00           H
ATOM     10  CA  GLY A   2      10.604   5.169   3.520  0.00  0.00           C
ATOM     11  H   GLY A   2      11.747   3.430   3.239  0.00  0.00           H
ATOM     12  C   GLY A   2       9.429   4.244   3.210  0.00  0.00           C
ATOM     13 3HA  GLY A   2      10.507   5.525   4.561  0.00  0.00           H
ATOM     14  N   GLY A   3       8.233   4.851   3.109  0.00  0.00           N
ATOM     15  O   GLY A   3       5.996   6.286   3.348  0.00  0.00           O
ATOM     16  HA  GLY A   3       6.973   3.231   3.560  0.00  0.00           H
ATOM     17  CA  GLY A   3       7.001   4.123   2.922  0.00  0.00           C
ATOM     18  H   GLY A   3       8.119   5.860   3.225  0.00  0.00           H
ATOM     19  C   GLY A   3       5.834   5.057   3.226  0.00  0.00           C
ATOM     20 3HA  GLY A   3       6.906   3.759   1.884  0.00  0.00           H
ATOM     21  N   NME A   4       4.682   4.364   3.226  0.00  0.00           N
ATOM     22  H   NME A   4       4.646   3.368   3.226  0.00  0.00           H
ATOM     23  CH3 NME A   4       3.430   5.057   3.226  0.00  0.00           C
ATOM     24 HH31 NME A   4       3.360   5.695   2.319  0.00  0.00           H
ATOM     25 HH32 NME A   4       2.598   4.321   3.226  0.00  0.00           H
ATOM     26 HH33 NME A   4       3.360   5.695   4.133  0.00  0.00           H
TER      27      NME A   4
ATOM     28  CH3 ACE B   1      14.290  -0.826   3.956  0.00  0.00           C
ATOM     29 HH31 ACE B   1      14.046  -1.732   4.552  0.00  0.00           H
ATOM     30 HH32 ACE B   1      14.882  -1.119   3.064  0.00  0.00           H
ATOM     31 HH33 ACE B   1      14.882  -0.123   4.579  0.00  0.00           H
ATOM     32  C   ACE B   1      13.028  -0.163   3.521  0.00  0.00           C
ATOM     33  O   ACE B   1      13.054   0.864   2.845  0.00  0.00           O
ATOM     34  N   GLY B   2      11.830  -0.893   3.342  0.00  0.00           N
ATOM     35  O   GLY B   2       9.597  -2.329   3.113  0.00  0.00           O
ATOM     36  HA  GLY B   2      10.570   0.720   2.871  0.00  0.00           H
ATOM     37  CA  GLY B   2      10.599  -0.163   3.521  0.00  0.00           C
ATOM     38  H   GLY B   2      11.716  -1.903   3.234  0.00  0.00           H
ATOM     39  C   GLY B   2       9.433  -1.101   3.231  0.00  0.00           C
ATOM     40 3HA  GLY B   2      10.506   0.215   4.554  0.00  0.00           H
ATOM     41  N   GLY B   3       8.233  -0.491   3.140  0.00  0.00           N
ATOM     42  O   GLY B   3       5.984   0.946   3.352  0.00  0.00           O
ATOM     43  HA  GLY B   3       6.977  -2.102   3.601  0.00  0.00           H
ATOM     44  CA  GLY B   3       7.002  -1.216   2.949  0.00  0.00           C
ATOM     45  H   GLY B   3       8.145   0.525   3.217  0.00  0.00           H
ATOM     46  C   GLY B   3       5.827  -0.287   3.241  0.00  0.00           C
ATOM     47 3HA  GLY B   3       6.910  -1.589   1.913  0.00  0.00           H
ATOM     48  N   NME B   4       4.675  -0.980   3.241  0.00  0.00           N
ATOM     49  H   NME B   4       4.639  -1.976   3.241  0.00  0.00           H
ATOM     50  CH3 NME B   4       3.423  -0.287   3.241  0.00  0.00           C
ATOM     51 HH31 NME B   4       3.353   0.351   2.334  0.00  0.00           H
ATOM     52 HH32 NME B   4       2.591  -1.023   3.241  0.00  0.00           H
ATOM     53 HH33 NME B   4       3.353   0.351   4.148  0.00  0.00           H
TER      54      NME B   4
END

--------------580F8D489AE1CA62141D73E2
Content-Type: text/plain; charset=us-ascii;
 name="gly_allCH3_end.pdb"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gly_allCH3_end.pdb"

ATOM      1  O   ACE A   1      12.740   6.303   3.975  0.00  0.00      chai O
ATOM      2 1HH3 ACE A   1      14.032   3.594   4.487  0.00  0.00      chai H
ATOM      3  CH3 ACE A   1      14.295   4.506   3.955  0.00  0.00      chai C
ATOM      4  C   ACE A   1      13.030   5.205   3.517  0.00  0.00      chai C
ATOM      5 2HH3 ACE A   1      14.897   4.267   3.080  0.00  0.00      chai H
ATOM      6 3HH3 ACE A   1      14.853   5.168   4.615  0.00  0.00      chai H
ATOM      7  N   GLY A   2      12.286   4.571   2.614  0.00  0.00      chai N
ATOM      8  O   GLY A   2       9.974   4.122   4.120  0.00  0.00      chai O
ATOM      9  HA  GLY A   2      10.778   4.594   1.168  0.00  0.00      chai H
ATOM     10  CA  GLY A   2      10.990   5.060   2.131  0.00  0.00      chai C
ATOM     11  H   GLY A   2      12.625   3.665   2.307  0.00  0.00      chai H
ATOM     12  C   GLY A   2       9.819   4.766   3.081  0.00  0.00      chai C
ATOM     13 3HA  GLY A   2      11.047   6.139   1.984  0.00  0.00      chai H
ATOM     14  N   GLY A   3       8.601   5.066   2.626  0.00  0.00      chai N
ATOM     15  O   GLY A   3       6.305   5.054   1.138  0.00  0.00      chai O
ATOM     16  HA  GLY A   3       7.081   5.308   4.049  0.00  0.00      chai H
ATOM     17  CA  GLY A   3       7.353   4.618   3.251  0.00  0.00      chai C
ATOM     18  H   GLY A   3       8.506   5.526   1.731  0.00  0.00      chai H
ATOM     19  C   GLY A   3       6.195   4.544   2.252  0.00  0.00      chai C
ATOM     20 3HA  GLY A   3       7.499   3.629   3.681  0.00  0.00      chai H
ATOM     21  N   NME A   4       5.082   3.926   2.660  0.00  0.00      chai N
ATOM     22 3HH3 NME A   4       3.439   4.755   1.654  0.00  0.00      chai H
ATOM     23 1HH3 NME A   4       4.124   3.304   0.899  0.00  0.00      chai H
ATOM     24  CH3 NME A   4       3.875   3.774   1.852  0.00  0.00      chai C
ATOM     25  H   NME A   4       5.118   3.471   3.568  0.00  0.00      chai H
ATOM     26 2HH3 NME A   4       3.147   3.156   2.380  0.00  0.00      chai H
TER      27      NME A   4
ATOM     28  O   ACE B   1      13.257   1.888   1.932  0.00  0.00      chai O
ATOM     29 1HH3 ACE B   1      14.106  -1.061   2.191  0.00  0.00      chai H
ATOM     30  CH3 ACE B   1      13.686  -0.399   1.437  0.00  0.00      chai C
ATOM     31  C   ACE B   1      12.930   0.720   2.114  0.00  0.00      chai C
ATOM     32 2HH3 ACE B   1      13.010  -0.948   0.783  0.00  0.00      chai H
ATOM     33 3HH3 ACE B   1      14.492   0.030   0.843  0.00  0.00      chai H
ATOM     34  N   GLY B   2      11.905   0.370   2.886  0.00  0.00      chai N
ATOM     35  O   GLY B   2       9.516  -0.434   4.069  0.00  0.00      chai O
ATOM     36  HA  GLY B   2      10.701   2.063   2.855  0.00  0.00      chai H
ATOM     37  CA  GLY B   2      11.066   1.343   3.586  0.00  0.00      chai C
ATOM     38  H   GLY B   2      11.659  -0.605   2.974  0.00  0.00      chai H
ATOM     39  C   GLY B   2       9.851   0.731   4.284  0.00  0.00      chai C
ATOM     40 3HA  GLY B   2      11.666   1.873   4.325  0.00  0.00      chai H
ATOM     41  N   GLY B   3       9.104   1.564   5.011  0.00  0.00      chai N
ATOM     42  O   GLY B   3       5.760   2.065   4.777  0.00  0.00      chai O
ATOM     43  HA  GLY B   3       7.617   1.953   6.435  0.00  0.00      chai H
ATOM     44  CA  GLY B   3       7.827   1.226   5.651  0.00  0.00      chai C
ATOM     45  H   GLY B   3       9.414   2.533   5.032  0.00  0.00      chai H
ATOM     46  C   GLY B   3       6.651   1.224   4.669  0.00  0.00      chai C
ATOM     47 3HA  GLY B   3       7.897   0.239   6.111  0.00  0.00      chai H
ATOM     48  N   NME B   4       6.725   0.386   3.630  0.00  0.00      chai N
ATOM     49 3HH3 NME B   4       5.907  -0.605   1.968  0.00  0.00      chai H
ATOM     50 1HH3 NME B   4       4.743   0.329   2.935  0.00  0.00      chai H
ATOM     51  CH3 NME B   4       5.760   0.315   2.536  0.00  0.00      chai C
ATOM     52  H   NME B   4       7.546  -0.212   3.611  0.00  0.00      chai H
ATOM     53 2HH3 NME B   4       5.889   1.171   1.871  0.00  0.00      chai H
TER      54      NME B   4
END

--------------580F8D489AE1CA62141D73E2--