File: example.cpp

package info (click to toggle)
schroedinger-coordgenlibs 3.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,248 kB
  • sloc: cpp: 17,910; python: 128; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (4)
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
#include <iostream>
#include "../sketcherMinimizer.h"

int main()
{
    sketcherMinimizer minimizer;

    /* create a molecule */
    auto* min_mol = new sketcherMinimizerMolecule();

    /* add an atom and set its parameters */
    auto a1 = min_mol->addNewAtom();
    a1->setAtomicNumber(7);

    auto a2 = min_mol->addNewAtom();
    a2->setAtomicNumber(6);

    /* add a bond and set its parameters */
    auto b1 = min_mol->addNewBond(a1, a2);
    b1->setBondOrder(1);

    /* load minimizer */
    minimizer.initialize(min_mol);

    /* generate coordinates */
    minimizer.runGenerateCoordinates();

    /* print coordinates */
    auto c1 = a1->getCoordinates();
    auto c2 = a2->getCoordinates();
    std::cerr << c1 << "  " << c2 << std::endl;
    return 0;
}