ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
read_atoms_helper.h
Go to the documentation of this file.
1#ifndef READ_ATOMS_HELPER_H
2#define READ_ATOMS_HELPER_H
3
4#include <fstream>
5#include <string>
6#include "unitcell.h"
9
10namespace unitcell {
11
18bool validate_coordinate_system(const std::string& Coordinate,
19 std::ofstream& ofs_warning);
20
27void allocate_atom_properties(Atom& atom, int na, double mass);
28
35void set_atom_movement_flags(Atom& atom, int ia,
36 const ModuleBase::Vector3<int>& mv);
37
44void autoset_magnetization(UnitCell& ucell, int nspin,
45 std::ofstream& ofs_running);
46
55 std::ofstream& ofs_running,
56 std::ofstream& ofs_warning);
57
65 const ModuleBase::Matrix3& latvec,
66 const std::string& center_mode);
67
78void transform_atom_coordinates(Atom& atom, int ia,
79 const std::string& Coordinate,
81 const ModuleBase::Matrix3& latvec,
82 double lat0,
84
95void process_magnetization(Atom& atom, int it, int ia,
96 int nspin, bool input_vec_mag,
97 bool input_angle_mag,
98 std::ofstream& ofs_running);
99
111bool parse_atom_properties(std::ifstream& ifpos,
112 Atom& atom, int ia,
114 bool& input_vec_mag,
115 bool& input_angle_mag,
116 bool& set_element_mag_zero);
117
128bool read_atom_type_header(int it, UnitCell& ucell,
129 std::ifstream& ifpos,
130 std::ofstream& ofs_running,
131 std::ofstream& ofs_warning,
132 bool& set_element_mag_zero);
133
134} // namespace unitcell
135
136#endif // READ_ATOMS_HELPER_H
Definition atom_spec.h:6
3x3 matrix and related mathamatical operations
Definition matrix3.h:19
3 elements vector
Definition vector3.h:24
Definition unitcell.h:15
Definition bcast_cell.cpp:10
bool finalize_atom_positions(UnitCell &ucell, std::ofstream &ofs_running, std::ofstream &ofs_warning)
Perform final validation and output.
Definition read_atoms_helper.cpp:134
ModuleBase::Vector3< double > calculate_lattice_center(const ModuleBase::Matrix3 &latvec, const std::string &center_mode)
Calculate lattice center for different centering modes.
Definition read_atoms_helper.cpp:166
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)
Definition read_atoms_helper.cpp:349
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.
Definition read_atoms_helper.cpp:266
void allocate_atom_properties(Atom &atom, int na, double mass)
Allocate and initialize atom property vectors.
Definition read_atoms_helper.cpp:51
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)
Definition read_atoms_helper.cpp:488
bool validate_coordinate_system(const std::string &Coordinate, std::ofstream &ofs_warning)
Validate coordinate system type.
Definition read_atoms_helper.cpp:24
void set_atom_movement_flags(Atom &atom, int ia, const ModuleBase::Vector3< int > &mv)
Set atom movement constraints based on fixed_atoms parameter.
Definition read_atoms_helper.cpp:68
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.
Definition read_atoms_helper.cpp:193
void autoset_magnetization(UnitCell &ucell, int nspin, std::ofstream &ofs_running)
Set default magnetization if not explicitly specified.
Definition read_atoms_helper.cpp:82