[MMTK] Problems with constraints and conjugate gradient minimization

Berit Hinnemann Berit.Hinnemann@fysik.dtu.dk
Mon, 06 Aug 2001 14:18:06 +0200


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

Hi all,

I am trying to do a conjugate-gradient minimization of two small
parallel chains of glycine and would like to keep some atoms fixed in
the process. The chains are terminated with the groups
"ace_beginning_nt" and "nmethyl_ct" which are defined in the database
that comes with MMTK. I have attached the input file, "gly.pdb" to the
email. 

For the minimization I am using the script at the bottom of the mail. I
keep the four methyl group atoms (CH3) at the end of the chain fixed by
setting an attribute "fixed" to one. When I now check the PDB file of
the chains after minimization, in my script "gly_allCH3_end.pdb", I find
that  the atom 'upr[0][0].CH3' has indeed been kept fixed, but the
position of the other three have changed. The file "gly_allCH3_end.pdb"
is also attached to the mail.

I have tested this by trying to keep several combinations of atoms
fixed. The only atom which is actually kept fixed is 'upr[0][0].CH3'.
When I set the attribute "fixed" to one for any other atom or
combination of them, they are not kept fixed. Another thing, the
minimization always ends up at the same energy, no matter if I try to
keep atoms fixed or not.

Has anybody encountered the same problem and knows how to fix it? If
necessary, I can of course provide further output files I got or other
details.

Thanks a lot in advance,
Berit




-- 
Berit Hinnemann, Dipl.-Phys.
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



---Script for minimization-----------------------------------------

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')
chains = map(PeptideChain, conf.peptide_chains) 
universe.proteins = Protein(chains)
outfile = PDBOutputFile('gly_control.pdb')
outfile.write(universe.proteins)
outfile.close()
trajectory = Trajectory(universe, "gly_allCH3.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('gly_allCH3.log', first=0, last=None, skip=10)])
minimizer(convergence = 1.e-3, steps = 10000)

writeDCDPDB(trajectory.configuration, 'gly_allCH3.dcd',
'gly_allCH3.pdb')
outfile2 = PDBOutputFile('gly_allCH3_end.pdb')
outfile2.write(universe.proteins)
trajectory.close()

view(universe)
--------------ADE67162D7CD7A1D2DC805C0
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

--------------ADE67162D7CD7A1D2DC805C0
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.828   6.269   4.571  0.00  0.00      chai O
ATOM      2 1HH3 ACE A   1      14.003   3.488   4.204  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.053   5.350   3.794  0.00  0.00      chai C
ATOM      5 2HH3 ACE A   1      14.861   4.515   3.025  0.00  0.00      chai H
ATOM      6 3HH3 ACE A   1      14.901   4.921   4.758  0.00  0.00      chai H
ATOM      7  N   GLY A   2      12.255   5.036   2.776  0.00  0.00      chai N
ATOM      8  O   GLY A   2       9.918   4.087   4.010  0.00  0.00      chai O
ATOM      9  HA  GLY A   2      10.832   5.745   1.423  0.00  0.00      chai H
ATOM     10  CA  GLY A   2      10.961   5.670   2.502  0.00  0.00      chai C
ATOM     11  H   GLY A   2      12.546   4.246   2.208  0.00  0.00      chai H
ATOM     12  C   GLY A   2       9.775   4.894   3.089  0.00  0.00      chai C
ATOM     13 3HA  GLY A   2      10.949   6.677   2.920  0.00  0.00      chai H
ATOM     14  N   GLY A   3       8.586   5.083   2.517  0.00  0.00      chai N
ATOM     15  O   GLY A   3       6.280   5.376   1.032  0.00  0.00      chai O
ATOM     16  HA  GLY A   3       7.089   4.388   3.809  0.00  0.00      chai H
ATOM     17  CA  GLY A   3       7.436   4.222   2.789  0.00  0.00      chai C
ATOM     18  H   GLY A   3       8.481   5.754   1.768  0.00  0.00      chai H
ATOM     19  C   GLY A   3       6.265   4.442   1.832  0.00  0.00      chai C
ATOM     20 3HA  GLY A   3       7.754   3.185   2.692  0.00  0.00      chai H
ATOM     21  N   NME A   4       5.255   3.573   1.927  0.00  0.00      chai N
ATOM     22 3HH3 NME A   4       3.522   4.554   1.268  0.00  0.00      chai H
ATOM     23 1HH3 NME A   4       4.316   3.536   0.052  0.00  0.00      chai H
ATOM     24  CH3 NME A   4       4.046   3.610   1.107  0.00  0.00      chai C
ATOM     25  H   NME A   4       5.385   2.815   2.591  0.00  0.00      chai H
ATOM     26 2HH3 NME A   4       3.389   2.781   1.371  0.00  0.00      chai H
TER      27      NME A   4
ATOM     28  O   ACE B   1      13.047   2.630   1.292  0.00  0.00      chai O
ATOM     29 1HH3 ACE B   1      14.141  -0.225   0.989  0.00  0.00      chai H
ATOM     30  CH3 ACE B   1      13.675   0.533   0.362  0.00  0.00      chai C
ATOM     31  C   ACE B   1      12.811   1.429   1.217  0.00  0.00      chai C
ATOM     32 2HH3 ACE B   1      13.062   0.065  -0.406  0.00  0.00      chai H
ATOM     33 3HH3 ACE B   1      14.448   1.137  -0.111  0.00  0.00      chai H
ATOM     34  N   GLY B   2      11.806   0.848   1.869  0.00  0.00      chai N
ATOM     35  O   GLY B   2       9.828  -0.514   3.249  0.00  0.00      chai O
ATOM     36  HA  GLY B   2      10.337   2.300   2.136  0.00  0.00      chai H
ATOM     37  CA  GLY B   2      10.889   1.581   2.740  0.00  0.00      chai C
ATOM     38  H   GLY B   2      11.658  -0.147   1.779  0.00  0.00      chai H
ATOM     39  C   GLY B   2       9.878   0.696   3.470  0.00  0.00      chai C
ATOM     40 3HA  GLY B   2      11.470   2.124   3.487  0.00  0.00      chai H
ATOM     41  N   GLY B   3       9.073   1.306   4.342  0.00  0.00      chai N
ATOM     42  O   GLY B   3       6.307   1.488   3.723  0.00  0.00      chai O
ATOM     43  HA  GLY B   3       8.016   1.105   6.130  0.00  0.00      chai H
ATOM     44  CA  GLY B   3       8.058   0.623   5.154  0.00  0.00      chai C
ATOM     45  H   GLY B   3       9.197   2.310   4.442  0.00  0.00      chai H
ATOM     46  C   GLY B   3       6.643   0.647   4.557  0.00  0.00      chai C
ATOM     47 3HA  GLY B   3       8.354  -0.416   5.304  0.00  0.00      chai H
ATOM     48  N   NME B   4       5.771  -0.231   5.067  0.00  0.00      chai N
ATOM     49 3HH3 NME B   4       3.854   0.604   4.871  0.00  0.00      chai H
ATOM     50 1HH3 NME B   4       4.311  -0.537   3.591  0.00  0.00      chai H
ATOM     51  CH3 NME B   4       4.370  -0.336   4.662  0.00  0.00      chai C
ATOM     52  H   NME B   4       6.122  -0.878   5.757  0.00  0.00      chai H
ATOM     53 2HH3 NME B   4       3.879  -1.144   5.206  0.00  0.00      chai H
TER      54      NME B   4
END

--------------ADE67162D7CD7A1D2DC805C0--