|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
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 | validate_coordinate_system (const std::string &Coordinate, std::ofstream &ofs_warning) |
| Validate coordinate system type. | |
| void | allocate_atom_properties (Atom &atom, int na, double mass) |
| Allocate and initialize atom property vectors. | |
| void | set_atom_movement_flags (Atom &atom, int ia, const ModuleBase::Vector3< int > &mv) |
| Set atom movement constraints based on fixed_atoms parameter. | |
| void | autoset_magnetization (UnitCell &ucell, int nspin, std::ofstream &ofs_running) |
| Set default magnetization if not explicitly specified. | |
| bool | finalize_atom_positions (UnitCell &ucell, std::ofstream &ofs_running, std::ofstream &ofs_warning) |
| Perform final validation and output. | |
| ModuleBase::Vector3< double > | calculate_lattice_center (const ModuleBase::Matrix3 &latvec, const std::string ¢er_mode) |
| Calculate lattice center for different centering modes. | |
| void | transform_atom_coordinates (Atom &atom, int ia, const std::string &Coordinate, const ModuleBase::Vector3< double > &v, const ModuleBase::Matrix3 &latvec, double lat0, ModuleBase::Vector3< double > &latcenter) |
| Convert between different coordinate systems. | |
| void | process_magnetization (Atom &atom, int it, int ia, int nspin, bool input_vec_mag, bool input_angle_mag, std::ofstream &ofs_running) |
| Convert between magnetization representations and output. | |
| bool | parse_atom_properties (std::ifstream &ifpos, Atom &atom, int ia, ModuleBase::Vector3< int > &mv, bool &input_vec_mag, bool &input_angle_mag, bool &set_element_mag_zero) |
| Parse optional atom properties (mag, angle1, angle2, lambda, sc, m, v) | |
| bool | read_atom_type_header (int it, UnitCell &ucell, std::ifstream &ifpos, std::ofstream &ofs_running, std::ofstream &ofs_warning, bool &set_element_mag_zero) |
| Read atom type metadata (label, magnetization, orbital info, atom count) | |
| 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) | |
| void | reset_remake_cell_mock () |
| bool | was_remake_cell_called () |
| void unitcell::allocate_atom_properties | ( | Atom & | atom, |
| int | na, | ||
| double | mass | ||
| ) |
Allocate and initialize atom property vectors.
| atom | The atom object to allocate properties for |
| na | Number of atoms |
| mass | Atomic mass |
| void unitcell::autoset_magnetization | ( | UnitCell & | ucell, |
| int | nspin, | ||
| std::ofstream & | ofs_running | ||
| ) |
Set default magnetization if not explicitly specified.
| ucell | Unit cell object |
| nspin | Number of spin components |
| ofs_running | Output stream for running information |
| void unitcell::bcast_atoms_pseudo | ( | Atom * | atoms, |
| const int | ntype | ||
| ) |
broadcast the pseduo of the atoms
| atoms | the atoms to be broadcasted [in/out] |
| ntype | the number of types of the atoms [in] |
| void unitcell::bcast_atoms_tau | ( | Atom * | atoms, |
| const int | ntype | ||
| ) |
broadcast the tau array of the atoms
| atoms | the atoms to be broadcasted [in/out] |
| ntype | the number of types of the atoms [in] |
| void unitcell::bcast_Lattice | ( | Lattice & | lat | ) |
broadcast the lattice
| lat | the lattice to be broadcasted [in/out] |
| void unitcell::bcast_magnetism | ( | Magnetism & | magnet, |
| const int | ntype | ||
| ) |
broadcast the magnetism
| magnet | the magnetism to be broadcasted [in/out] |
| nytpe | the number of types of the atoms [in] |
| void unitcell::bcast_unitcell | ( | UnitCell & | ucell | ) |
broadcast the unitcell
| ucell | the unitcell to be broadcasted [in/out] |
| ModuleBase::Vector3< double > unitcell::calculate_lattice_center | ( | const ModuleBase::Matrix3 & | latvec, |
| const std::string & | center_mode | ||
| ) |
| void unitcell::check_atomic_stru | ( | UnitCell & | ucell, |
| const double & | factor | ||
| ) |
| void unitcell::check_dtau | ( | Atom * | atoms, |
| const int & | ntype, | ||
| const double & | lat0, | ||
| ModuleBase::Matrix3 & | latvec | ||
| ) |
| bool unitcell::check_tau | ( | const Atom * | atoms, |
| const int & | ntype, | ||
| const double & | lat0 | ||
| ) |
| bool unitcell::finalize_atom_positions | ( | UnitCell & | ucell, |
| std::ofstream & | ofs_running, | ||
| std::ofstream & | ofs_warning | ||
| ) |
Perform final validation and output.
| ucell | Unit cell object |
| ofs_running | Output stream for running information |
| ofs_warning | Output stream for warnings |
| bool unitcell::parse_atom_properties | ( | std::ifstream & | ifpos, |
| Atom & | atom, | ||
| int | ia, | ||
| ModuleBase::Vector3< int > & | mv, | ||
| bool & | input_vec_mag, | ||
| bool & | input_angle_mag, | ||
| bool & | set_element_mag_zero | ||
| ) |
Parse optional atom properties (mag, angle1, angle2, lambda, sc, m, v)
| ifpos | Input file stream |
| atom | The atom object |
| ia | Atom index |
| mv | Movement vector (output parameter) |
| input_vec_mag | Whether vector magnetization was input (output parameter) |
| input_angle_mag | Whether angle magnetization was input (output parameter) |
| set_element_mag_zero | Whether to reset element magnetization (output parameter) |
| 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)
| atoms | the atoms to be adjusted [in] |
| latvec | the lattice of the atoms [in] |
| ntype | the number of types of the atoms [in] |
| 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.
| ucell | reference of unitcell |
| atoms | Atom list |
| latvec | lattice const parmater vector |
| fn | STRU file name |
| nspin | PARAM.inp.nspin feed in |
| direct | true for direct coords, false for cartesian coords |
| vol | true for printing velocities |
| magmom | true for printing Mulliken population analysis produced magmom |
| orb | true for printing NUMERICAL_ORBITAL section |
| dpks_desc | true for printing NUMERICAL_DESCRIPTOR section |
| iproc | GlobalV::MY_RANK feed in |
| void unitcell::print_tau | ( | Atom * | atoms, |
| const std::string & | Coordinate, | ||
| const int | ntype, | ||
| const double | lat0, | ||
| std::ofstream & | ofs | ||
| ) |
| void unitcell::process_magnetization | ( | Atom & | atom, |
| int | it, | ||
| int | ia, | ||
| int | nspin, | ||
| bool | input_vec_mag, | ||
| bool | input_angle_mag, | ||
| std::ofstream & | ofs_running | ||
| ) |
Convert between magnetization representations and output.
| atom | The atom object |
| it | Atom type index |
| ia | Atom index |
| nspin | Number of spin components |
| input_vec_mag | Whether vector magnetization was input |
| input_angle_mag | Whether angle magnetization was input |
| ofs_running | Output stream for running information |
| bool unitcell::read_atom_positions | ( | UnitCell & | ucell, |
| std::ifstream & | ifpos, | ||
| std::ofstream & | ofs_running, | ||
| std::ofstream & | ofs_warning | ||
| ) |
| bool unitcell::read_atom_species | ( | std::ifstream & | ifa, |
| std::ofstream & | ofs_running, | ||
| UnitCell & | ucell | ||
| ) |
| bool unitcell::read_atom_type_header | ( | int | it, |
| UnitCell & | ucell, | ||
| std::ifstream & | ifpos, | ||
| std::ofstream & | ofs_running, | ||
| std::ofstream & | ofs_warning, | ||
| bool & | set_element_mag_zero | ||
| ) |
Read atom type metadata (label, magnetization, orbital info, atom count)
| it | Atom type index |
| ucell | Unit cell object |
| ifpos | Input file stream |
| ofs_running | Output stream for running information |
| ofs_warning | Output stream for warnings |
| set_element_mag_zero | Whether to reset element magnetization (output parameter) |
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!
| bool unitcell::read_lattice_constant | ( | std::ifstream & | ifa, |
| std::ofstream & | ofs_running, | ||
| Lattice & | lat | ||
| ) |
| void unitcell::remake_cell | ( | Lattice & | lat | ) |
| void unitcell::reset_remake_cell_mock | ( | ) |
| void unitcell::set_atom_movement_flags | ( | Atom & | atom, |
| int | ia, | ||
| const ModuleBase::Vector3< int > & | mv | ||
| ) |
Set atom movement constraints based on fixed_atoms parameter.
| atom | The atom object |
| ia | Atom index |
| mv | Movement vector (1=movable, 0=fixed) |
| void unitcell::setup_cell_after_vc | ( | UnitCell & | ucell, |
| std::ofstream & | log | ||
| ) |
| void unitcell::transform_atom_coordinates | ( | Atom & | atom, |
| int | ia, | ||
| const std::string & | Coordinate, | ||
| const ModuleBase::Vector3< double > & | v, | ||
| const ModuleBase::Matrix3 & | latvec, | ||
| double | lat0, | ||
| ModuleBase::Vector3< double > & | latcenter | ||
| ) |
Convert between different coordinate systems.
| atom | The atom object |
| ia | Atom index |
| Coordinate | Coordinate system type |
| v | Input position vector |
| latvec | Lattice vectors |
| lat0 | Lattice constant |
| latcenter | Lattice center (output parameter) |
| 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
| lat | the lattice of the atoms [in] |
| pos | the position of the atoms [in] |
| ntype | the number of types of the atoms [in] |
| nat | the number of atoms [in] |
| atoms | the atoms to be updated [out] |
| 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
| lat | the lattice of the atoms [in] |
| pos_in | the position of the atoms in direct coordinate system [in] |
| ntype | the number of types of the atoms [in] |
| nat | the number of atoms [in] |
| atoms | the atoms to be updated [out] |
| 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
| lat | the lattice of the atoms [in] |
| pos_in | the position of the atoms in direct coordinate system in ModuleBase::Vector3 version [in] |
| ntype | the number of types of the atoms [in] |
| nat | the number of atoms [in] |
| atoms | the atoms to be updated [out] |
| void unitcell::update_vel | ( | const ModuleBase::Vector3< double > * | vel_in, |
| const int | ntype, | ||
| const int | nat, | ||
| Atom * | atoms | ||
| ) |
update the velocity of the atoms
| vel_in | the velocity of the atoms [in] |
| ntype | the number of types of the atoms [in] |
| nat | the number of atoms [in] |
| atoms | the atoms to be updated [out] |
| bool unitcell::validate_coordinate_system | ( | const std::string & | Coordinate, |
| std::ofstream & | ofs_warning | ||
| ) |
Validate coordinate system type.
| Coordinate | The coordinate system string to validate |
| ofs_warning | Output stream for warnings |
| bool unitcell::was_remake_cell_called | ( | ) |