SpinParser  1.0
Public Member Functions | Public Attributes | List of all members
LatticeModelFactory::LatticeBond Struct Reference

Representation of a lattice bond. More...

#include <LatticeModelFactory.hpp>

Public Member Functions

 LatticeBond (const int fromB, const int toB, const int da0, const int da1, const int da2)
 Construct a well-defined lattice bond object. More...
 
bool isAttachedToSite (const LatticeSite &site) const
 Determine whether the lattice bond is attached to a specified site. More...
 
bool isConnectingSites (const LatticeSite &site1, const LatticeSite &site2) const
 Determine whether the lattice bond is connecting two specified sites, ignoring the orientation of the bond. More...
 
bool isConnectingFromTo (const LatticeSite &siteFrom, const LatticeSite &siteTo) const
 Determine whether the lattice bond is connecting two specified sites, checking also the orientation of the bond. More...
 
std::vector< LatticeSitegetOtherEnd (const LatticeSite &site) const
 Given one lattice site, determine the other site which the bond is connected to. If the site is connecte to the specified lattice sites multiple times (i.e. in a lattice with a monoatomic basis), returns all other connecting sites. More...
 

Public Attributes

int fromB
 Basis index of the site from which the bond emanates.

 
int toB
 Basis index of the site which the bond connects to.

 
int da0
 Difference of the two connecting sites in units of the first Bravais lattice vector.
 
int da1
 Difference of the two connecting sites in units of the second Bravais lattice vector.
 
int da2
 Difference of the two connecting sites in units of the third Bravais lattice vector.
 

Detailed Description

Representation of a lattice bond.

Constructor & Destructor Documentation

◆ LatticeBond()

LatticeModelFactory::LatticeBond::LatticeBond ( const int  fromB,
const int  toB,
const int  da0,
const int  da1,
const int  da2 
)

Construct a well-defined lattice bond object.

Parameters
fromBBasis index of the site from which the bond emanates.
toBBasis index of the site which the bond connects to.
da0Difference of the two connecting sites in units of the first Bravais lattice vector.
da1Difference of the two connecting sites in units of the second Bravais lattice vector.
da2Difference of the two connecting sites in units of the third Bravais lattice vector.

Member Function Documentation

◆ getOtherEnd()

std::vector< LatticeSite > LatticeModelFactory::LatticeBond::getOtherEnd ( const LatticeSite site) const

Given one lattice site, determine the other site which the bond is connected to. If the site is connecte to the specified lattice sites multiple times (i.e. in a lattice with a monoatomic basis), returns all other connecting sites.

Parameters
siteFirst lattice site.
Returns
std::vector<LatticeSite> Other sites which the bond is connected to.

◆ isAttachedToSite()

bool LatticeModelFactory::LatticeBond::isAttachedToSite ( const LatticeSite site) const

Determine whether the lattice bond is attached to a specified site.

Parameters
siteSite to test.
Returns
bool Returns true if one of the ends of the lattice bond is connected the the specified site. Returns false otherwise.

◆ isConnectingFromTo()

bool LatticeModelFactory::LatticeBond::isConnectingFromTo ( const LatticeSite siteFrom,
const LatticeSite siteTo 
) const

Determine whether the lattice bond is connecting two specified sites, checking also the orientation of the bond.

Parameters
siteFromSite from which the bond should emanate.
siteToSite to which the bond should connect.
Returns
bool Returns true if the bonds connects the two sites, returns false otherwise.

◆ isConnectingSites()

bool LatticeModelFactory::LatticeBond::isConnectingSites ( const LatticeSite site1,
const LatticeSite site2 
) const

Determine whether the lattice bond is connecting two specified sites, ignoring the orientation of the bond.

Parameters
site1First lattice site.
site2Second lattice site.
Returns
bool Returns true if the bond connects the two sites, returns false otherwise.

The documentation for this struct was generated from the following files: