[MMTK] MMTK 2.2 with Python 2.2
Berit Hinnemann
Berit.Hinnemann@fysik.dtu.dk
Wed, 21 Aug 2002 15:31:05 +0200
This is a multi-part message in MIME format.
--------------4C924264B60DFA2B4DEE7EE2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi all,
has anybody used MMTK 2.2 together with Python 2.2? When I use it,
python keeps crashing, but it seems to me, as if python is the problem
and not MMTK.
For example, when I run the script "enterms.py" which reads the pdb-file
'gly2.pdb', I get the output
45:enterms.py
58.6206188561
{'harmonic bond': -156466043, 'electrostatic/ewald direct sum':
1076768054, 'electrostatic': 4883581698.0, 'harmonic bond angle':
1074600030, 'electrostatic/pair sum': 865293943, 'electrostatic/ewald
reciprocal sum': 1076726049, 'Lennard-Jones': 1074835996, 'cosine
dihedral angle': -388808353, 'electrostatic/ewald self term':
1864793652}
Segmentation fault (core dumped)
The total energy is right, but the enery terms are wrong. The right
output would be
58.6206188562
{'electrostatic/ewald self term': -1515.6793359945839, 'cosine dihedral
angle':
15.088304149375501, 'Lennard-Jones': 14.767833207616697,
'electrostatic/ewald reciprocal sum': 372.00405461475395, 'harmonic bond
angle': 4.1739384058895146, 'electrostatic/ewald direct sum':
1164.6289245944686, 'harmonic bond': 3.6368998786352358,
'electrostatic': 20.95364321463876}
When I try to use the ConjugateGradientMinimizer, python crashes with
the error message
Fatal Python error: GC object already in linked list
Abort (core dumped)
Does anybody have any ideas about this?
Thanks for any help,
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
--------------4C924264B60DFA2B4DEE7EE2
Content-Type: text/plain; charset=us-ascii;
name="enterms.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="enterms.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.Visualization import view
from MMTK.PDB import PDBConfiguration, PDBOutputFile
from MMTK.Trajectory import Trajectory, TrajectoryOutput, LogOutput, StandardLogOutput
from MMTK.DCD import writeDCDPDB
universe = OrthorhombicPeriodicUniverse((7.2*Units.Ang, 15*Units.Ang, 15*Units.Ang),Amber94ForceField())
conf = PDBConfiguration('gly2.pdb')
#Change that for other output file names
fil = 'gly2'
chains = []
for i in range(len(conf.peptide_chains)):
chains.append(PeptideChain(conf.peptide_chains[0],
n_terminus=0, c_terminus=0, circular=1))
universe.proteins = Protein(chains)
print universe.energy()
print universe.energyTerms()
--------------4C924264B60DFA2B4DEE7EE2
Content-Type: text/plain; charset=us-ascii;
name="gly2.pdb"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gly2.pdb"
ATOM 1 N GLY A 1 19.036 4.445 3.325 0.00 0.00 N
ATOM 2 O GLY A 1 16.788 3.012 3.087 0.00 0.00 O
ATOM 3 HA GLY A 1 17.785 6.065 2.883 0.00 0.00 H
ATOM 4 CA GLY A 1 17.804 5.169 3.520 0.00 0.00 C
ATOM 5 H GLY A 1 18.947 3.430 3.239 0.00 0.00 H
ATOM 6 C GLY A 1 16.629 4.244 3.210 0.00 0.00 C
ATOM 7 3HA GLY A 1 17.707 5.525 4.561 0.00 0.00 H
ATOM 8 N GLY A 2 15.433 4.851 3.109 0.00 0.00 N
ATOM 9 O GLY A 2 13.196 6.286 3.348 0.00 0.00 O
ATOM 10 HA GLY A 2 14.173 3.231 3.560 0.00 0.00 H
ATOM 11 CA GLY A 2 14.201 4.123 2.922 0.00 0.00 C
ATOM 12 H GLY A 2 15.319 5.860 3.225 0.00 0.00 H
ATOM 13 C GLY A 2 13.034 5.057 3.226 0.00 0.00 C
ATOM 14 3HA GLY A 2 14.106 3.759 1.884 0.00 0.00 H
END
--------------4C924264B60DFA2B4DEE7EE2--