Greetings,
 
When I call the GetNextFragment() function in a python script as follows:
 
from openbabel import OBMol, OBConversion
import openbabel
 
conv  = OBConversion()
conv.SetInAndOutFormats("xyz", "xyz")
mol = OBMol()
conv.ReadFile(mol,'./t1.xyz')
newmol = OBMol()
iter = openbabel.OBMolAtomDFSIter(mol)
print(mol.GetNextFragment(iter,newmol))
 
I always get an error message:
 
print(mol.GetNextFragment(b,newmol))
TypeError: in method 'OBMol_GetNextFragment', argument 2 of type 'OpenBabel::OBMolAtomDFSIter &'
 
However, the argument 'iter' in GetNextFragment() is of type 'OpenBabel::OBMolAtomDFDlter'.
By the way, the way I use here is the same as that in GitHub: https://github.com/openbabel/openbabel/blob/master/src/formats/pdbqtformat.cpp#L804
 
Could you please help me out? Thank you for your time.
 
Best,
QC
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to