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

convert lammps to gromacs (error about dihedral) #395

Open
Springwonder opened this issue Jun 5, 2023 · 6 comments
Open

convert lammps to gromacs (error about dihedral) #395

Springwonder opened this issue Jun 5, 2023 · 6 comments

Comments

@Springwonder
Copy link

hi

I am trying to convert a lammps data files to gromacs gro file by intermol, but I got the following error:
' File "C:\Users\ALW\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\intermol\forces\convert_dihedrals.py", line 215, in convert_dihedral_from_RB_to_trig
c5 = c['C5']
KeyError: 'C5''

Is there any way to figure out it? looking for some clue

I am attaching the files I want to convert.
lmp_in.txt
input.txt

@Jeet-Majumdar
Copy link

Check for the pair style and the dihedral style you have in the input.txt file.
They might not be implemented yet.

@Springwonder
Copy link
Author

Springwonder commented Jul 15, 2023 via email

@faranak1991
Copy link

faranak1991 commented Aug 5, 2023

@Springwonder I am just wondering if you could solve the issue? since I am facing the same error with dihedral

@Jeet-Majumdar
Copy link

I have updated my forked version of Intermol to resolve these issues. You can find it here.
See if it works for you. Also, the current official version of Intermol has a bug in the conversion of harmonic bond coefficients from LAMMPS to GROMACS. I have resolved it too in my one.
The maintainers did not yet respond to my PR, so if you find anything not working feel free to report any issue.

@faranak1991 @Springwonder

Thanks,
Jeet

@faranak1991
Copy link

@Jeet-Majumdar I used the Intermol version that you supplied; however, I still faced the error with the input files that are attached.

input-3.txt
TBP_OPLS-2005.txt

@Jeet-Majumdar
Copy link

Jeet-Majumdar commented Aug 8, 2023

@faranak1991 I see that you have a pair_style that is not yet implemented in Intermol, and I am not sure whether it has any identical twin on Gromacs. However, you can always change your gromacs mdp file to suit your needs. From what I understand you are majorly concerned with converting your lammps data file to gromacs gro and top file. If that is the case, change the pair_style to pair_style lj/cut 15.0.
The same is the case with dihedral_style. I don't think it is there in Gromacs. And for this, I cannot serve you any simple solution apart from using some other dihedral style like OPLS to functionalize.
When both of these two are done, you should be able to get your system converted.

Also, check whether you are truly using my edited one. From my experience, unless you personally go and delete the .egg files in the installed directory and then install a fresh one, it will always use the previous version no matter the success message after the python setup.py install command.

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

3 participants