Hi Paolo,

I tried the code, it worked with the alignment but the new chemical after
alignment still does not have any H atoms. If I add H after alignment, it
has weird structure with H atoms. Would you please show me how to fix this
problem?

Best,
Phuong Chau

On Tue, Aug 21, 2018 at 8:01 AM, Paolo Tosco <[email protected]>
wrote:

> Hi Phuong,
>
> If you wish to retain Hs you just need to set removeHs = False when you
> call MolFromPDBFile():
>
> # align.py
>
> import sys
> from rdkit import Chem
> from rdkit.Chem import rdDistGeom, rdMolAlign, rdForceFieldHelpers
> from rdkit import Chem
>
> refMolwithH = Chem.MolFromPDBFile(sys.argv[1], removeHs = False)
> s = sys.argv[2]
> prbMolwithH = Chem.MolFromPDBFile(s, removeHs = False)
> idx=s.find('_')
> chemB= s[:idx]
>
> rdDistGeom.EmbedMolecule(prbMolwithH)
> rdForceFieldHelpers.UFFOptimizeMolecule(prbMolwithH)
>
> ##Alignment
> pyO3A = rdMolAlign.GetO3A(prbMolwithH, refMolwithH)
> score = pyO3A.Align()
>
> ##3D coords of Chem B after alignmnet
> Chem.MolToPDBFile(prbMolwithH,'{}.pdb'.format(chemB))
>
> and then
>
> ./align.py drug.pdb UNK_A1C198.pdb
> Cheers,
> p.
>
> On 08/20/18 19:02, Phuong Chau wrote:
>
> Hello everyone,
>
> I am trying to align two chemicals using their pdb files with the
> following script:
>
> *refMolwithH = Chem.MolFromPDBFile(sys.argv[1])*
> *s = sys.argv[2]*
> *prbMolwithH = Chem.MolFromPDBFile(s)*
> *idx=s.find('_')*
> *chemB= s[:idx]*
>
> *rdDistGeom.EmbedMolecule(prbMolwithH)*
> *AllChem.UFFOptimizeMolecule(prbMolwithH)*
>
> *##Alignment*
> *pyO3A = rdMolAlign.GetO3A(prbMolwithH, refMolwithH)*
> *score = pyO3A.Align()*
>
> *##3D coords of Chem B after alignmnet*
> *Chem.MolToPDBFile(prbMolwithH,'{}.pdb'.format(chemB))*
>
> The probe chemical pdb is generated from GRO file generated from LigParGen
> browser by this script:
> *gmx editconf -f input.gro -o output.pdb*
>
> The problem is the new aligned chemical is not aligned with the refMol but
> with probMol and the new chemical does not have H atoms on it.
>
> Would you please help me with this problem? Are there other ways to align
> the pdb files generated from LIgParGen?
>
> Thank you so much for your help
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Rdkit-discuss mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>


-- 
Phuong Chau
Smith College '20
Engineering Major
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to