or group of atoms by
atom indices
Something along these lines?
mol = Chem.MolFromSmiles('')
emol = Chem.EditableMol(mol)
emol.ReplaceAtom(3, Chem.Atom(1))
mol = emol.GetMol()
In [12]:
Chem.MolToSmiles(mol)
Out[12]:
'[H]CCC'
In [13]:
Chem.MolToSmil
Something along these lines?
mol = Chem.MolFromSmiles('')emol =
Chem.EditableMol(mol)emol.ReplaceAtom(3, Chem.Atom(1))mol =
emol.GetMol()
In [12]:
Chem.MolToSmiles(mol)
Out[12]:
'[H]CCC'
In [13]:
Chem.MolToSmiles(Chem.RemoveHs(mol))
Out[13]:
'CCC'
Jason Biggs
On Thu, Nov 9, 2017
RDKit Discussion Group,
Suppose I have a molecule
smiles1 = ''
The carbon atoms will be assigned indices 0, 1, 2, and 3.
Suppose I want to specifically change carbon 3 to a hydrogen.
Is this possible using RDkit?
I am aware of using SMARTS to match a pattern and then
3 matches
Mail list logo