On Wed, Oct 13, 2010 at 11:47 AM, Geoffrey Hutchison
<ge...@geoffhutchison.net> wrote:
>> I'm getting a segfault on MSVC when I delete a pointer to an
>> OBForceField (or indeed an OBOp). But this should work okay right?
>
> No. These are static unique objects. We don't delete formats or other plugins 
> either.
>
>> The reason I'm doing this is that I want to create a new pff that is
>> wiped clean of previous calculations.
>
> This should happen as soon as you call setup on a new molecule.

Alternatively, you can call MakeNewInstance if you'd like to have a
new FF for each use, e.g.

OBForceField *pff =OBForceField::FindForceField("MMFF94");
becomes
OBForceField *pff =OBForceField::FindForceField("MMFF94")->MakeNewInstance();

Dave

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to