In the current foyer xml implementation, connections can be defined either by name or class (example: https://github.com/mosdef-hub/foyer/blob/master/foyer/forcefields/xml/oplsaa.xml). This is very useful because OPLS-AA, for example, defines bond types between two specific classes. Rather than defining redundant bond types between different atom types, a single bond type between two classes can be defined.
I believe we could support something similar in GMSO by changing how the XML is parsed in ff_utils.py. Rather than just checking the types in the connection types to the atom_type names, we could check for both valid name and atomclass.
This will require addition of class attribute to our schema. This will also require changes to the xml to forcefield conversion logic as you pointed out.
In the current foyer xml implementation, connections can be defined either by
name
orclass
(example: https://github.com/mosdef-hub/foyer/blob/master/foyer/forcefields/xml/oplsaa.xml). This is very useful because OPLS-AA, for example, defines bond types between two specific classes. Rather than defining redundant bond types between different atom types, a single bond type between two classes can be defined.I believe we could support something similar in GMSO by changing how the XML is parsed in
ff_utils.py
. Rather than just checking the types in the connection types to theatom_type
names, we could check for both validname
andatomclass
.