Hi Noel, thank you very much!
Unfortunately I got an error when I tried the FindPlugin() function. Code: *import pybel# Set up converterconv = pybel.ob.OBConversion()conv.SetOutFormat("mop")conv.AddOption("k", conv.OUTOPTIONS, "SYMMETRY PM7 UHF STATIC")conv.Convert()gen3d = openbabel.OBOp.FindPlugin("gen3d")# Get a moleculemol = readstring("smi", "C=C(C)CCC")gen3d.Do(mol.OBMol)output = conv.WriteString(mol.OBMol)print (output)* What did I do wrong? However I had a look at the Pybel API documentation on Github and I found the make3D function. With the following code and your suggestion of getting rid of the Conversion Object I achieved the result I wanted: *mol = readstring("smi", "C=C(C)CCC")* *mol.make3D()output = out = mol.write("mop", opt={"k":"SYMMETRY PM7 UHF STATIC"})* *print(output)* Output: SYMMETRY PM7 UHF STATIC C 0.89335 1 0.00286 1 -0.01617 1 C 2.23793 1 0.02055 1 0.00771 1 C 2.97498 1 0.80100 1 1.06089 1 C 3.03015 1 -0.74861 1 -1.03024 1 C 4.54982 1 -0.63509 1 -0.87704 1 C 5.29276 1 -1.42196 1 -1.93888 1 H 0.30804 1 0.54711 1 0.71827 1 H 0.34596 1 -0.55513 1 -0.76914 1 H 2.29548 1 1.31150 1 1.74978 1 H 3.60564 1 1.56767 1 0.59910 1 H 3.60564 1 0.13608 1 1.65997 1 H 2.74736 1 -0.39011 1 -2.02913 1 H 2.74735 1 -1.80860 1 -0.97797 1 H 4.85585 1 -1.00644 1 0.10783 1 H 4.85585 1 0.41523 1 -0.94569 1 H 5.04484 1 -2.48579 1 -1.88112 1 H 6.37179 1 -1.31269 1 -1.79142 1 H 5.04484 1 -1.05708 1 -2.93985 1 Thank you very much Noel!
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss