SpinParser  1.0
Classes | Macros | Functions
LatticeModelFactory.cpp File Reference

Create lattice representations from a lattice unit cell and specification of spin interactions. More...

#include "LatticeModelFactory.hpp"
#include <algorithm>
#include <boost/filesystem.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/regex.hpp>
#include <boost/format.hpp>
#include "lib/Geometry.hpp"
#include "lib/InputParser.hpp"
#include "lib/Exception.hpp"
#include "lib/Log.hpp"
Include dependency graph for LatticeModelFactory.cpp:

Classes

struct  LatticeModelFactory::SpinPermutation
 

Macros

#define __EPSILON   0.00001
 
#define PI   3.14159265358979323846
 

Functions

std::vector< LatticeSite > LatticeModelFactory::getNeighbors (const LatticeUnitCell &uc, const LatticeSite &site)
 
std::vector< LatticeSite > LatticeModelFactory::constructRangeAroundSite (const LatticeUnitCell &uc, const LatticeSite &site, int range)
 
geometry::Vec3< double > LatticeModelFactory::getSitePosition (const LatticeUnitCell &uc, const LatticeSite &site)
 
bool LatticeModelFactory::siteAtPosition (const LatticeUnitCell &uc, const geometry::Vec3< double > &position, LatticeSite &site)
 
std::vector< std::pair< LatticeSite, SpinPermutation > > LatticeModelFactory::symmetryReduce (const LatticeUnitCell &uc, const SpinModelUnitCell &spinModel, const LatticeSite &site1, const LatticeSite &site2, bool reducedSearch=false)
 
std::pair< Lattice *, SpinModel * > LatticeModelFactory::newLatticeModel (const LatticeUnitCell &uc, const SpinModelUnitCell &spinModelDefinition, const int latticeRange, const std::string &ldfPath="")
 Create and return lattice and spin model objects from given unit cell definitions. More...
 

Detailed Description

Create lattice representations from a lattice unit cell and specification of spin interactions.

Author
Finn Lasse Buessen

Function Documentation

◆ newLatticeModel()

std::pair< Lattice *, SpinModel * > LatticeModelFactory::newLatticeModel ( const LatticeUnitCell uc,
const SpinModelUnitCell spinModelDefinition,
const int  latticeRange,
const std::string &  ldfPath = "" 
)

Create and return lattice and spin model objects from given unit cell definitions.

Parameters
ucLattice unit cell representation.
spinModelDefinitionSpin model representation.
latticeRangeLattice range.
ldfPathFile name to write the ldf file of the newly created lattice to. If left empty, do not write an ldf file.
Returns
std::pair<Lattice *, SpinModel *> Newly created Lattice and SpinModel objects.