Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Item

Notes

Review previous meeting / progress on questions and tests

  • https://openforcefield.atlassian.net/wiki/spaces/IN/pages/edit-v2/1531215881

  • Discussion: What’s the difference between a Topology and a list of molecules?

    • IP – Unique molecules are called reference molecules.

    • (Notebook pasted below)

  • Discussion: How could we simulate a protein starting from PDB?

    • JW – We’re not going to do protein prep (missing atom placement, protation state assignment) as part of this refactor. We’ll wrap other toolks that can do this, or plan for our users to show up with a very well conditioned PDB (with protons are good residue names), or show up with SDF proteins.

    • JW – So, we’ll need some “PDB to SDF” tool that can take a nice PDB and assign bond orders .RDKit or another tool (ambpdb?) may have this, or we could make one ourselves (with a dictionary of bond order-less substructures)

    • We’d also want something like the reverse – “Given an SDF file of a protein, find all of its residues, and give them names and numbers that that a user can go run an AMBER/GROMACS simulation”

  • Future plans: Play around with openff-system?

  • New task: Give IP a code snippet to create a structure, the IP will describe its contents in terms of other packages' Molecule/Topology/System

  • Warming up with Pydantic

    • Try to make a copy of the openff.toolkit.topology.molecule.Atom class using Pydantic.

      • “Done” once it passes the current first two tests for TestAtom

    • Github link macro
      linkhttps://github.com/openforcefield/openff-toolkit/blob/56d2530e00d854337817ad3cff99a6cd9c3198f4/openff/toolkit/tests/test_molecule.py#L279-L323

    • Can use EITHER simtk.unit and simtk.openmm.app.element package, OR Pint. If you use Pint, be sure to change the tests to not compare to simtk classes.

  • Opening a practice PR for TopologyAtom.element

    • Want to end up with a PR containing

      • The new functionality

      • Tests for the new functionality

      • Releasenotes updates

Canderbilt Vanderbilt collaboration

  • IP will join tomorrow’s System object call with Vanderbilt (System object working session)

  • Vanderbilt is going to need a “atom typed topology”, which interoperates well with our “cheminformatics topology”

OpenEye license

  • IP will get an OpenEye license from Chodera lab

Notebook on topology

Code Block
languagepy
from openff.toolkit.topology import Molecule, Topology
smileses = ['CCO', 'OCC', "C1CCCCC1", "C1=CC=CC=C1", "c1ccccc1", "O",  "O",  "O",  "[H]O[H]"]
mols = [Molecule.from_smiles(smi) for smi in smileses]
print(mols)
Code Block
[Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[H]', Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[H]', Molecule with name '' and SMILES '[H][C]1([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]1([H])[H]', Molecule with name '' and SMILES '[H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H]', Molecule with name '' and SMILES '[H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H]', Molecule with name '' and SMILES '[H][O][H]', Molecule with name '' and SMILES '[H][O][H]', Molecule with name '' and SMILES '[H][O][H]', Molecule with name '' and SMILES '[H][O][H]']
Code Block
languagepy
mols[0].atoms
Code Block
[Atom(name=, atomic number=6),
 Atom(name=, atomic number=6),
 Atom(name=, atomic number=8),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1)]
Code Block
languagepy
mols[1].atoms
Code Block
[Atom(name=, atomic number=8),
 Atom(name=, atomic number=6),
 Atom(name=, atomic number=6),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1),
 Atom(name=, atomic number=1)]
Code Block
languagepy
top = Topology.from_molecules(mols)
print(top)
Code Block
<openff.toolkit.topology.topology.Topology object at 0x144e459d0>
Code Block
languagepy
for tm in top.topology_molecules:
    print(tm)
    print(tm.reference_molecule)
Code Block
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144e45e80>
Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144746c70>
Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144e45970>
Molecule with name '' and SMILES '[H][C]1([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]1([H])[H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144e45850>
Molecule with name '' and SMILES '[H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144af14c0>
Molecule with name '' and SMILES '[H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x144af1490>
Molecule with name '' and SMILES '[H][O][H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x14477fca0>
Molecule with name '' and SMILES '[H][O][H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x14477fd00>
Molecule with name '' and SMILES '[H][O][H]'
<openff.toolkit.topology.topology.TopologyMolecule object at 0x14477fe20>
Molecule with name '' and SMILES '[H][O][H]'
Code Block
languagepy
for rm in top.reference_molecules:
    print(rm)
Code Block
Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[H]'
Molecule with name '' and SMILES '[H][C]1([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[C]1([H])[H]'
Molecule with name '' and SMILES '[H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H]'
Molecule with name '' and SMILES '[H][O][H]'
Code Block
languagepy
top.topology_molecules[0].atom(0).atomic_number
Code Block
6
Code Block
languagepy
top.topology_molecules[1].atom(0).atomic_number
Code Block
8
Code Block
languagepy
top.topology_molecules[0]._top_to_ref_index
Code Block
{0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8}
Code Block
languagepy
top.topology_molecules[1]._top_to_ref_index
Code Block
{0: 2, 1: 1, 2: 0, 3: 8, 4: 6, 5: 7, 6: 4, 7: 5, 8: 3}
Code Block
languagepy

...