deleted SymmetryParser including in cluster_expansion, since the parsing is now done...
[cluster_expansion.git] / cluster_expansion.cpp
blob7d00bb9420004f1cec26329fc41aa160a357aa95
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 "Symmetry.h"
23 void usage(const char *prog)
25 cerr << "usage: " << prog
26 << " structure-ini-file interactions-ini-file"
27 << endl;
29 exit(EXIT_FAILURE);
33 int main(int argc, char* argv[])
35 if (argc != 3)
36 usage(*argv);
38 try {
39 LatticeParser latticeParser(argv[1]);
40 Lattice lattice = latticeParser.getLattice();
41 cout << lattice;
43 InteractionsParser interactionsParser(argv[2]);
44 Interactions interactions = interactionsParser.getInteractions();
46 cout << "interactions (before assessment):" << endl << interactions << endl;
47 lattice.assessInteractions(interactions);
48 cout << "interactions (after assessment):" << endl << interactions;
51 catch (exception& e) {
52 cerr << "FATAL: " << e.what() << endl;
53 exit(EXIT_FAILURE);
56 exit(EXIT_SUCCESS);