I have already used OpenMM for MD simulation using .psf files generated by VMD. However, this time I was going to use GROMACS output files (i.e., solvate-ionised-minimised-protein.gro and topology.top) files as the input of OpenMM. As soon as my simulation goes to the equiliberation phase, I kept getting an error "Particle coordinate is NaN". I have already read the Frequency Asked Questions under this topic but unfortunately was not able to fix the issue
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
from openmm import *
from openmm.app import *
from openmm.unit import *
print('Parsing the GROMACS file...')
gro = GromacsGroFile('solvate-ionised-minimised-protein.gro.gro')
print('Generating the topology...')
top = GromacsTopFile('topol.top', periodicBoxVectors=gro.getPeriodicBoxVectors(),
includeDir='/usr/local/gromacs/share/gromacs/top')
print('Creating a system...')
system = top.createSystem(nonbondedMethod=PME, nonbondedCutoff=1.2*nanometers,
constraints=HBonds, ewaldErrorTolerance=0.001, hydrogenMass=1.5*amu)
integrator = LangevinMiddleIntegrator(300.0*kelvin, 1/picoseconds, 0.004*picoseconds)
#Platform
platform = Platform.getPlatformByName('CUDA')
prop = dict(DeviceIndex='0', Precision='single')
simulation = Simulation(top.topology, system, integrator, platform, prop)
simulation.context.setPositions(gro.positions)
print('Performing energy minimization...')
simulation.minimizeEnergy(maxIterations=5000)
print('Equilibration in NVT...')
simulation.context.setVelocitiesToTemperature(300*kelvin)
simulation.step(5000)
print('NVT is done...')
print('production in NPT...')
system.addForce(MonteCarloBarostat(1.01325*bar, 300*kelvin, 25))
simulation.context.reinitialize(True)
simulation.step(5000)
I appreciate your help a lot. I can also attach the files I use for your convenience.
Best,
Melly