ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
MDCell Class Reference

#include <mdcell.h>

Inheritance diagram for MDCell:
Collaboration diagram for MDCell:

Public Member Functions

 MDCell ()
 ~MDCell ()
 MDCell (MDCell &&)
 MDCell (const MDCell &)=delete
MDCell & operator= (const MDCell &)=delete
MDCell & operator= (MDCell &&)
void initialize_from_owned_atoms (const ModuleBase::Matrix3 &latvec, const ModuleBase::Matrix3 &gt, double lat0, double omega, std::int64_t nat, const std::vector< LocalAtom > &owned_atoms, const std::vector< std::string > &type_labels, const std::vector< double > &type_masses, const std::vector< std::int64_t > &type_atom_counts, double skin, const ModuleBase::CommunicationDomain &comm_domain)
void set_neighbor_cutoff (double cutoff)
bool has_neighbor_search () const
const NeighborSearch & neighbor_search () const
void set_lattice_geometry (const ModuleBase::Matrix3 &latvec, double lat0)
void refresh_cart_from_frac ()
void sync_backing_unitcell (const bool positions_updated)
 Copy state; mark a position update only when requested, otherwise preserve the flag.
std::vector< LocalAtom > & owned_atoms ()
const std::vector< LocalAtom > & owned_atoms () const
std::vector< LocalAtom > & ghost_atoms ()
const std::vector< LocalAtom > & ghost_atoms () const
const std::vector< std::string > & type_labels () const
const std::vector< double > & type_masses () const
const std::vector< std::int64_t > & type_atom_counts () const
const GhostExchangePlan & get_ghost_exchange_plan () const
GhostExchangePlan & get_ghost_exchange_plan ()
StruMeta & mutable_stru_meta ()
const StruMeta & stru_meta () const
int nowned_atoms () const
int nghost () const
double cutoff () const
bool has_backing_unitcell () const
void set_backing_unitcell (UnitCell &ucell)
UnitCell & backing_unitcell ()
const UnitCell & backing_unitcell () const
int mpi_rank () const
int mpi_size () const
MPI_Comm communicator () const
Public Member Functions inherited from BaseCell
virtual ~BaseCell ()=default
Kind kind () const
std::int64_t nat () const
double lat0 () const
double omega () const
const ModuleBase::Matrix3 & latvec () const
const ModuleBase::Matrix3 & GT () const
void require_kind (const Kind &expected, const char *caller) const

Private Member Functions

Kind get_kind () const override
std::int64_t get_nat () const override
double get_lat0 () const override
double get_omega () const override
const ModuleBase::Matrix3 & get_latvec () const override
const ModuleBase::Matrix3 & get_GT () const override
void clear_ghost_exchange_plan_ ()
void set_ghost_exchange_plan_ (const GhostExchangePlan &plan)
void sync_backing_unitcell_geometry_ ()
void clear_forces_ (std::vector< LocalAtom > &atoms)

Static Private Member Functions

static double wrap_fractional_ (double value)

Private Attributes

std::int64_t nat_ = 0
double lat0_ = 0.0
double omega_ = 0.0
ModuleBase::Matrix3 latvec_
ModuleBase::Matrix3 gt_
std::vector< LocalAtom > owned_atoms_
std::vector< LocalAtom > ghost_atoms_
std::vector< std::string > type_labels_
std::vector< double > type_masses_
std::vector< std::int64_t > type_atom_counts_
StruMeta stru_meta_
UnitCell * backing_unitcell_ = nullptr
double cutoff_ = 0.0
double skin_ = 0.0
std::unique_ptr< NeighborSearch > neighbor_search_
std::vector< ModuleBase::Vector3< double > > neighbor_reference_frac_
bool neighbor_layout_valid_ = false
GhostExchangePlan ghost_exchange_plan_
bool ghost_exchange_plan_valid_ = false
MPI_Comm comm_ = MPI_COMM_NULL
int rank_ = 0
int size_ = 1

Friends

class DomainDecomposition

Additional Inherited Members

Public Types inherited from BaseCell
enum class  Kind { unitcell , mdcell }

Constructor & Destructor Documentation

◆ MDCell() [1/3]

MDCell::MDCell ( )
default
Here is the caller graph for this function:

◆ ~MDCell()

MDCell::~MDCell ( )
default

◆ MDCell() [2/3]

MDCell::MDCell ( MDCell && )
default
Here is the call graph for this function:

◆ MDCell() [3/3]

MDCell::MDCell ( const MDCell & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ backing_unitcell() [1/2]

UnitCell & MDCell::backing_unitcell ( )

◆ backing_unitcell() [2/2]

const UnitCell & MDCell::backing_unitcell ( ) const

◆ clear_forces_()

void MDCell::clear_forces_ ( std::vector< LocalAtom > & atoms)
private
Here is the caller graph for this function:

◆ clear_ghost_exchange_plan_()

void MDCell::clear_ghost_exchange_plan_ ( )
private
Here is the caller graph for this function:

◆ communicator()

MPI_Comm MDCell::communicator ( ) const
inline
Here is the caller graph for this function:

◆ cutoff()

double MDCell::cutoff ( ) const
inline
Here is the caller graph for this function:

◆ get_ghost_exchange_plan() [1/2]

GhostExchangePlan & MDCell::get_ghost_exchange_plan ( )
Here is the call graph for this function:

◆ get_ghost_exchange_plan() [2/2]

const GhostExchangePlan & MDCell::get_ghost_exchange_plan ( ) const

◆ get_GT()

const ModuleBase::Matrix3 & MDCell::get_GT ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ get_kind()

BaseCell::Kind MDCell::get_kind ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ get_lat0()

double MDCell::get_lat0 ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ get_latvec()

const ModuleBase::Matrix3 & MDCell::get_latvec ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ get_nat()

std::int64_t MDCell::get_nat ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ get_omega()

double MDCell::get_omega ( ) const
overrideprivatevirtual

Implements BaseCell.

◆ ghost_atoms() [1/2]

std::vector< LocalAtom > & MDCell::ghost_atoms ( )
inline
Here is the caller graph for this function:

◆ ghost_atoms() [2/2]

const std::vector< LocalAtom > & MDCell::ghost_atoms ( ) const
inline

◆ has_backing_unitcell()

bool MDCell::has_backing_unitcell ( ) const
inline

◆ has_neighbor_search()

bool MDCell::has_neighbor_search ( ) const

◆ initialize_from_owned_atoms()

void MDCell::initialize_from_owned_atoms ( const ModuleBase::Matrix3 & latvec,
const ModuleBase::Matrix3 & gt,
double lat0,
double omega,
std::int64_t nat,
const std::vector< LocalAtom > & owned_atoms,
const std::vector< std::string > & type_labels,
const std::vector< double > & type_masses,
const std::vector< std::int64_t > & type_atom_counts,
double skin,
const ModuleBase::CommunicationDomain & comm_domain )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mpi_rank()

int MDCell::mpi_rank ( ) const

◆ mpi_size()

int MDCell::mpi_size ( ) const

◆ mutable_stru_meta()

StruMeta & MDCell::mutable_stru_meta ( )
inline

◆ neighbor_search()

const NeighborSearch & MDCell::neighbor_search ( ) const

◆ nghost()

int MDCell::nghost ( ) const
inline

◆ nowned_atoms()

int MDCell::nowned_atoms ( ) const
inline

◆ operator=() [1/2]

MDCell & MDCell::operator= ( const MDCell & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

MDCell & MDCell::operator= ( MDCell && )
default
Here is the call graph for this function:

◆ owned_atoms() [1/2]

std::vector< LocalAtom > & MDCell::owned_atoms ( )
inline
Here is the caller graph for this function:

◆ owned_atoms() [2/2]

const std::vector< LocalAtom > & MDCell::owned_atoms ( ) const
inline

◆ refresh_cart_from_frac()

void MDCell::refresh_cart_from_frac ( )
Here is the call graph for this function:

◆ set_backing_unitcell()

void MDCell::set_backing_unitcell ( UnitCell & ucell)

◆ set_ghost_exchange_plan_()

void MDCell::set_ghost_exchange_plan_ ( const GhostExchangePlan & plan)
private
Here is the caller graph for this function:

◆ set_lattice_geometry()

void MDCell::set_lattice_geometry ( const ModuleBase::Matrix3 & latvec,
double lat0 )
Here is the call graph for this function:

◆ set_neighbor_cutoff()

void MDCell::set_neighbor_cutoff ( double cutoff)
Here is the call graph for this function:

◆ stru_meta()

const StruMeta & MDCell::stru_meta ( ) const
inline

◆ sync_backing_unitcell()

void MDCell::sync_backing_unitcell ( const bool positions_updated)

Copy state; mark a position update only when requested, otherwise preserve the flag.

Here is the call graph for this function:

◆ sync_backing_unitcell_geometry_()

void MDCell::sync_backing_unitcell_geometry_ ( )
private
Here is the caller graph for this function:

◆ type_atom_counts()

const std::vector< std::int64_t > & MDCell::type_atom_counts ( ) const
inline
Here is the caller graph for this function:

◆ type_labels()

const std::vector< std::string > & MDCell::type_labels ( ) const
inline
Here is the caller graph for this function:

◆ type_masses()

const std::vector< double > & MDCell::type_masses ( ) const
inline
Here is the caller graph for this function:

◆ wrap_fractional_()

double MDCell::wrap_fractional_ ( double value)
staticprivate
Here is the caller graph for this function:

◆ DomainDecomposition

friend class DomainDecomposition
friend

Member Data Documentation

◆ backing_unitcell_

UnitCell* MDCell::backing_unitcell_ = nullptr
private

◆ comm_

MPI_Comm MDCell::comm_ = MPI_COMM_NULL
private

◆ cutoff_

double MDCell::cutoff_ = 0.0
private

◆ ghost_atoms_

std::vector<LocalAtom> MDCell::ghost_atoms_
private

◆ ghost_exchange_plan_

GhostExchangePlan MDCell::ghost_exchange_plan_
private

◆ ghost_exchange_plan_valid_

bool MDCell::ghost_exchange_plan_valid_ = false
private

◆ gt_

ModuleBase::Matrix3 MDCell::gt_
private

◆ lat0_

double MDCell::lat0_ = 0.0
private

◆ latvec_

ModuleBase::Matrix3 MDCell::latvec_
private

◆ nat_

std::int64_t MDCell::nat_ = 0
private

◆ neighbor_layout_valid_

bool MDCell::neighbor_layout_valid_ = false
private

◆ neighbor_reference_frac_

std::vector<ModuleBase::Vector3<double> > MDCell::neighbor_reference_frac_
private

◆ neighbor_search_

std::unique_ptr<NeighborSearch> MDCell::neighbor_search_
private

◆ omega_

double MDCell::omega_ = 0.0
private

◆ owned_atoms_

std::vector<LocalAtom> MDCell::owned_atoms_
private

◆ rank_

int MDCell::rank_ = 0
private

◆ size_

int MDCell::size_ = 1
private

◆ skin_

double MDCell::skin_ = 0.0
private

◆ stru_meta_

StruMeta MDCell::stru_meta_
private

◆ type_atom_counts_

std::vector<std::int64_t> MDCell::type_atom_counts_
private

◆ type_labels_

std::vector<std::string> MDCell::type_labels_
private

◆ type_masses_

std::vector<double> MDCell::type_masses_
private

The documentation for this class was generated from the following files: