3 #include <blitz/array.h>
6 #include "SymmetryOperations.h"
8 #include "Interactions.h"
15 Structure::getEnergy()
17 // FIXME: check adsorbate species and get correct on-site energy contribution
19 // get interaction multiplicities for current configuration
20 lattice
.assessInteractions(interactions
);
24 for (LatticeLayer::iterator i
= lattice
.adsorbates
.begin(); i
!= lattice
.adsorbates
.end(); i
++) {
25 if (lattice
.adsorbates(i
.position()) == empty
)
27 // implement species checking CO or O or whatever
28 // energy += adsorbate_on_site_energy(species!)
30 for (Interactions::iterator interaction
= interactions
.begin();
31 interaction
!= interactions
.end(); interaction
++) {
32 energy
+= (interaction
->energy
* interaction
->multiplicity
);