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

Reading Lammps data files (Number of Dihedral Coefficients gives errors) #348

Open
JoshuaSBrown opened this issue Sep 18, 2018 · 3 comments

Comments

@JoshuaSBrown
Copy link
Contributor

JoshuaSBrown commented Sep 18, 2018

It seems that Intermol expects a total of five coefficients for the improper harmonic dihedral. This creates a problem when reading a lammps file if only four are supplied. At least this link indicates there can be an arbitrary number of dihedral coefficients (ki).

https://lammps.sandia.gov/doc/dihedral_fourier.html

I'm guessing that a simple solution might be to set the coefficients to 0 if there are less than 5 for the remaining coefficients. However, I am not an expert with force fields so any feedback would be appreciated?

Here is the error:

File "/mnt/d/jbrown/Documents/Code/Python_Code/InterMol/intermol/forces/forcefunctions.py", line 142, in create_kwds_from_entries
    print entries[offset+i];
IndexError: list index out of range
@JoshuaSBrown
Copy link
Contributor Author

I can fix this but I would like some feedback to ensure I understand the problem correctly?

@ctk3b
Copy link
Member

ctk3b commented Sep 27, 2018

Setting coefficients to 0 if unspecified looks correct.

You should be able to validate the energy output before and after using the --energy flag.

Thank you for looking into this!

@JoshuaSBrown
Copy link
Contributor Author

@ctk3b thanks for the clarification.

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

2 participants