2021-04-09 Iván/Jeff meeting notes

Date

Apr 9, 2021

Participants

  • @Jeffrey Wagner

  • @Iván Pulido

Discussion topics

Item

Notes

Item

Notes

First week retrospective

  • Meeting frequency?

    • IP – It’s been good so far.

  • Are tasks well specified enough?

    • IP – Tasks right now are small and well-specified. They will probably get bigger in the future.

  • JW – After another week or two of one-on-one meetings, we’ll move to one one-on-one each week, and some general design meeting.

  • IP – I lacked context for VU meeting and MoSDeF

    • JW – It’s partly to introduce you to a group that we’ll be gathering requirements from, and partly to show how a major inter-ecosystem interoperability project actually happens.

Development environment issues

  • networkx 2.3 + py3.9 dependency problem

  • Conda – can we specify development dependencies?

    • (General) – We should change the development build instructions to run (something like) conda env create -n openff-dev -f test_env.yaml

    • IP will open a PR for this change (and add a Documentation updated section to releasehistory pointing out the change) , JW will review

Pydantic Atom class review

  • IP – Had to install pydantic and pint manually – How do I ensure that a consistent version of these is being used? Can I modify test_env?

    • JW – Yes, do feel free to modify test_env in your environment

  • (Discussed why we might need different unit registries/CODATAs)

  • JW – If we can let people set formal charge using either int or quantity, but always store it as quantity

  • Stereochemistry is complicated. Long story short, we may want to support

    • Stereocenters being “R”. “S”, or “undefined”

    • Stereochemistry defined as clockwise/counterclockwise

  • Will it be possible to do a gradual replacement of current functionality using pydantic models, or will we get in trouble with circular references?

  •  

Next steps

  • Replace all Atom functionality with pydantic?

  • Begin formalizing requirements

  • Search for RDKit/AmberTools functionality to go from PDB to SDF/something with bond orders

    • JW – One non-optimal strategy would be ambpdbantechamber (see first and last lines of )

  • (need to contact Matt) Start studying AtomTypedTopology vs. normal topology and design common API.

    • An openFF system contains

      • A topology

      • a forcefield / list of parameters

      • A mapping of how the parameters have been assigned to the topology

      • coordinates + box vectors

    • Will need to support

    • mol = Molecule.from_smiles('CCO') ff = ForceField('openff-1.3.0.offxml') off_sys1 = ff.create_openFF_system(mol) off_sys2 = openff.System.from_gromacs('something.gro', something.top') combined_off_sys = off_sys1 + off_sys2

       

  • We will eventually want to be able to combine topologies (both Cheminformatics-based and atom-type-based). Combining cheminformatics topologies will look something like this:

  • from openff.toolkit.topology import Molecule, Topology smileses = [('ethanol', 'CCO'), ('reversed_ethanol', 'OCC'), ('cyclohexane', 'C1CCCCC1'), ('benzene', 'c1ccccc1'), ('acetate', 'CC(=O)[O-]'), ('chlorine', '[Cl-]'), ('methane', 'C'), ('adamantane', 'C1C2CC3CC1CC(C2)C3') ] mols = [] for name, smiles in smileses: mol = Molecule.from_smiles(smiles) mols.append(mol) topology1 = Topology.from_molecules(mols[:4]) topology1.add_molecule(mols[0]) topology1.add_molecule(mols[1]) topology2 = Topology.from_molecules(mols[3:]) topology2.add_molecule(mols[0]) topology2.add_molecule(mols[1]) print(topology1.n_topology_molecules, topology2.n_topology_molecules) def combine_topologies(topology1, topology2): import copy topology1 = copy.deepcopy(topology1) topology2 = copy.deepcopy(topology2) for topology_molecule in topology2.topology_molecules: new_mol = topology_molecule.reference_molecule.remap(topology_molecule._ref_to_top_index) topology1.add_molecule(new_mol) return topology1 combined_top = combine_topologies(topology1, topology2) # If we successfuly maintained the atom orders combined_top.topology_molecules[-1].atom(0)

     

    • class MoleculeBase: def __init__(): ... def atoms ... def bonds ... class AtomBase: def name class CheminformaticsAtom(AtomBase): def formal_charge def stereochemistry class AtomtypedAtom(AtomBase) def atom_type def atom_name class BondBase class CheminformaticsBond class AtomTypedBond class MoleculeBase (most of the functionality will be defined here) class CheminformaticsMoleucle (only a few weird things will be here) def total_charge class AtomTypedMolecule class Topology: def

Action items

Decisions