|
From: Lux QC <lu...@ya...> - 2019-04-26 12:14:22
|
<div>Greetings,</div><div> </div><div>When I call the GetNextFragment() function in a python script as follows:</div><div> </div><blockquote><div>from openbabel import OBMol, OBConversion</div><div>import openbabel</div><div> </div><div>conv = OBConversion()</div><div>conv.SetInAndOutFormats("xyz", "xyz")</div><div>mol = OBMol()</div><div>conv.ReadFile(mol,'./t1.xyz')</div><div>newmol = OBMol()</div><div><strong>iter = openbabel.OBMolAtomDFSIter(mol)</strong></div><div><strong>print(mol.GetNextFragment(iter,newmol))</strong></div></blockquote><div> </div><div>I always get an error message:</div><div> </div><div><div>print(mol.GetNextFragment(b,newmol))</div><div>TypeError: in method 'OBMol_GetNextFragment', argument 2 of type 'OpenBabel::OBMolAtomDFSIter &'</div><div> </div><div>However, the argument <strong>'iter'</strong> in GetNextFragment() is of type 'OpenBabel::OBMolAtomDFDlter'.</div><div>By the way, the way I use here is the same as that in GitHub: <a href="https://github.com/openbabel/openbabel/blob/master/src/formats/pdbqtformat.cpp#L804">https://github.com/openbabel/openbabel/blob/master/src/formats/pdbqtformat.cpp#L804</a></div><div> </div><div>Could you please help me out? Thank you for your time.</div><div> </div><div>Best,</div><div>QC</div></div> |