Closed GuiLingfeng closed 9 months ago
Since this is going through the Compound.save
method, the combining rule is actually an option/parameter that need to be specified (and is actually default to lorentz
, i.e., what's being written out). I can open a PR to make a new default option using that pulled from the force field XML instead. In the mean time, you can specify the combining_rule="geometric"
in the save()
call.
Sounds good! Thanks!
As Griffin and I were discussing, this issue as whole raises the concern that the mBuild tutorials are out of date. I think we need to raise this issue higher to either go through and update them or archive them altogether.
I lean toward updating the old tutorials (and maybe append the newer one we created for CECAM to it too), just because those have a very solid instruction for the very basic of mbuild.
Bug summary
I was using mbuild.Compound().save() to generate a Gromacs topology file using the oplsaa xml file in which the geometic combining rule is specified
<ForceField name="OPLS-AA" version="0.0.3" combining_rule="geometric">
but in the generated toplogy file the comb-rule is 2, i.e., Lorentz-Berthelot rules.; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ 1 2 yes 0.5 0.5
This issue should be related to https://github.com/mosdef-hub/mbuild/blob/b30ceff677781e83a55d5da2fdf000675a54b58b/mbuild/conversion.py#L1122.Code to reproduce the behavior
Please include a code snippet that can be used to reproduce this bug.
Software versions
python --version
)? 3.10.12