shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
185 stars 53 forks source link

convert lammps to gromacs (error about dihedral) #395

Open Springwonder opened 1 year ago

Springwonder commented 1 year ago

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 commented 1 year ago

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

Springwonder commented 1 year ago

Thanks for your help, I will check and modify the pair style and dihedral style.

Best regards

------------------ 原始邮件 ------------------ 发件人: "shirtsgroup/InterMol" @.>; 发送时间: 2023年7月14日(星期五) 晚上9:31 @.>; 抄送: "Rush @.**@.>; 主题: Re: [shirtsgroup/InterMol] convert lammps to gromacs (error about dihedral) (Issue #395)

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

faranak1991 commented 1 year ago

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

Jeet-Majumdar commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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.