[MMTK] Segmentation fault in VelocityVerletIntegrator with python forcefied

Jaroslaw Kalinowski jak at biogeo.uw.edu.pl
Tue Jun 14 01:40:06 CEST 2005


   Hi,

I have modified test.py file included in examples in
Forcefield/HarmonicOscillator/Python, so that molecular dynamics 
is performed instead of minimization. Unfortunately it crashes with 
segmentation fault. The code and a backtrace are included below.

Thanks in advance,

   Jaroslaw Kalinowski


/MMTK-2.5.7, ScientificPython-2.5.3, Numeric-23.3/

from MMTK import *
from HarmonicOscillatorFF import HarmonicOscillatorForceField
from MMTK.Dynamics import VelocityVerletIntegrator
from MMTK.Trajectory import TrajectoryOutput

universe = InfiniteUniverse()
universe.atom1 = Atom('C', position=Vector(0., 0., 1.05))
universe.atom2 = Atom('C', position=Vector(0., 1.05, 0.))

ff1 = HarmonicOscillatorForceField(universe.atom1, Vector(0., 0., 1.), 
100.)
ff2 = HarmonicOscillatorForceField(universe.atom2, Vector(0., 1., 0.), 
100.)
universe.setForceField(ff1+ff2)

universe.initializeVelocitiesToTemperature(300.*Units.K)
integrator = VelocityVerletIntegrator(universe, delta_t = 1.0*Units.fs)
integrator(steps = 1000)


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208115072 (LWP 6702)]
0x080e832a in PyFrame_New ()
(gdb) backtrace
#0  0x080e832a in PyFrame_New ()
#1  0x080a977e in PyEval_EvalCodeEx ()
#2  0x080e9caa in PyFunction_SetClosure ()
#3  0x0805b3b7 in PyObject_Call ()
#4  0x0806193b in PyMethod_New ()
#5  0x0805b3b7 in PyObject_Call ()
#6  0x080aaeba in PyEval_CallObjectWithKeywords ()
#7  0x0805d2a2 in PyInstance_New ()
#8  0x0805b3b7 in PyObject_Call ()
#9  0x080aaeba in PyEval_CallObjectWithKeywords ()
#10 0x0805b36c in PyObject_CallObject ()
#11 0xb795cf88 in __pyx_f_16MMTK_energy_term_12PyEnergyTerm_c_evaluate 
(__pyx_v_self=0x82005c4, __pyx_v_eval=0xb78dade8, 
__pyx_v_input=0xbfffe840,
     __pyx_v_energy=0xbfffebc0) at Src/MMTK_energy_term.c:302
#12 0xb7834daf in evaluator (self=0xb78dade8, energy=0xbfffebc0, 
coordinates=0xb7878e30, small_change=0) at Src/MMTK_forcefield.c:759
#13 0xb77f2060 in integrateVV (dummy=0x0, args=0x6d726574) at 
Src/MMTK_dynamics.c:621
#14 0x080ea40d in PyCFunction_Call ()
#15 0x0805b3b7 in PyObject_Call ()
#16 0x080aaeba in PyEval_CallObjectWithKeywords ()
#17 0x0809f476 in _PyUnicodeUCS4_IsAlpha ()
#18 0x080ea40d in PyCFunction_Call ()
#19 0x080ab28d in PyEval_GetFuncDesc ()
#20 0x080a8f79 in PyEval_EvalCode ()
#21 0x080a9b5e in PyEval_EvalCodeEx ()
#22 0x080e9caa in PyFunction_SetClosure ()
#23 0x0805b3b7 in PyObject_Call ()
#24 0x0806193b in PyMethod_New ()
#25 0x0805b3b7 in PyObject_Call ()
#26 0x08060f26 in _PyInstance_Lookup ()
#27 0x0805b3b7 in PyObject_Call ()
#28 0x080ab740 in PyEval_GetFuncDesc ()
#29 0x080ab121 in PyEval_GetFuncDesc ()
#30 0x080a8f79 in PyEval_EvalCode ()
#31 0x080a9b5e in PyEval_EvalCodeEx ()
#32 0x080a6b57 in PyEval_EvalCode ()
#33 0x080c9909 in PyRun_FileExFlags ()
#34 0x080c8834 in PyRun_SimpleFileExFlags ()
#35 0x080c811a in PyRun_AnyFileExFlags ()
#36 0x080552d7 in Py_Main ()
#37 0x08054cf9 in main ()




More information about the mmtk mailing list