ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cube_io.h File Reference
#include "source_cell/unitcell.h"
#include "spin_tag.h"
#include <fstream>
#include <string>
#include <vector>
Include dependency graph for cube_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ModuleIO
 Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in each anonymous namespace) so the header layout, R records and file-append rules cannot diverge between hs_sparse_io.cpp, dhs_sparse_writer.cpp, pos_op_csr.cpp, hsr_writer.cpp and write_dmr.cpp.

Functions

std::string ModuleIO::make_data_desc (const std::string &base, const std::string &mag_base, const int is, const int nspin)
bool ModuleIO::read_vdata_palgrid (const Parallel_Grid &pgrid, const int my_rank, std::ostream &ofs_running, const std::string &fn, double *const data, const int nat)
 read volumetric data from .cube file into the parallel distributed grid.
void ModuleIO::write_vdata_palgrid (const Parallel_Grid &pgrid, const double *const data, const int is, const int nspin, const int iter, const std::string &fn, const double ef, const UnitCell *const ucell, const int precision, const int out_fermi, const bool two_fermi, const bool reduce_all_pool, const bool append, std::ofstream &ofs_running, const std::string &data_desc)
bool ModuleIO::read_cube (const std::string &file, std::vector< std::string > &comment, int &natom, std::vector< double > &origin, int &nx, int &ny, int &nz, std::vector< double > &dx, std::vector< double > &dy, std::vector< double > &dz, std::vector< int > &atom_type, std::vector< double > &atom_charge, std::vector< std::vector< double > > &atom_pos, std::vector< double > &data)
 read the full data from a cube file
void ModuleIO::write_cube (const std::string &file, const std::vector< std::string > &comment, const int &natom, const std::vector< double > &origin, const int &nx, const int &ny, const int &nz, const std::vector< double > &dx, const std::vector< double > &dy, const std::vector< double > &dz, const std::vector< int > &atom_type, const std::vector< double > &atom_charge, const std::vector< std::vector< double > > &atom_pos, const std::vector< double > &data, const int precision, const bool append, const int ndata_line=6)
void ModuleIO::write_cube_header (std::ofstream &ofs, const std::vector< std::string > &comment, const int &natom, const std::vector< double > &origin, const int &nx, const int &ny, const int &nz, const std::vector< double > &dx, const std::vector< double > &dy, const std::vector< double > &dz, const std::vector< int > &atom_type, const std::vector< double > &atom_charge, const std::vector< std::vector< double > > &atom_pos, const int precision)
void ModuleIO::write_cube_header_for_cell (std::ofstream &ofs, const UnitCell &ucell, const int nx, const int ny, const int nz, const std::vector< std::string > &comment, const int precision)
void ModuleIO::trilinear_interpolate (const double *const data_in, const int &nx_read, const int &ny_read, const int &nz_read, const int &nx, const int &ny, const int &nz, double *data_out)
 The trilinear interpolation method.