-
Notifications
You must be signed in to change notification settings - Fork 0
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
Compare parameters #8
Comments
Compare parameters between what and what? I might know a trick to make traversing the bonds easy for you. |
I'd like to generalize the loop at the bottom of the first notebook: for smirnoff_bond, reference_bond in zip(merged.bonds, reference.bonds):
[...] to spit out places where the starting parameters (GAFF v1.7, GAFF v1.8, whatever...) are different from the SMIRNOFF99Frosst ones, for the molecules under consideration. I just haven't gotten around to it yet and used this Issue to make a quick note to myself, but if you have a way to do it, I'd love to take a look! |
I'm not looking at the code right now as I just have a moment,but I agree it's easiest if your atoms are in the same order (seems like this would be easy if you start with the same mol2 files for each force field); then if you read them as an OEMol your bonds should also be in the same order and then you can also just loop over atoms and bonds and cross-check. If not, then you could make each molecule in consideration into an object (OEMol or OpenMM Topology or similar) where it's easy to traverse over bonds. Then, loop over atoms in one molecule (A), use your atom mapping to look up the corresponding atoms in the other molecule (B), then loop over the bonds in A connected to your atom of interest. Each bond involves a pair of atoms in A; since you know the atom indices in B from your mapping, you can identify the corresponding bond in B, so there should be no problem. This notebook has SOME overlap with what you're trying to do; it compares a SMIRNOFF forcefield with a parm@Frosst forcefield on a set of molecules and whenever it finds an energetic difference, drills down to identify the specific parameters/force terms which are responsible for the difference and prints out exactly how they differ between the two force fields.https://github.com/openforcefield/openforcefield/blob/master/utilities/SMIRNOFF_vs_frosst/SMIRNOFF_vs_frosst.ipynb |
Exactly. In the first example notebook, this is true. In the second example notebook, this is not the case because dummy atoms get shuffled, changing all the atom indexing. In general, this is not a problem because I can create a dictionary that maps between atoms in one structure and another (thanks to you).
Fantastic. This looks great. In the near future, once we have ΔG binding data for SMIRNOFF99Frosst, it will be good to see if we can rationalize the differences relative to, e.g., GAFF, by looking at where the parameter sets differ. The first priority now is to setup and do the calculations. |
Write a loop to spit out parameter comparisons.
We have the atom mapping, so we can easily loop through atoms and should be able to do a direct comparison.
For bonds, I'm a little less clear because the bond order is not going to be the same in each structure. One thought is to create a dictionary or set, and compare the set by keys.
The text was updated successfully, but these errors were encountered: