Hi Leon,

you are right, that's a documentation bug: The confId parameter is actually ignored, as you have already found out.

Thanks for reporting this, cheers
p.

On 19/11/2019 20:56, topgunhaides . wrote:

Hi guys,

Does the "confID" argument actually work for "MMFFOptimizeMoleculeConfs"? Try the following code:


from rdkit import Chem
from rdkit.Chem import AllChem

mh = Chem.AddHs(Chem.MolFromSmiles('OCCCN'))
cids = AllChem.EmbedMultipleConfs(mh, numConfs=3, maxAttempts=1000,
                                  pruneRmsThresh=0.5, numThreads=0, randomSeed=-1)

# try to optimize one conformer at a time in the loop:
for cid in cids:
    mmffopt_1 = AllChem.MMFFOptimizeMoleculeConfs(mh, confId=cid, maxIters=1000,
mmffVariant='MMFF94s', numThreads=0)
    print(mmffopt_1)

# just optimize one specific conformer (ID = 0):
mmffopt_2 = AllChem.MMFFOptimizeMoleculeConfs(mh, confId=0, maxIters=1000,
mmffVariant='MMFF94s', numThreads=0)
print(mmffopt_2)

# Or optimize all conformers:
mmffopt_3 = AllChem.MMFFOptimizeMoleculeConfs(mh, confId=-1, maxIters=1000,
mmffVariant='MMFF94s', numThreads=0)
print(mmffopt_3)


In the document for MMFFOptimizeMoleculeConfs: "confId : indicates which conformer to optimize". However, in all three cases, it still optimize all conformers and give me the "whole" thing:

[(0, 1.0966514172064503), (0, -1.5120724826923375), (0, 0.6847373779429624)] [(0, 1.0966514171119535), (0, -1.512072483200475), (0, 0.6847373779078172)] [(0, 1.0966514168939838), (0, -1.5120724834832924), (0, 0.6847373779001575)] [(0, 1.0966514168498929), (0, -1.512072483655178), (0, 0.6847371291858746)] [(0, 1.096651416829605), (0, -1.5120724837465005), (0, 0.6847371291858746)]

Thank you.

Best,
Leon




_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to