GROMACS file with OpenMM: Particle coordinate is NaN

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Melly Nd
Posts: 3
Joined: Wed Sep 18, 2024 6:37 am

GROMACS file with OpenMM: Particle coordinate is NaN

Post by Melly Nd » Mon Sep 23, 2024 8:15 am

Dear all,

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 :!: . I would appreciate any insights on this matter. for your reference I also write down the code:

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

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: GROMACS file with OpenMM: Particle coordinate is NaN

Post by Peter Eastman » Mon Sep 23, 2024 8:33 am

Can you post your input files? I'll see if I can reproduce it.

User avatar
Melly Nd
Posts: 3
Joined: Wed Sep 18, 2024 6:37 am

Re: GROMACS file with OpenMM: Particle coordinate is NaN

Post by Melly Nd » Mon Sep 23, 2024 8:34 am

Thank you Peter for your fast reply. Means a lot!

User avatar
Melly Nd
Posts: 3
Joined: Wed Sep 18, 2024 6:37 am

Re: GROMACS file with OpenMM: Particle coordinate is NaN

Post by Melly Nd » Mon Sep 23, 2024 8:42 am

The files were not supported to attach. Therefore, here is the link to the files:
https://drive.google.com/drive/folders/ ... sp=sharing

POST REPLY