ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions
unitcell Namespace Reference

Functions

void bcast_atoms_tau (Atom *atoms, const int ntype)
 broadcast the tau array of the atoms
 
void bcast_atoms_pseudo (Atom *atoms, const int ntype)
 broadcast the pseduo of the atoms
 
void bcast_Lattice (Lattice &lat)
 broadcast the lattice
 
void bcast_magnetism (Magnetism &magnet, const int ntype)
 broadcast the magnetism
 
void bcast_unitcell (UnitCell &ucell)
 broadcast the unitcell
 
void check_atomic_stru (UnitCell &ucell, const double &factor)
 
void print_tau (Atom *atoms, const std::string &Coordinate, const int ntype, const double lat0, std::ofstream &ofs)
 
void print_stru_file (const UnitCell &ucell, const Atom *atoms, const ModuleBase::Matrix3 &latvec, const std::string &fn, const int &nspin=1, const bool &direct=false, const bool &vel=false, const bool &magmom=false, const bool &orb=false, const bool &dpks_desc=false, const int &iproc=0)
 UnitCell class is too heavy, this function would be moved elsewhere. Print STRU file respect to given setting.
 
bool read_atom_species (std::ifstream &ifa, std::ofstream &ofs_running, UnitCell &ucell)
 
bool read_lattice_constant (std::ifstream &ifa, std::ofstream &ofs_running, Lattice &lat)
 
bool check_tau (const Atom *atoms, const int &ntype, const double &lat0)
 
void check_dtau (Atom *atoms, const int &ntype, const double &lat0, ModuleBase::Matrix3 &latvec)
 
bool read_atom_positions (UnitCell &ucell, std::ifstream &ifpos, std::ofstream &ofs_running, std::ofstream &ofs_warning)
 
void remake_cell (Lattice &lat)
 
void setup_cell_after_vc (UnitCell &ucell, std::ofstream &log)
 
void update_pos_tau (const Lattice &lat, const double *pos, const int ntype, const int nat, Atom *atoms)
 update the position and tau of the atoms
 
void update_pos_taud (const Lattice &lat, const double *posd_in, const int ntype, const int nat, Atom *atoms)
 update the position and tau of the atoms
 
void update_pos_taud (const Lattice &lat, const ModuleBase::Vector3< double > *posd_in, const int ntype, const int nat, Atom *atoms)
 update the velocity of the atoms
 
void update_vel (const ModuleBase::Vector3< double > *vel_in, const int ntype, const int nat, Atom *atoms)
 update the velocity of the atoms
 
void periodic_boundary_adjustment (Atom *atoms, const ModuleBase::Matrix3 &latvec, const int ntype)
 check the boundary of the cell, for each atom,the taud in three directions should be in the range of [-1,1)
 

Function Documentation

◆ bcast_atoms_pseudo()

void unitcell::bcast_atoms_pseudo ( Atom atoms,
const int  ntype 
)

broadcast the pseduo of the atoms

Parameters
atomsthe atoms to be broadcasted [in/out]
ntypethe number of types of the atoms [in]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bcast_atoms_tau()

void unitcell::bcast_atoms_tau ( Atom atoms,
const int  ntype 
)

broadcast the tau array of the atoms

Parameters
atomsthe atoms to be broadcasted [in/out]
ntypethe number of types of the atoms [in]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bcast_Lattice()

void unitcell::bcast_Lattice ( Lattice lat)

broadcast the lattice

Parameters
latthe lattice to be broadcasted [in/out]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bcast_magnetism()

void unitcell::bcast_magnetism ( Magnetism magnet,
const int  ntype 
)

broadcast the magnetism

Parameters
magnetthe magnetism to be broadcasted [in/out]
nytpethe number of types of the atoms [in]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bcast_unitcell()

void unitcell::bcast_unitcell ( UnitCell ucell)

broadcast the unitcell

Parameters
ucellthe unitcell to be broadcasted [in/out]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_atomic_stru()

void unitcell::check_atomic_stru ( UnitCell ucell,
const double &  factor 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_dtau()

void unitcell::check_dtau ( Atom atoms,
const int &  ntype,
const double &  lat0,
ModuleBase::Matrix3 latvec 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_tau()

bool unitcell::check_tau ( const Atom atoms,
const int &  ntype,
const double &  lat0 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ periodic_boundary_adjustment()

void unitcell::periodic_boundary_adjustment ( Atom atoms,
const ModuleBase::Matrix3 latvec,
const int  ntype 
)

check the boundary of the cell, for each atom,the taud in three directions should be in the range of [-1,1)

Parameters
atomsthe atoms to be adjusted [in]
latvecthe lattice of the atoms [in]
ntypethe number of types of the atoms [in]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_stru_file()

void unitcell::print_stru_file ( const UnitCell ucell,
const Atom atoms,
const ModuleBase::Matrix3 latvec,
const std::string &  fn,
const int &  nspin = 1,
const bool &  direct = false,
const bool &  vel = false,
const bool &  magmom = false,
const bool &  orb = false,
const bool &  dpks_desc = false,
const int &  iproc = 0 
)

UnitCell class is too heavy, this function would be moved elsewhere. Print STRU file respect to given setting.

Parameters
ucellreference of unitcell
atomsAtom list
latveclattice const parmater vector
fnSTRU file name
nspinPARAM.inp.nspin feed in
directtrue for direct coords, false for cartesian coords
voltrue for printing velocities
magmomtrue for printing Mulliken population analysis produced magmom
orbtrue for printing NUMERICAL_ORBITAL section
dpks_desctrue for printing NUMERICAL_DESCRIPTOR section
iprocGlobalV::MY_RANK feed in
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_tau()

void unitcell::print_tau ( Atom atoms,
const std::string &  Coordinate,
const int  ntype,
const double  lat0,
std::ofstream &  ofs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_atom_positions()

bool unitcell::read_atom_positions ( UnitCell ucell,
std::ifstream &  ifpos,
std::ofstream &  ofs_running,
std::ofstream &  ofs_warning 
)

liuyu update 2023-05-11 In order to employ the DP model as esolver, all atom types must be specified in the STRU in the order consistent with that of the DP model, even if the number of ucell.atoms is zero!

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_atom_species()

bool unitcell::read_atom_species ( std::ifstream &  ifa,
std::ofstream &  ofs_running,
UnitCell ucell 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_lattice_constant()

bool unitcell::read_lattice_constant ( std::ifstream &  ifa,
std::ofstream &  ofs_running,
Lattice lat 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remake_cell()

void unitcell::remake_cell ( Lattice lat)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_cell_after_vc()

void unitcell::setup_cell_after_vc ( UnitCell ucell,
std::ofstream &  log 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_pos_tau()

void unitcell::update_pos_tau ( const Lattice lat,
const double *  pos,
const int  ntype,
const int  nat,
Atom atoms 
)

update the position and tau of the atoms

Parameters
latthe lattice of the atoms [in]
posthe position of the atoms [in]
ntypethe number of types of the atoms [in]
natthe number of atoms [in]
atomsthe atoms to be updated [out]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_pos_taud() [1/2]

void unitcell::update_pos_taud ( const Lattice lat,
const double *  posd_in,
const int  ntype,
const int  nat,
Atom atoms 
)

update the position and tau of the atoms

Parameters
latthe lattice of the atoms [in]
pos_inthe position of the atoms in direct coordinate system [in]
ntypethe number of types of the atoms [in]
natthe number of atoms [in]
atomsthe atoms to be updated [out]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_pos_taud() [2/2]

void unitcell::update_pos_taud ( const Lattice lat,
const ModuleBase::Vector3< double > *  posd_in,
const int  ntype,
const int  nat,
Atom atoms 
)

update the velocity of the atoms

Parameters
latthe lattice of the atoms [in]
pos_inthe position of the atoms in direct coordinate system in ModuleBase::Vector3 version [in]
ntypethe number of types of the atoms [in]
natthe number of atoms [in]
atomsthe atoms to be updated [out]
Here is the call graph for this function:

◆ update_vel()

void unitcell::update_vel ( const ModuleBase::Vector3< double > *  vel_in,
const int  ntype,
const int  nat,
Atom atoms 
)

update the velocity of the atoms

Parameters
vel_inthe velocity of the atoms [in]
ntypethe number of types of the atoms [in]
natthe number of atoms [in]
atomsthe atoms to be updated [out]
Here is the caller graph for this function: