I just wanted to quickly update the List on how I've got on with this,
in case it is of use / interest to others.  I followed Greg's advice and
did the following:
 
1.  Exported molfile from PyMOL
2.  Read into RDKit
3.  Read in an SDF of already-constructed molecules based on the core
(could have built the products in RDKit, but the SDF was already
available!)
4.  Iterated over the objects in the supplier to do the
AllChem.ConstrainedEmbed as discussed, then load the results into PyMOL
 
NOTE - Because the molecules weren't built in RDKit, I couldn't rely on
the atom numbering when read into PyMOL (maybe this can't be relied on
anyway?).  So I ran mol.GetSubstructMatch(core) for each molecule to get
the aligned product atom IDs that matched the core.  I then flagged
these in PyMOL with flag 3 [Fixed Atoms (no movement allowed)] (flag 2 -
harmonically constrained may be better..?) so that I could subsequently
run the mengine 'clean' command in PyMOL to tidy-up the UFF output
without allowing the template to move:
 
from rdkit import Chem
core = Chem.MolFromMolFile(mol_filepath)
supplier = Chem.SDMolSupplier(sdf_filepath)
for n,mol in enumerate(supplier):
    mol = Chem.AddHs(mol)
    newMol = AllChem.ConstrainedEmbed(mol, core, True)
    name = "mol"+str(n)
    fix = ','.join([str(n) for n in mol.GetSubstructMatch(core)])
    v.ShowMol(newMol, name=name, showOnly=False)
    selection = '('+name+' and (id '+fix+'))'
    v.server.do('flag 3, '+selection+', set')
 
 
Kind regards
 
James

______________________________________________________________________
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
Oakdene Court
613 Reading Road
Winnersh, Berkshire
RG41 5UA.
Tel: +44 118 977 3133

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com and click on the "Company address and 
registration details" link at the bottom of the page..
______________________________________________________________________
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to