DMFF icon indicating copy to clipboard operation
DMFF copied to clipboard

[BUG] LJ switch function

Open marvcks opened this issue 1 year ago • 0 comments

Bug summary

I think the use of switch function is wrong in DMFF. https://github.com/deepmodeling/DMFF/blob/dcc9fa5a4516c06b2fd3383372a68bd68b70ffb0/dmff/classical/inter.py#L49C1-L54C21 It should be:

if self.isSwitch:
      x = (dr_norm - self.r_switch) / (self.r_cut - self.r_switch)
      S = 1 - 6. * x ** 5 + 15. * x ** 4 - 10. * x ** 3
      E = jnp.where(dr_norm > self.r_switch, E * S, E)
      E = jnp.where(dr_norm >= self.r_cut, 0., E)

DMFF Version

v1.0.0

JAX Version

0.4.20

OpenMM Version

8.1.1

How did you download the software?

Built from source

Input Files, Running Commands, Error Log, etc.

Value Error.

Steps to Reproduce

No need to reproduce.

Further Information, Files, and Links

No response

marvcks avatar May 21 '24 06:05 marvcks