| |
---|
First week retrospective | Meeting frequency? Are tasks well specified enough? 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
|
Development environment issues | |
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? (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 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 (need to contact Matt) Start studying AtomTypedTopology vs. normal topology and design common API. 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
|