cmelab / forcefields

1 stars 2 forks source link

graph matching for type-mapping #3

Open erjank opened 1 year ago

erjank commented 1 year ago

My current understanding is that openmm gives us interaction information in terms of atom index, which is used consistently for the bonds, angles, dihedrals, and nonbonded interactions. But if we want to use that in HOOMD, we need to know what atom types each of those indexes correspond to. Assuming that the indexing is consistent between openmm and parmed, we can check that the graphs are the same and use the atom_types from parmed structures to map from openmm index. This is a big assumption for complex molecules, so we need to implement something like a networkx tree comparison to show the graphs are isomorphic, but this is tricky with cyclic graphs. But we should do it to be right.