On Wed, Feb 13, 2013 at 10:25:45AM -0500, Geoffrey Hutchison wrote:
>
> > I am trying to generate multiple conformation of small molecules. As a first
> > step I am trying to minimize the molecule.
> > However when I try to select the forcefield using
> > OBForceField* pFF = OBForceField::FindForceField("MMFF94");
> > if (!pFF->Setup(obmol1)){
> ...
> > Replacing this with :
> > if (!pFF){
> > cout << "Not a valid pointer" << endl;
>
>
> It's generally good advice with C++ to check whether a pointer
> is valid. In this case, OBForceField::FindForceField() will
> return a NULL pointer if MMFF94 cannot be found.
>
> If you're using OB-2.3, I suggest instantiating an
> OBConversion object first. In version 2.3, we changed the way
> plugins are loaded -- they're all loaded at the same time. So
> even if you're not using OBConversion for file formats, you'll
> want to create one before calling FindForceField().
>
Since 2.3.2 there should be no need to create OBConversion
object just to get plugins loaded, they will be loaded when
there is first need for it. Forcefield might not be found
because of misconfiguration, I suggest to try setting
environment variables telling OB were to look for plugins. For
out of source build it might look something like this:
LD_LIBRARY_PATH=/home/me/OpenBabel/build_trunk/lib/
BABEL_LIBDIR=/home/me/OpenBabel/build_trunk/lib/
BABEL_DATADIR=/home/me/OpenBabel/openbabel-git/data/
Reinis
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss