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

dihedral range bug? #29

Open
wenyan4work opened this issue Sep 5, 2023 · 0 comments
Open

dihedral range bug? #29

wenyan4work opened this issue Sep 5, 2023 · 0 comments

Comments

@wenyan4work
Copy link

wenyan4work commented Sep 5, 2023

ase returns dihedral values in [0, 2pi], but sella internally uses [-pi,pi]:

vec[start:end] = (vec[start:end] + np.pi) % (2 * np.pi) - np.pi

but when converting from ase constraints, the range of ase dihedrals seem remain [0, 2pi]:

(ase_cons.bonds, ase_cons.angles, ase_cons.dihedrals),

As a result, if the ase constraint is added to a dihedral with 300 degrees in ase, this constraint may crash sella, because in sella dihedral range does not go beyond 180 and this constraint can never be satisfied.

I found this seems to be true in my code, and can be worked around if I manually added constraints instead of calling the 'merge_ase_constraints' method. Could you confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant