[Open Babel] How to use the GetNextFragment() function in the OBMol class (Python)

2019-04-26 Thread Lux QC
Greetings, When I call the GetNextFragment() function in a python script as follows: from openbabel import OBMol, OBConversionimport openbabel conv  = OBConversion()conv.SetInAndOutFormats("xyz", "xyz")mol = OBMol()conv.ReadFile(mol,'./t1.xyz')newmol = OBMol()iter = openbabel.OBMolAtomDFSIter(mol)p

[Open Babel] ​How to combine t​wo OB​Mol objects​ ​​in python?

2019-04-26 Thread Lux QC
Dear All, Greetings! What I want to do is to combine two molecules. I tried to combine two OBMol objects together, to obtain an OBMol object which contains the coordinates of the two molecules. After checking the class reference of openbabel, I found OBMoleculeFormat. When I import it from op

[Open Babel] How to use the GetNextFragment() function in the OBMol class (Python)

2019-04-26 Thread Lux QC
Greetings, I'm sorry for the bad formatting of the previous email. 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,'./