32 throw std::runtime_error(
"Report bug! structure_factor_ has already been created. Unexpected call sequence.");
41 app_log() <<
"\n Creating Structure Factor for periodic systems " << LRBox.LR_kc << std::endl;
48 if (beforemass == massind)
50 app_log() <<
" ParticleSet::createSK setting mass of " <<
getName() <<
" to 1.0" << std::endl;
65 throw std::runtime_error(
"ParticleSet::turnOnPerParticleSK trying to turn on per particle storage in " 66 "structure_factor_ but structure_factor_ has not been created.");
71 bool isPerParticleOn =
false;
74 return isPerParticleOn;
79 if (pin.getUnit() == pout.getUnit())
147 throw std::runtime_error(
"Unknown unit conversion");
156 throw std::runtime_error(
"Unknown unit conversion");
159 throw std::runtime_error(
"Unknown unit conversion");
178 for (
int i = 0; i < pinout.size(); ++i)
a class that defines a supercell in D-dimensional Euclean space.
int numAttributes() const
return the number of attributes in our list
const auto & getLRBox() const
int SuperCellEnum
supercell enumeration
void convert2UnitInBox(const ParticlePos &pint, ParticlePos &pout)
const std::string & getName() const
return the name
helper functions for EinsplineSetBuilder
void applyMinimumImage(ParticlePos &pinout) const
Dummy template class to be specialized.
const KContainer & getKLists() const
access k_lists_ read only
size_t TotalNum
total number of particles
Dummy template class to apply boundary conditions.
void applyBC(const ParticlePos &pin, ParticlePos &pout)
int first(int igroup) const
return the first index of a group i
int addAttribute(const std::string &aname)
for a new attribute, allocate the data, !More often used to get the index of a species ...
void convert2Unit(const ParticlePos &pin, ParticlePos &pout)
ParticleIndex GroupID
Species ID.
int getTotalNum() const
return the number of species
std::unique_ptr< StructFact > structure_factor_
Structure factor.
void turnOnPerParticleSK()
Turn on per particle storage in Structure Factor.
size_type size() const
return the current size
template functions to support conversion and handling of boundary conditions.
ParticleGradient G
gradients of the particles
void convert2Cart(const ParticlePos &pin, ParticlePos &pout)
int last(int igroup) const
return the last index of a group i
std::unique_ptr< DynamicCoordinates > coordinates_
internal representation of R. It can be an SoA copy of R
SpeciesSet my_species_
SpeciesSet of particles.
void convert(const ParticlePos &pin, ParticlePos &pout)
void put2box(ParticleAttrib< TinyVector< T, D >> &inout)
inout[i]=inout[i]-floor(inout[i])
ParticleScalar Mass
mass of each particle
bool getPerParticleSKState() const
Get state (on/off) of per particle storage in Structure Factor.
const auto & getLattice() const
void createSK()
create Structure Factor with PBCs
bool explicitly_defined
true, the lattice is defined by the input instead of an artificial default
const SimulationCell & simulation_cell_
reference to global simulation cell
void convert2CartInBox(const ParticlePos &pint, ParticlePos &pout)