Energy shape calculator for the porous materials
- Dependency
C++14
- Compile shared library.
$ make
#include <iostream>
#include <string>
#include <exception>
#include "Griday.hpp"
int
main(int argc, char* argv[])
try {
using namespace std;
GReal spacing = 0.02;
string atomTypeName {"./FF/Zeolite_Type.def"};
string forceFieldName {"./FF/Zeolite_FF.def"};
string cssrName {"ACO.cssr"};
string outputStem {"ACO"};
AtomTypeMap typeMap;
typeMap.read(atomTypeName);
cout << "1. Atom type information" << endl;
typeMap.print();
cout << endl;
ForceField forceField {typeMap};
forceField.read(forceFieldName);
cout << "2. Force Feild Information" << endl;
forceField.print();
cout << endl;
Framework framework {typeMap};
cout << "3. Generating Energy Grid" << endl;
GridMaker maker {typeMap, framework, forceField};
framework.read(cssrName);
framework.print();
cout << endl;
maker.setFramework(framework);
maker.make("CH4", spacing, outputStem);
return 0;
}
catch (GridayException& e)
{
std::cerr << e.what() << std::endl;
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
Compile the example code.
$ g++ example.cpp -o example.x --std=c++14 -L . -l griday -O3
Run the example.
$ ./example.x
ZEO++ can convert CIF
file to CSSR
file.
$ network -cssr ACO.cif