Open mattwthompson opened 1 week ago
Here's what this looks like for a set of fairly simple cases:
import logging
from openff.toolkit import ForceField, Molecule, Topology
logging.basicConfig(level=logging.INFO)
ff = ForceField("openff-2.0.0.offxml")
water = Molecule.from_smiles("O")
ligand = Molecule.from_smiles("CC")
ligand.assign_partial_charges("am1bcc")
ff.create_interchange(Topology.from_molecules([water, water]))
ff.create_interchange(ligand.to_topology())
ff.create_interchange(ligand.to_topology(), charge_from_molecules=[ligand])
ForceField("opc.offxml").create_openmm_system(Molecule.from_smiles("O").to_topology())
$ python run.py
INFO:openff.toolkit.typing.engines.smirnoff.parameters:Attempting to up-convert vdW section from 0.3 to 0.4
INFO:openff.toolkit.typing.engines.smirnoff.parameters:Successfully up-converted vdW section from 0.3 to 0.4. `method="cutoff"` is now split into `periodic_method="cutoff"` and `nonperiodic_method="no-cutoff"`.
INFO:openff.toolkit.typing.engines.smirnoff.parameters:Attempting to up-convert Electrostatics section from 0.3 to 0.4
INFO:openff.toolkit.typing.engines.smirnoff.parameters:Successfully up-converted Electrostatics section from 0.3 to 0.4. `method="PME"` is now split into `periodic_potential="Ewald3D-ConductingBoundary"`, `nonperiodic_potential="Coulomb"`, and `exception_potential="Coulomb"`.
/Users/mattthompson/micromamba/envs/new-models/lib/python3.11/site-packages/mdtraj/formats/__init__.py:13: DeprecationWarning: 'xdrlib' is deprecated and slated for removal in Python 3.13
from mdtraj.formats.trr import TRRTrajectoryFile
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 0
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 3
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 1
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 4
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 2
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 5
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 0
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 1
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 2
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 3
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 4
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 5
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 6
INFO:openff.interchange.smirnoff._nonbonded:Charge section ToolkitAM1BCC, using charge method am1bccelf10, applied to (topology) atom index 7
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 0
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 1
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 2
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 3
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 4
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 5
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 6
INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 7
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 0
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 1
INFO:openff.interchange.smirnoff._nonbonded:Charge section LibraryCharges applied to (topology) atom index 2
INFO:openff.interchange.smirnoff._virtual_sites:Charge section VirtualSites applied to virtual site with orientation atoms (0, 1, 2)
Sorry only very briefly looking at this, so please ignore me if I'm missing something important.
Report all atom indices, not just unique molecules
This seems like it would be incredibly overwhelming to users, indeed a solvated protein-ligand complex could easily be incomprehensible.
Is there no way to:
Description
Resolves #1048
Checklist
ChargeIncrementHandler
Preset charges and virtual sitesis underspecified and cannot be tested (yet)Update docstringsNo particular docstring to update, I don't think?