Closed ShenWenHuibit closed 5 years ago
@ShenWenHuibit Hi Shen,
what do you mean with :
Hope that the function is more perfect ??
Could you provide me with some example file of what are you trying to convert? that would be very helpful to test the data stream conversion.
Best regards, Hernán
@ShenWenHuibit Hi Shen,
what do you mean with :
Hope that the function is more perfect ??
Could you provide me with some example file of what are you trying to convert? that would be very helpful to test the data stream conversion.
Best regards, Hernán
Hi Hernan, Some problems occurred when I converted:
### Problem #008 here
Problem #008 here
**============================================= ===== Charges found: {'OW': -0.834, 'Na': 1.0, 'HW': 0.417} {'OW': 'OW', 'NA': 'Na', 'HW2': 'HW', 'HW1': 'HW'} Ending gromacs data parsing
Writing Lammps data file...
========== Still in BETA here ==========
Warning!! -- 0.0 mass not supported! using 0.01008 instead for MW atom type Warning!! -- All 0.0 mass are converted as: 0.01008 See the terminal for more info. Warning!! -- There are inconsistencies in your input files list index out of range**
I put the files that need to be converted in the attachment.Can you inform me when you solve this problem? Greatful. Best regards, shen
Hi Shen,
Ok, great I am going to take a look of it.
Best, Hernán
Hi Hernan,
Thank you very much for your reply. I looked through the gromacs manual and found that the dihedral angle of function type 9 seems to be a proper dihedral angle. The dihedral angle type that converts it into lammps should be dihedral_style hybrid, for your reference. If I understand it wrong, please let me know.
(https://github.com/hernanchavezthielemann/GRO2LAM/projects/10#card-23945011)
Best, Shen
Hi Shen,
I looked through the gromacs manual and found that the dihedral angle of function type 9 seems to be a proper dihedral angle. The dihedral angle type that converts it into lammps should be dihedral_style hybrid, for your reference. If I understand it wrong, please let me know.
Sadly it is not like that, I mean, you are correct, GROMACS dihe_type 9 is a proper dihedral angle, however, sometimes with more than one instance per pair, which conversion is not possible with hybrid in LAMMPS, because hybrid is meant for different kinds of functions for the same pair, and does not allow a summation of the same kind as error-user-input control. So, the neat option that I would use is to join the same kind, and then put them in a fourier function, that is what you see in: +Dihedral 4 and 9 - Type 9 .... the only thing is that to do this is needed de user_misc package.
Let me know what you think.
Best, Hernán
because hybrid is meant for different kinds of functions for the same pair, and does not allow a summation of the same kind as error-user-input control.
In fact that is not totally true, now I remember that the hybrid needed to sum different kinds is hybrid/overlay, and, that is the one that does not allow a summation of the same kind as error-user-input control. Also, there is no dihedral_style hybrid/overlay, it is a pair_style. Therefore, the neat way is a fourier function
because hybrid is meant for different kinds of functions for the same pair, and does not allow a summation of the same kind as error-user-input control.
In fact that is not totally true, now I remember that the hybrid needed to sum different kinds is hybrid/overlay, and, that is the one that does not allow a summation of the same kind as error-user-input control. Also, there is no dihedral_style hybrid/overlay, it is a pair_style. Therefore, the neat way is a fourier function
Hi Hernan,
Ok, I understand, thank you very much. There is also a question about why dihedral type 9 is not replaced by dihedral_style fourier in lammps?
Best shen
Hi Hernan, Hi Shen,
I came across your discussion feed as I was looking to convert gromacs input to lammps input with "type 9" dihedral types. I also found some old lammps mailing list feed with some interesting points regarding this issue. Especially two posts from Andrew Jewett. The first one 2012-06-04 19:21:32 stating:
users can define an arbitrary Fourier expansion (Ryckaert-Bellemans expansion) to approximate any dihedral potential by defining multiple dihedral interactions between the same 4 atoms (21, 22, 23, and 23 in the example below). (If you use something like "dihedral_style charmm", then the resulting function does not have to be an even function.)
The only drawback I can think of is that the dihedral calculations would be slower. (LAMMPS would have to recompute the same overhead multiple times). But this is not usually the rate-limiting step, so it should not matter much. I hope this helps. (Please let me know if I'm wrong.) Cheers
And a later one on 2012-11-15 00:46:16 mentioning the "dihedral style fourier"
Best, Adrien
Hi Adrien,
Welcome!
Yes, in fact USER-MISC_fourier (dihedral_style fourier) was released by Loukas Peristeras on 27-Oct-12, so the solution is the one that I pointed in this comment, it is just that I haven't had time to finish the implementation.
If you have an input example that you can share would be great. I'm going to give it a try this week I think.
Best, Hernan
Hi Hernan,
I think this minimal example should do the trick as starting point for the conversion.
best, Adrien
Great,
I think that today I am going to finish it, I just need to implement the wild cards in impropers tags (I hope)
Best, Hernan
Hi,
I think that it is working... now your example has an insane amount of dihedrals, which makes not easy for me to check it. So please take a look of it. minimal_example_g2l_dir.zip
Also I tried Shen's. that looks fine too. silk_g2l_dir.zip
Best, Hernan
Would be great if you guys can give me some feedback so I can update the code ;)
Hi Thanks for the work done, I'll have a look at it and get back to you.
Hi Hernan,
I've started to look at the files and compare energies from lammps and gromacs. I've notice an issue with the number of dihedral types in the data file "header" being too large, could it be that the number of dihedral types indicated is the number before merging multiples into single fourier lines ? I've also notice a factor 100 missing for the K(Urey Bradley) term in the angle coefficients (probably the conversion between nm^2 to angstrom^2 ?) I'm having a difference in dihedral energy between the gromacs and lammps test I'm running so far. I've to look into this further as I'm not quite sure what's the cause so far.
Best, Adrien
Hi Adrien,
Great! thank you, in this case compare energies should be the straight forward path to follow.
"The number of dihedral types"... yes 9803 is the initial one, it should be 7418
"Factor of 100 missing for the Urey Bradley term", true, ow you a beer!
Finally, the dihedral energy should be the same... now I add an extra digit to the energy constants, so lets see. Could you check it now? minimal_example_g2l_dir_II.zip
Best, Hernan
Hi Hernan,
The new datafile runs fine. I'm still having an issue with the dihedral energies (99 in lammps vs 16 in gromacs (both in kcal/mol)). I've looked in detail the list of dihedral coefficients and it seems that they are all properly assigned. Still an open question.
Best, Adrien
Gro2lam does not support dihedral angles with function types 4 and 9. Hope that the function is more perfect @