smog-server / OpenSMOG

OpenSMOG is a Python library for performing molecular dynamics simulations using Structure-Based Models. OpenSMOG uses OpenMM.
MIT License
11 stars 6 forks source link

ValueError: Energy is NaN #59

Closed chemlove closed 2 years ago

chemlove commented 2 years ago

When I perform a simulaiton to study the binding of two proteins using OpenSMOG, it reports "ValueError: Energy is NaN" after several steps.

Also, the energy and temperature in the energies.txt become too big.

It seems the initial structure is not good?

The error infomation:

(xdrfile error) Internal overflow compressing coordinates.
(xdrfile error) Internal overflow compressing coordinates.
Traceback (most recent call last):
  File "somg_simu.py", line 35, in <module>
    sbm_AA.run(nsteps=nsteps, report=True, interval=interval)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/OpenSMOG/OpenSMOG.py",
    self.simulation.step(nsteps)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/simtk/openmm/app/simul
    self._simulate(endStep=self.currentStep+steps)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/simtk/openmm/app/simul
    self._generate_reports(unwrapped, False)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/simtk/openmm/app/simul
    reporter.report(self, state)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/simtk/openmm/app/state
    self._checkForErrors(simulation, state)
  File "/Anaconda3-2021.05/envs/opmm7.5.0/lib/python3.8/site-packages/simtk/openmm/app/state
    raise ValueError('Energy is NaN')
ValueError: Energy is NaN
chemlove commented 2 years ago

After I used time_step=0.001, the error disappeared.

Is it ok to use 0.001 as the time_step in the AA SBM?

Whitford commented 2 years ago

@chemlove You can move this over to the smog-user forum too. There are several reasons why this could happen, and many people over on that list can help troubleshoot. The simplest explanation is that there may be an issue with how energy minimization is implemented.