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
16 #include "LatticeParser.h"
18 #include "Interactions.h"
19 #include "InteractionsParser.h"
21 #include "SymmetryOperations.h"
24 #include "Structure.h"
25 #include "StructureParser.h"
29 void usage(const char *prog
)
31 cerr
<< "usage: " << prog
32 << " structure-ini-file interactions-ini-file"
39 int main(int argc
, char* argv
[])
46 cout
<< "parsing lattice" << endl
;
47 LatticeParser
latticeParser(argv
[1]);
48 Lattice
*lattice
= latticeParser
.getLattice();
51 cout
<< "parsing interactions" << endl
;
52 InteractionsParser
interactionsParser(argv
[2]);
53 Interactions interactions
= interactionsParser
.getInteractions();
55 cout
<< "interactions (before assessment):" << endl
<< interactions
<< endl
;
56 lattice
->assessInteractions(interactions
);
57 cout
<< "interactions (after assessment):" << endl
<< interactions
;
60 StructureParser
structureParser(argv
[1], argv
[2]);
61 Structure structure
= structureParser
.getStructure();
63 cout
<< structure
.lattice
<< endl
;
64 cout
<< structure
.onSiteEnergy
<< endl
;
66 catch (exception
& e
) {
67 cerr
<< "FATAL: " << e
.what() << endl
;