I m tring simulate the fragmentation of ESI mass spectra based on the [M+H]+ 
ions. Thus, I want to simulate the ionisation by the addition of one proton to 
heteroatoms. For example,
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import rdMolDraw2D
from IPython.display import SVG
# read mol
mol = Chem.MolFromSmiles('O=C(O)C1=CC(=NNC2=CC=C(C=C2)C(=O)NCCC(=O)O)C=CC1=O')
# draw the mol
dr = rdMolDraw2D.MolDraw2DSVG(800,800)
dr.SetFontSize(0.3)
op = dr.drawOptions()
for i in range(mol.GetNumAtoms()) :
  op.atomLabels[i] = mol.GetAtomWithIdx(i).GetSymbol() + str((i+1))
  AllChem.Compute2DCoords(mol)
  dr.DrawMolecule(mol)
  dr.FinishDrawing()
  svg = dr.GetDrawingText()
  SVG(svg)

If I want to add one proton to the N atom with the index of #17 and to ionize 
the molecule, what should I do in rdkit?
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to