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

Cassandra gmso #756

Merged
merged 52 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
665feb6
Add fixed length bonds and angles to potential templates library.
rsdefever Jun 24, 2021
bd6ad75
Working to make MCF writer feature complete. Tests in progress.
rsdefever Jun 24, 2021
a6ce48d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 24, 2021
a97826c
Add dimensions to Fixed Bond and Angle templates
emarinri Aug 11, 2023
c9bd1d1
Update keys in OPLS dihedral parameters dict
emarinri Aug 11, 2023
014b7ae
Fix typed OPLS ethane test for MCF format
emarinri Aug 11, 2023
f41d5a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 11, 2023
f8e044c
Add typed ethane test.
emarinri Aug 13, 2023
059ee03
Fix code style
emarinri Aug 13, 2023
48fd600
Add fixture to parse mcf into sections
emarinri Aug 13, 2023
aed4c44
Support Pydantic v1 and v2 (#752)
mattwthompson Aug 11, 2023
76415a8
Update MCF with GMSO builtin top site sorting
emarinri Aug 15, 2023
f093262
Use PotentialFilters to check for unique atomtypes
emarinri Aug 15, 2023
44a0928
Add test to check charge neutrality
emarinri Aug 15, 2023
b9efc1b
Add test for incompatible expressions
emarinri Aug 15, 2023
f9f2759
Test full MCF for Mie-Xe and LJ-Ar
emarinri Aug 16, 2023
5442297
Check charge neutrality in each molecule test
emarinri Aug 16, 2023
86902e6
Add exception for not neutral system in MCF writer
emarinri Aug 16, 2023
00cc2bc
Move parsing and neutrality check as utils
emarinri Aug 17, 2023
73d24de
Merge branch 'main' into cassandra-gmso
daico007 Sep 2, 2023
6094aba
Merge branch 'main' into cassandra-gmso
daico007 Sep 6, 2023
51fdad8
minor docstring/comment fixes, swap out simplify with symengine expand
daico007 Sep 11, 2023
5f4ca3c
Merge branch 'main' of https://github.com/mosdef-hub/gmso into cassan…
daico007 Sep 11, 2023
1dc0a3e
[pre-commit.ci] pre-commit autoupdate (#763)
pre-commit-ci[bot] Sep 12, 2023
a1c3fb5
Test for 0.5 factor of OPLS dihedral potential
emarinri Sep 12, 2023
4578812
Test to account for 0.5 factor in harmonic angles
emarinri Sep 12, 2023
6668363
Test for rigid angles using the TIP3P model
emarinri Sep 12, 2023
80c9be3
MCF writer test with topology with 10 argon mols
emarinri Sep 13, 2023
2b0c7ee
Tentative output of multiple MCF from one Topology
emarinri Sep 13, 2023
8317de4
Merge branch 'main' into cassandra-gmso
daico007 Sep 13, 2023
3951954
Change psi to phi and consts for ethylene xml test
emarinri Sep 14, 2023
9579252
Test for 0.5 factor in OPLS dihedrals
emarinri Sep 14, 2023
ae69a8c
Add cassandra test for gmso
CalCraven Sep 18, 2023
750d755
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 18, 2023
a7df9bc
Add test for two atom fragment
emarinri Sep 16, 2023
685f8b8
Test for molecule with one ring
emarinri Sep 16, 2023
1252d2b
Change nitrogen test to ethane ua
emarinri Sep 19, 2023
ec3a5dd
Add ethane rigid reference xml
emarinri Sep 19, 2023
a30d7bd
Use Fourier dihedrals as MCF standard dihedrals.
emarinri Sep 19, 2023
64b5b8f
Fix dihedral type output fourier to opls
emarinri Sep 19, 2023
ad68575
Match MCF GMSO Angle header to mb Angle header
emarinri Sep 20, 2023
0759365
Add a test comparing gmso and mbuild mcf writers
emarinri Sep 20, 2023
cf4e0c0
Use the Fourier converter for ethylene dihedrals
emarinri Sep 20, 2023
f462d5b
Write atom type masses instead of atom masses to account for UA beads
emarinri Sep 20, 2023
2a40bbf
Output correct case for dihedral styles in MCFs
emarinri Sep 20, 2023
c12a120
Merge branch 'main' into cassandra-gmso
daico007 Sep 20, 2023
6ff41e2
Merge branch 'cassandra-gmso' of https://github.com/emarinri/gmso int…
emarinri Sep 20, 2023
c1b9c19
Run an energy calculation to compare GMSO and mBuild MCF writers
emarinri Sep 20, 2023
dcdc342
Merge branch 'main' into cassandra-gmso
daico007 Sep 21, 2023
3c12947
Update gmso/tests/test_mcf.py
daico007 Sep 21, 2023
a1f4853
Update gmso/tests/test_mcf.py
daico007 Sep 21, 2023
f38cfb6
Merge branch 'main' into cassandra-gmso
daico007 Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
331 changes: 192 additions & 139 deletions gmso/formats/mcf.py

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions gmso/lib/jsons/FixedAnglePotential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "FixedAnglePotential",
"expression": "DiracDelta(theta-theta_eq)",
"independent_variables": "theta",
"expected_parameters_dimensions": {
"theta_eq": "angle"
}
}
8 changes: 8 additions & 0 deletions gmso/lib/jsons/FixedBondPotential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "FixedBondPotential",
"expression": "DiracDelta(r-r_eq)",
"independent_variables": "r",
"expected_parameters_dimensions": {
"r_eq": "length"
}
}
8 changes: 8 additions & 0 deletions gmso/tests/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ def typed_water_system(self, water_system):
top = apply(top, ff)
return top

@pytest.fixture
def typed_tip3p_rigid_system(self, water_system):
top = water_system
top.identify_connections()
ff = ForceField(get_path("tip3p-rigid.xml"))
top = apply(top, ff)
return top

@pytest.fixture
def foyer_fullerene(self):
from foyer.tests.utils import get_fn
Expand Down
26 changes: 13 additions & 13 deletions gmso/tests/files/ethylene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@
</Parameters>
</AngleType>
</AngleTypes>
<DihedralTypes expression="c_0 + c_1 * cos(psi) + c_2 * cos(psi)**2 + c_3 * cos(psi)**3 + c_4 * cos(psi)**4 + c_5 * cos(psi)**5">
<ParametersUnitDef parameter="c_0" unit="kJ/mol"/>
<ParametersUnitDef parameter="c_1" unit="kJ/mol"/>
<ParametersUnitDef parameter="c_2" unit="kJ/mol"/>
<ParametersUnitDef parameter="c_3" unit="kJ/mol"/>
<ParametersUnitDef parameter="c_4" unit="kJ/mol"/>
<ParametersUnitDef parameter="c_5" unit="kJ/mol"/>
<DihedralTypes expression="c0 + c1 * cos(phi) + c2 * cos(phi)**2 + c3 * cos(phi)**3 + c4 * cos(phi)**4 + c5 * cos(phi)**5">
<ParametersUnitDef parameter="c0" unit="kJ/mol"/>
<ParametersUnitDef parameter="c1" unit="kJ/mol"/>
<ParametersUnitDef parameter="c2" unit="kJ/mol"/>
<ParametersUnitDef parameter="c3" unit="kJ/mol"/>
<ParametersUnitDef parameter="c4" unit="kJ/mol"/>
<ParametersUnitDef parameter="c5" unit="kJ/mol"/>
<DihedralType name="DihedralType-RyckaertBellemans-1" type1="opls_144" type2="opls_143" type3="opls_143" type4="opls_144">
<Parameters>
<Parameter name="c_0" value="58.576"/>
<Parameter name="c_1" value="0.0"/>
<Parameter name="c_2" value="-58.576"/>
<Parameter name="c_3" value="0.0"/>
<Parameter name="c_4" value="0.0"/>
<Parameter name="c_5" value="0.0"/>
<Parameter name="c0" value="58.576"/>
<Parameter name="c1" value="0.0"/>
<Parameter name="c2" value="-58.576"/>
<Parameter name="c3" value="0.0"/>
<Parameter name="c4" value="0.0"/>
<Parameter name="c5" value="0.0"/>
</Parameters>
</DihedralType>
</DihedralTypes>
Expand Down
38 changes: 38 additions & 0 deletions gmso/tests/files/tip3p-rigid.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version='1.0' encoding='UTF-8'?>
<ForceField name="TIP3P" version="0.0.1">
<FFMetaData electrostatics14Scale="0.5" nonBonded14Scale="0.5" combiningRule="lorentz">
<Units energy="kJ/mol" mass="amu" charge="elementary_charge" distance="nm"/>
</FFMetaData>
<AtomTypes expression="4*epsilon * ((sigma/r)**12 - (sigma/r)**6)">
<ParametersUnitDef parameter="epsilon" unit="kJ/mol"/>
<ParametersUnitDef parameter="sigma" unit="nm"/>
<AtomType name="opls_111" atomclass="OW" element="O" charge="-0.834" mass="16" definition="[O;X2]" description="water O">
<Parameters>
<Parameter name="epsilon" value="0.636386"/>
<Parameter name="sigma" value="0.315061"/>
</Parameters>
</AtomType>
<AtomType name="opls_112" atomclass="HW" element="H" charge="0.417" mass="1.011" definition="[H;X1]" description="water H">
<Parameters>
<Parameter name="epsilon" value="0.0"/>
<Parameter name="sigma" value="1.0"/>
</Parameters>
</AtomType>
</AtomTypes>
<BondTypes expression="DiracDelta(r-r_eq)">
<ParametersUnitDef parameter="r_eq" unit="nm"/>
<BondType name="BondType-Harmonic-1" type1="opls_111" type2="opls_112">
<Parameters>
<Parameter name="r_eq" value="0.09572"/>
</Parameters>
</BondType>
</BondTypes>
<AngleTypes expression="DiracDelta(theta-theta_eq)">
<ParametersUnitDef parameter="theta_eq" unit="radian"/>
<AngleType name="AngleType-Harmonic-1" type1="opls_112" type2="opls_111" type3="opls_112">
<Parameters>
<Parameter name="theta_eq" value="1.824218134"/>
</Parameters>
</AngleType>
</AngleTypes>
</ForceField>
Loading
Loading