Hi Steven,

It ran out of memory setting up the VdW part of the forcefield
optimisation. The resulting segfault is handled gracefully in C++
(raising a C++ exception) but currently this doesn't cross the
boundary to Python very well except to cause trouble.

The only way around this would either be to move to a 64-bit setup
(which is a bit untested for Windows) but is working for Adrià on
Linux. Or to call obabel at the command-line from Python to read and
write from a file. If, for your purposes, you don't need to run the
forcefield, then of course you could edit the code in "make3D()" not
to run the forcefield optimisation. You would still have some sort of
a 3D structure.

- Noel

On 14 November 2011 20:58, Arturo, Steven (SG) <[email protected]> wrote:
> Good day all.  I understand that I use pybel to manipulate structures that
> are larger than what the code is intended to do.  So I am testing the limits
> of this.
>
>
>
> I write because if I execute a ‘make3D’ function on a molecule that is too
> large, pybel (or openbabel) crashes python.
>
>
>
> Here is what a good execution looks like when I use ‘make3D’ on a large
> molecule.
>
>
>
> Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on
> win32
>
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import pybel
>
>>>> smiles='O'+'CCO'*300
>
>>>> mol=pybel.readstring('smi',smiles)
>
>>>> mol.make3D()
>
>>>> ^Z
>
>
>
> And here is what a bad execution looks like
>
>
>
> Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on
> win32
>
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import pybel
>
>>>> smiles='O'+'CCO'*400
>
>>>> mol=pybel.readstring('smi',smiles)
>
>>>> mol.make3D()
>
>
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> Please contact the application's support team for more information.
>
>
>
> As you can see, I am running a 32-bit version of python on Windows.  It is a
> 64-bit version of Windows 7 with 12 GB of memory.
>
>
>
> I investigated whether the error is memory-based.  It seems that this error
> is shown when python asks for about 490 MB of memory.  This is well below
> the limits of this machine, since I have run scripts on this same machine
> that fail when it is ~1.7 GB of memory, something more meaningful when I run
> a 32-bit application on Windows 7.
>
>
>
> Two questions… Why is this happening?  And is there a more graceful way to
> fail, so that I can wrap the command with a try loop and execute the rest of
> my script if ‘make3D’ fails?
>
>
>
> Thanks for your help.
>
>
>
> Steve
>
>
>
> Steven G. Arturo
>
> Core R&D – E&PS
>
> The Dow Chemical Company
>
> 727 Norristown Road
>
> Spring House, PA 19477
>
> 7B/207P  979.238.5749
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> OpenBabel-scripting mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>
>

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
OpenBabel-scripting mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting

Reply via email to