Dear all,
I'm trying to seek analogs of a set of molecules.
Let's say I have mol-C(=O)-NH2.
I seek different analogs, eg
mol-CH2-NH2
or
mol-C(=O)-CH3.
My first step is to check formula. Eg for mol-CH2-NH2, the difference is -1O
+2H, compared to the reference. Then i do a findall with the smarts of
mol-CH2-NH2 on the reference mol-C(=O)-NH2. As mol-CH2-NH2 is a substructure
of mol-C(=O)-NH2, I'm sure that's the corresponding amide which is modified.
But if the N is replaced by a C:
Ref. mol-C(=O)-NH2 --> potential analog mol-C(=O)-CH3
my formula check is OK (-1N +1C +1H), but the substructure doesn't match, of
course. Knowing the atom id of the N of the amide in the reference molecule,
I would like to mutate it in a carbon, so I would be able to do the
substructure search (which will found the full molecule indeed, in this
exemple).
I tested OBAtom.SetAtomicNum(6) but it doesn't "mutate completely", if I can
say so, the atom.
Which function(s) should I use?
My piece of code (pybel) - I welcome any comment about a better or another
way of seeking this kind of analogs:
(if formulaCheck)
amideCONH2 = pybel.Smarts("[H]N([H])C=O")
for numList in amideCONH2.findall(mol):
for num in numList:
if mol.atoms[num-1].OBAtom.GetAtomicNum() == 7:
# Need to exchange this nitrogen atom with a carbon
mol.atoms[num-1].OBAtom.SetAtomicNum(6) # change the atomic
number, but the formula is not modified
# Perform now structure check
Many thanks again,
Regards,
Pascal
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
OpenBabel-scripting mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting