ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cell_tools.h File Reference

Free function tools for extracting cell/atom information. More...

#include <string>
#include <vector>
#include "source_base/vector3.h"
#include "source_cell/atom_spec.h"
Include dependency graph for cell_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  unitcell::AtomData
 Cartesian atom information in type-major order, matching ABACUS atom indices. More...

Namespaces

namespace  unitcell
 Free functions for extracting atom/orbital info from Atom array.

Functions

int unitcell::pseudo_atom_z (const Atom &atom)
std::vector< AtomData > unitcell::get_atom_data (const Atom *atoms, const int ntype, const double lattice_scale)
std::vector< std::string > unitcell::get_atomLabels (const Atom *atoms, const int ntype)
 Get atom labels for each atom type.
std::vector< int > unitcell::get_atomCounts (const Atom *atoms, const int ntype)
 Get atom counts (number of atoms) for each atom type.
std::vector< std::vector< int > > unitcell::get_lnchiCounts (const Atom *atoms, const int ntype)
 Get lnchi counts (number of chi functions per L) for each atom type.
std::vector< ModuleBase::Vector3< double > > unitcell::get_target_mag (const Atom *atoms, const int ntype, const int nat)
 Get target magnetic moment for each atom (used by deltaspin).
std::vector< ModuleBase::Vector3< double > > unitcell::get_lambda (const Atom *atoms, const int ntype, const int nat)
 Get Lagrange multiplier for each atom (used by deltaspin).
std::vector< ModuleBase::Vector3< int > > unitcell::get_constrain (const Atom *atoms, const int ntype, const int nat)
 Get constrain flag for each atom (used by deltaspin).
bool unitcell::if_atoms_can_move (const Atom *atoms, const int ntype)
 Judge if any atom can move (any mbl component is non-zero).
bool unitcell::if_cell_can_change (const std::vector< int > &lat_axis_free)
 Judge if any lattice vector can change.

Detailed Description

Free function tools for extracting cell/atom information.