scychon / openmm_drudeNose

Dual Nose-Hoover thermostat with extended Lagrangian integration for drude polarizable MD in OpenMM
6 stars 0 forks source link

Particle coordinate is nan in run with openmm_drudeNose #5

Closed qiuzy029 closed 4 years ago

qiuzy029 commented 4 years ago

In my test on pure water box, the simulation fails with error "Particle coordinate is nan" and no one MD step was performed. In another test, simulation successed, but the same error was thrown when I want to restart the job. All the tests were ok if Langevin thermostat was used.

So what may be the bug? I think openmm_drudeNose was installed successfully. The output of initiallization part was dumped into log file. Anyone has some advice?

Thanks very much!

scychon commented 4 years ago

The error is typically for simulations not initialized properly or wrong force field parameters. Can you put the outputs from the log file? Do you mean DrudeLangevinThermostat ? I saw that you were using charmm input files but it was missing the psf file. I never used charmm parser with drudeNose plugin, but I suspect it might not be the root cause of the error. I'll upload an example of simulation salt solution using charmm-drude-2013 force field xml file imported in OpenMM default distribution.

qiuzy029 commented 4 years ago

Thanks for your reply and the example is really helpful. I have found the reason for this error. And my knowledge is followed:

  1. seting CUDA platform properties is also important for drude_Nose plugin, at least in my test. So add properties={'CudaPrecision':'mixed'} into the openmm script file as the example does.
  2. This error is truely caused by the improper initiall structure. The reason why sometimes it can run successefully is that the minimize's stability. Sometimes it can optimize the system to a local minimum, while sometimes it fails.
  3. Both of building model from Openmm Modeller or reading psf generated by Charmm are OK. But there are some difference between them in atom order.

Appreciating you for your help again.

scychon commented 4 years ago

Thanks for the update. I'm glad that you were able to fix the problem. I also appreciate your comments regarding the CudaPrecision setting. I'll now close the issue.