File: mmff94validate.cpp

package info (click to toggle)
openbabel 2.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 58,308 kB
  • sloc: cpp: 459,210; ansic: 90,514; php: 13,963; python: 7,899; perl: 6,518; pascal: 793; sh: 179; xml: 97; ruby: 64; makefile: 46; java: 23; cs: 14
file content (58 lines) | stat: -rw-r--r-- 1,960 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**********************************************************************
obmmff94validate.cpp - Validate the MMFF94 implementation

  This program assumes that the following files are in the current
  working directory:

    MMFF94_dative.mol2
    MMFF94_opti.log

  Both these files are from the MMFF94 validation suite wich can be
  found here: http://server.ccl.net/cca/data/MMFF94/

  For Each molecule in the .mol2 file the energy is calculated using
  the openbabel MMFF94 implementation. The energy values of indivudual 
  energy terms are also calculated (total bond energy, totral angle 
  energy, ...). These resulults are compared with values from the
  MMFF94_opti.log file. The difference is geven and the relative error.
  The atomtypes are also checked, when succesfull, PASSED will be printed.
  When an atom has a wrong type, XXXX FAILED XXXX will be printed next
  to its type.

Copyright (C) 2006 Tim Vandermeersch
 
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
***********************************************************************/

// used to set import/export for Cygwin DLLs
#ifdef WIN32
#define USING_OBDLL
#endif

#include <openbabel/babelconfig.h>
#include <openbabel/base.h>
#include <openbabel/mol.h>
#include <openbabel/forcefield.h>
#include <unistd.h>

using namespace std;
using namespace OpenBabel;

int main(int argc,char **argv)
{
  OBForceField* pFF = OBForceField::FindForceField("MMFF94");
  pFF->Validate();

  // test passed
  return 0;
}