You need to check the return values of your functions or you will have
segfaults left, right and center. For example, the return value of
SetInAndOutFormats() and ReadString(). Also, check the value of gen3d in
your debugger. It may be a NULL pointer if FindType failed.

- Noel

On 19 July 2018 at 15:30, Leif Peterson <leifepeter...@sbcglobal.net> wrote:

> Using the .NET code below to generate 3D coordinates from a SMILES, Visual
> Studio 15 simply exits the run-time.  Thus, some type of an exception is
> being thrown, which indicates gen3d may be a python or java
> method/function?  Is there an Imports that perhaps needs to be used to
> allow gen3d to run.
>
>
>    Dim OBConv2 As New OBConversion()
>
>    OBConv2.SetInAndOutFormats("smi", "sdf")
>
>    Dim Mol2 As New OBMol()
>
>    OBConv2.ReadString(Mol2, "C(Cl)(=O)CCC(=O)Cl")
>
>    Dim gen3d As OBOp = OBOp.FindType("Gen3D")
>
>    gen3d.Do(Mol2)
>
>    MsgBox(OBConv2.WriteString(Mol2))
>
>
>
> FYI, when I don’t use gen3d and OBOp, but rather a conversion from SMILES
> to xyz format, all of the coordinates are zero.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to