-
Notifications
You must be signed in to change notification settings - Fork 5
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
[DRAFT] PR for interfacing out parameterization #12
base: main
Are you sure you want to change the base?
[DRAFT] PR for interfacing out parameterization #12
Conversation
Nice! |
@@ -226,17 +226,13 @@ def get_input_set( | |||
openff_topology = get_openff_topology(openff_counts) | |||
openmm_topology = openff_topology.to_openmm() | |||
|
|||
assert np.all(ffs == ffs[0]), "All Molecules must use the same force field" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I had previously implemented but this isn't generally true.
- We might want to parameterize water differently than everything else.
- We might need to include a few custom parameters from another force field.
You don't need to implement either, but it'd be good to stay flexible so we can add these later on.
INTERCHANGE_PARAMETERIZER: dict[str,str] = { | ||
"sage": ["openff_unconstrained-2.0.0.offxml"] | ||
} | ||
DEFAULT_PARAMETERIZER: dict[str,str] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interchange should probably be the default parameterizer.
force_field = ForceField(*(self.parameterizer_type.value.get(self.force_field))) | ||
|
||
system = force_field.createSystem(topology=self.topology, nonbondedMethod=NoCutoff, polarization='mutual', mutualInducedTargetEpsilon=0.00001,constraints=None, rigidWater=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This is so straightforward!
@@ -192,6 +193,7 @@ def get_coordinates( | |||
] | |||
coords = Molecule.from_sites(sites) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I first implemented this I used a raw Molecule
call to pymatgen.core.structure.Molecule
but in hindsight that was a mistake. In the codebase, there is also a openff.toolkit.Molecule
, an Openbabel Molecule, and an RDkit Molecule. For openff, I import openff.toolkit as tk
and then call tk.Molecule
. Let's replicate that for the pymatgen object too.
A few options:
import pymatgen.core.structure.Molecule as pmg_Molecule
import pymatgen.core.structure # then use structure.Molecule
import pymatgen.core.structure as pmg # then use pmg.Molecule
I'll make a pass through the rest of the codebase to ferret this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great so far!
No description provided.