Hi,
To be able to give a good answer, you should at least provide two more pieces
of information. The most important is what you mean by ”not working”, what
exactly is the problem. The second is the example file you are using.
However, a probable guess is that there is a problem with the plugins, usually
due to errors in the configuration of shared directories. Have you double
checked that OBChargeModel *mmffCharges = OBChargeModel::FindType("mmff94”);
returns anything other than nil?
Kind regards,
Fredrik
> 20 juni 2016 kl. 20:37 skrev Marcelino Arciniega <marcini...@ifc.unam.mx>:
>
> Hi all,
>
> I am having problems to assing Partial Charges with OBChargeModel.
> I basically copy and paste an example from:
>
> http://openbabel.org/dev-api/classOpenBabel_1_1OBChargeModel.shtml
> <http://openbabel.org/dev-api/classOpenBabel_1_1OBChargeModel.shtml>
>
> but it is not working.
> Can someone please tell me where is my mistake? (the code is here bellow)
>
> Thanks,
>
> Marcelino
>
> include <iostream>
> #include <openbabel/obconversion.h>
> #include <openbabel/mol.h>
> #include <openbabel/chargemodel.h>
> #include <openbabel/forcefield.h>
>
> using namespace OpenBabel;
> using namespace std;
>
> int main(int argc,char **argv)
> {
> OBConversion obconversion;
> obconversion.SetInFormat("mol2");
> OBMol mol;
>
> bool notatend = obconversion.ReadFile(&mol,"../structures/colorantes.mol2");
> while (notatend)
> {
> OBChargeModel *mmffCharges = OBChargeModel::FindType("mmff94");
> std::vector<double> partialCharges;
> if (mmffCharges && mmffCharges->ComputeCharges(mol)) {
> partialCharges = mmffCharges->GetPartialCharges();
> cout << " Charges were assigned " << endl;
> }
>
> mol.Clear();
> notatend = obconversion.Read(&mol);
> }
>
> return(0);
> }
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.
> http://sdm.link/zohomanageengine_______________________________________________
>
> <http://sdm.link/zohomanageengine_______________________________________________>
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> <mailto:OpenBabel-discuss@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> <https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss