Andrew Dalke
Andrew Dalke
Here's another example: ``` >>> from rdkit import Chem >>> mol = Chem.MolFromSmiles("COc1cc2c3c([C@]45CC[C@@]6(C4)C(CC2)C3CC[C@]6(C)[C@H]5O)c1") >>> pat = Chem.MolFromSmarts("[#6+0;!$(*=,#[!#6])]!@!=!#[!#0;!#1;!$([CH2]);!$([CH3][CH2])]") >>> for match in mol.GetSubstructMatches(pat):print(match) ... (0, 1) (2, 1) (6, 7) (18,...
Still getting used to using GitHub. Left a comment in the PR at https://github.com/openforcefield/openff-toolkit/pull/978 rather than realizing the discussion was here. In short, adding dummy atom support (wildcard "*" atom...
> My use case is that I was writing code inspired by @SimonBoothroyd's `constructure` to build molecules and using the OpenFF Molecule to hold information as a way to straddle...
No need to kick yourself. I know how long it took me to realize how much cheminformatics could be done as syntax manipulation in SMILES space rather than molecular graph...
Structure file records may have multiple components as well. Consider from_file("salts.smi") containing: ``` [Na+].[Cl-] table [Cl-].[NH4+] liquorice ``` or the corresponding SDF. I agree it would be error-prone to have...
This sort of basic validation should also check for atoms with atomic number 0 ("`*`" atoms in SMILES, R-groups in molfiles). Plus probably also unsupported bond types.
Also, its docstring says: ``` return_atom_map: bool, default=False, optional will return an optional dict containing the atomic mapping. ``` but the forwarding call uses a hard-coded: ``` return_atom_map=False, ```
This is tricky. The OpenFF Molecule builds on the simtk/openmmp element. That table doesn't support isotopes ... except for deuterium. It uses a table indexed by atomic number and symbol....
I see the OpenFF toolkit almost never uses the atomic mass. Perhaps the right solution is to drop atom.mass entirely, and add an isotope property. I expect different forcefields will...
I believe it's okay to omit a region of SMARTS pattern matching for any part of SMARTS which isn't relevant to OpenFF. It does not appear that OESMILESFlag_Isotopes was added...