implementation of getEnergy()
[cluster_expansion.git] / cluster_expansion.cpp
blobd5da3334547eee19b806b655190b5605a0abcc3a
1 /*
2 * Determination of lateral interaction parameters on a c(2x2) square lattice
3 * using linear combinations to express each interaction and then counting
4 * them in terms of cluster-expansion coefficients
6 * Michael Rieger, FHI, 2008
7 * rieger@fhi-berlin.mpg.de
9 */
11 #include <iostream>
13 #include "Lattice.h"
14 #include "LatticeParser.h"
16 #include "Interactions.h"
17 #include "InteractionsParser.h"
19 #include "SymmetryOperations.h"
21 #include "Structure.h"
25 void usage(const char *prog)
27 cerr << "usage: " << prog
28 << " structure-ini-file interactions-ini-file"
29 << endl;
31 exit(EXIT_FAILURE);
35 int main(int argc, char* argv[])
37 if (argc != 3)
38 usage(*argv);
40 try {
41 LatticeParser latticeParser(argv[1]);
42 Lattice lattice = latticeParser.getLattice();
43 cout << lattice;
45 InteractionsParser interactionsParser(argv[2]);
46 Interactions interactions = interactionsParser.getInteractions();
48 cout << "interactions (before assessment):" << endl << interactions << endl;
49 lattice.assessInteractions(interactions);
50 cout << "interactions (after assessment):" << endl << interactions;
52 // Structure structure();
55 // Structures structures.push_back(structure_1);
59 catch (exception& e) {
60 cerr << "FATAL: " << e.what() << endl;
61 exit(EXIT_FAILURE);
64 exit(EXIT_SUCCESS);