GMSO failing to create an empty box for MC dual simulation box setups
**Bug summary**
GMSO not allowing empty boxes to be created for MC simulations with dual boxes in 0.15.0, which is permitted in 0.14.0. See new failing tests in mosdef-gomc (https://github.com/GOMC-WSU/MoSDeF-GOMC/actions/runs/19054940022)
**Code to reproduce the behavior**
Build mosdef GOMC and run the tests on 0.15.0 and in 0.14.0. There are 3/4 tests that fail because of this
- def test_box_1_empty_test_1
- def test_box_1_empty_test_2
- def test_box_1_empty_test_3
The 4th failing test "test_save_charmm_gomc_ua_charmm_periodic_wildcard_improper_ff", is not an issue an just some change that can be fixed by changing the order of the testing file for the 2 center (both wildcard) atoms in the improper.
Please include a code snippet that can be used to reproduce this bug.
PLEASE USE THE MOSDEF-GOMC tests!
I have also provided a simpler version below, but it may not contain all possibilities.
from foyer.forcefields import forcefields
from gmso import Topology
from gmso.exceptions import GMSOError
from gmso.external.convert_mbuild import from_mbuild, to_mbuild
from mbuild import Box, Compound
from mbuild.lattice import load_cif
from mbuild.utils.io import get_fn, has_foyer
from mosdef_gomc.formats.gmso_charmm_writer import (
Charmm,
_Exp6_Rmin_to_sigma,
_Exp6_Rmin_to_sigma_solver,
_Exp6_sigma_to_Rmin,
_Exp6_sigma_to_Rmin_solver,
)
from mosdef_gomc.tests.base_test import BaseTest
from mosdef_gomc.utils.conversion import (
base10_to_base16_alph_num,
base10_to_base22_alph,
base10_to_base26_alph,
base10_to_base44_alph,
base10_to_base52_alph,
base10_to_base54_alph_num,
base10_to_base62_alph_num,
)
from mosdef_gomc.utils.io import get_mosdef_gomc_fn
two_propanol_ua = mb.load('CC(C)O', smiles=True)
two_propanol_ua.name = 'POL'
empty_compound = Box(lengths=[2, 2, 2])
box_0 = mb.fill_box(
compound=[two_propanol_ua], n_compounds=[1], box=[4, 4, 4]
)
print(f'box_0= {box_0}')
charmm = Charmm(
box_0,
"charmm_filled_box",
structure_box_1=empty_compound,
filename_box_1="charmm_empty_box",
ff_filename="charmm_empty_box.inp",
residues=[two_propanol_ua.name],
forcefield_selection="oplsaa",
bead_to_atom_name_dict={"_CH3": "C"},
atom_type_naming_style="general",
)
charmm.write_pdb()
charmm.write_psf()
```
**Software versions**
- Which version of GMSO are you using? 0.15.0 does not work... 0.14.0 does work
- Which version of Python (`python --version`)? 3.12.12
- Which operating system? Ubuntu 24.04
3 条评论