[MMTK] Minimization in MMTK2.2b6
Berit Hinnemann
Berit.Hinnemann@fysik.dtu.dk
Thu, 13 Sep 2001 18:14:28 +0200
This is a multi-part message in MIME format.
--------------1878EEB546C0A7D85FEC39A5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Dear Konrad,
We are still having problems with the Conjugate Gradient Minimization, I
wrote about some time ago, namely that atoms, for which an attribute
"fixed" is set to one, are not kept fixed. In order to be sure that this
error is not due to an old Python or Numeric version, we now installed
the same versions of Python and Numeric, that you were using
Python-2.1.1 and Numeric 20.1, Redhat 7.1
and I still observe the problem with minimization, that atoms are not
kept fixed.
Now I have a small script minimizing a chain and showing that the atom,
which should not move, moves already in the first step. I have also
tried the Steepest Descent Minimizer, and there the atom is not kept
fixed either.
Could you please try if this script works correctly for you and what you
get as output? The output lines I get are
[0.33599999999999997, 0.56950000000000001, 0.23189999999999997]
Step 0
Potential energy: -54.391430, Gradient norm: 1451.302151
Step 1
Potential energy: -83.227165, Gradient norm: 1451.302151
[0.33598936893254117, 0.56921521643713158, 0.23239326994896334]
Thanks a lot,
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
--------------1878EEB546C0A7D85FEC39A5
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
END
--------------1878EEB546C0A7D85FEC39A5
Content-Type: text/plain; charset=us-ascii;
name="test.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="test.py"
#!/usr/bin/env python
from MMTK import *
from MMTK.Proteins import PeptideChain, Protein
from MMTK.ForceFields import Amber94ForceField
from MMTK.Minimization import ConjugateGradientMinimizer
from MMTK.PDB import PDBConfiguration, PDBOutputFile
from MMTK.Trajectory import Trajectory, TrajectoryOutput, LogOutput, StandardLogOutput
universe = InfiniteUniverse(Amber94ForceField())
conf = PDBConfiguration('gly.pdb')
chains = map(PeptideChain, conf.peptide_chains)
universe.proteins = Protein(chains)
trajectory = Trajectory(universe, "test.nc", "w", "CG on chain")
ouratom=universe.proteins[0][-1].HH31
ouratom.fixed=1
# Minimize
print ouratom.position()
minimizer = ConjugateGradientMinimizer(universe,actions=[TrajectoryOutput(trajectory,("energy",
"configuration"),0, None, 1),
StandardLogOutput(1)])
minimizer(convergence = 1.e-3, steps = 1)
print ouratom.position()
trajectory.close()
--------------1878EEB546C0A7D85FEC39A5--