Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] LJ switch function #183

Open
marvcks opened this issue May 21, 2024 · 0 comments
Open

[BUG] LJ switch function #183

marvcks opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@marvcks
Copy link

marvcks commented May 21, 2024

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 marvcks added the bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant