occ
Loading...
Searching...
No Matches
occ::io Namespace Reference

file input and output module including reading wavefunction files More...

Namespaces

namespace  basis
 
namespace  conversion
 
namespace  crystalgrower
 
namespace  impl
 
namespace  kmcpp
 

Classes

struct  AdaptiveBounds
 
class  AdaptiveGridBounds
 
struct  AdpData
 
struct  AtomData
 
struct  BasisSetInput
 
struct  CellData
 
class  CifParser
 
class  CifWriter
 Writer class for crystallographic information files (CIF) More...
 
struct  ColumnConfiguration
 
struct  COSXSettings
 
struct  CrystalInput
 
class  Cube
 
class  DftbGenFormat
 
struct  DispersionCorrectionInput
 
struct  DriverInput
 
struct  ElectronInput
 
class  EngradReader
 
class  FchkReader
 
class  FchkWriter
 
struct  GaussianInputFile
 
struct  GeometryInput
 
class  GMFWriter
 
struct  GridFileHeader
 
struct  GridSettings
 Extended settings for Becke grid generation. More...
 
struct  GridSymmetryInfo
 
struct  IsosurfaceInput
 
struct  JsonWavefunctionReader
 
struct  JsonWavefunctionWriter
 
struct  MethodInput
 
class  MoldenReader
 
struct  OccInput
 
struct  OptimizationInput
 
class  OrcaJSONReader
 
struct  OutputInput
 
struct  PairInput
 
class  PeriodicGrid
 
struct  PointChargeFileReader
 
struct  QCSchemaBond
 
struct  QCSchemaInput
 
struct  QCSchemaModel
 
class  QCSchemaReader
 
struct  QCSchemaTopology
 
struct  RowConfiguration
 
struct  RuntimeInput
 
class  ShelxFile
 Unified reader/writer for SHELX .res/.ins crystallographic files. More...
 
struct  SolventInput
 
struct  SymmetryData
 
class  Table
 
struct  XyzFileReader
 

Typedefs

using Position = std::array< double, 3 >
 
using PointChargeList = std::vector< occ::core::PointCharge >
 

Enumerations

enum class  PruningScheme { None , NWChem , NumGrid }
 Enumeration of available angular pruning schemes. More...
 
enum class  GridQuality { Coarse , Standard , Fine , VeryFine }
 Standard grid quality levels (similar to Q-Chem's SG system) More...
 
enum class  COSXGridLevel { Grid1 , Grid2 , Grid3 }
 COSX/SGX grid levels matching ORCA's GRIDX scheme. More...
 
enum class  GridFormat { GeneralGrid , PeriodicGrid }
 
enum class  GridDataType { Raw , Indexed }
 
enum class  JsonFormat {
  JSON , UBJSON , CBOR , BSON ,
  MSGPACK
}
 

Functions

template<typename PropertyFunctor >
auto make_adaptive_bounds (PropertyFunctor &func, const typename AdaptiveGridBounds< PropertyFunctor >::Parameters &params={})
 
GridSettings get_grid_settings (GridQuality quality)
 Get grid settings for a specific quality level.
 
std::string grid_quality_to_string (GridQuality quality)
 Convert GridQuality enum to string.
 
GridQuality grid_quality_from_string (const std::string &str)
 Convert string to GridQuality enum.
 
std::string cosx_grid_level_to_string (COSXGridLevel level)
 Convert COSXGridLevel enum to string.
 
double cosx_grid_int_acc (COSXGridLevel level)
 Get IntAcc value for a COSX grid level.
 
size_t calculate_radial_points_orca (double int_acc, size_t atomic_number, double b=5.0)
 Calculate number of radial points using ORCA's formula.
 
void print_cosx_grid_summary (const GridSettings &settings, COSXGridLevel level, size_t num_points, size_t num_batches, size_t num_atoms)
 Print ORCA-style grid generation summary.
 
nlohmann::json isosurface_to_json (const isosurface::Isosurface &surf)
 
void write_isosurface_json (const std::string &filename, const isosurface::Isosurface &surf)
 
std::string isosurface_to_json_string (const isosurface::Isosurface &surf)
 
occ::crystal::Crystal load_crystal (const std::string &filename)
 
occ::core::Molecule load_molecule (const std::string &filename)
 
void write_obj_file (const std::string &filename, const isosurface::Isosurface &isosurface)
 
template<typename T >
OccInput build (const std::string &filename)
 
template<typename T >
OccInput build (std::istream &file)
 
PointChargeFileReader::PointChargeList point_charges_from_file (const std::string &)
 
PointChargeFileReader::PointChargeList point_charges_from_string (const std::string &)
 
void write_ply_file (const std::string &filename, const Eigen::Matrix3Xf &vertices, const Eigen::Matrix3Xi &faces)
 
void write_ply_mesh (const std::string &filename, const isosurface::Isosurface &isosurface, bool binary=true)
 
occ::core::Molecule molecule_from_xyz_file (const std::string &)
 
occ::core::Molecule molecule_from_xyz_string (const std::string &)
 
std::string to_xyz_string (const occ::core::Molecule &molecule)
 
std::string to_xyz_string (const occ::core::Molecule &molecule, const std::string &comment)
 
JsonFormat json_format (const std::string &str)
 
bool valid_json_format_string (const std::string &str)
 

Detailed Description

file input and output module including reading wavefunction files

Typedef Documentation

◆ PointChargeList

using occ::io::PointChargeList = typedef std::vector<occ::core::PointCharge>

◆ Position

typedef std::array< double, 3 > occ::io::Position

Enumeration Type Documentation

◆ COSXGridLevel

enum class occ::io::COSXGridLevel
strong

COSX/SGX grid levels matching ORCA's GRIDX scheme.

ORCA uses 3 grid levels for COSX with specific IntAcc values and 5-region angular pruning. These correspond to GRIDX 1, 2, 3 in ORCA.

Enumerator
Grid1 

GRIDX 1: IntAcc=3.816, max 50 Lebedev points.

Grid2 

GRIDX 2: IntAcc=4.020, max 110 Lebedev points.

Grid3 

GRIDX 3: IntAcc=4.338, max 194 Lebedev points.

◆ GridDataType

enum class occ::io::GridDataType
strong
Enumerator
Raw 
Indexed 

◆ GridFormat

enum class occ::io::GridFormat
strong
Enumerator
GeneralGrid 
PeriodicGrid 

◆ GridQuality

enum class occ::io::GridQuality
strong

Standard grid quality levels (similar to Q-Chem's SG system)

Enumerator
Coarse 

Like SG-0: ~23 radial, ~170 angular points - fastest, basic accuracy.

Standard 

Like SG-1: ~50 radial, ~194 angular points - standard for LDA/GGA.

Fine 

Like SG-2: ~75 radial, ~302 angular points - meta-GGAs, B95/B97.

VeryFine 

Like SG-3: ~99 radial, ~590 angular points - Minnesota functionals, highest accuracy.

◆ JsonFormat

enum class occ::io::JsonFormat
strong
Enumerator
JSON 
UBJSON 
CBOR 
BSON 
MSGPACK 

◆ PruningScheme

enum class occ::io::PruningScheme
strong

Enumeration of available angular pruning schemes.

Enumerator
None 

No pruning (uniform angular points)

NWChem 

NWChem pruning scheme.

NumGrid 

NumGrid pruning scheme.

Function Documentation

◆ build() [1/2]

template<typename T >
OccInput occ::io::build ( const std::string &  filename)

◆ build() [2/2]

template<typename T >
OccInput occ::io::build ( std::istream &  file)

◆ calculate_radial_points_orca()

size_t occ::io::calculate_radial_points_orca ( double  int_acc,
size_t  atomic_number,
double  b = 5.0 
)

Calculate number of radial points using ORCA's formula.

Uses: nr = (15 * IntAcc - 40) + b * ROW where ROW is the periodic table row of the element

Parameters
int_accIntAcc parameter
atomic_numberAtomic number of the element
bRow multiplier (default 5.0)
Returns
size_t Number of radial points

◆ cosx_grid_int_acc()

double occ::io::cosx_grid_int_acc ( COSXGridLevel  level)

Get IntAcc value for a COSX grid level.

Returns the ORCA IntAcc parameter for the given COSX grid level

Parameters
levelCOSX grid level
Returns
double IntAcc value

◆ cosx_grid_level_to_string()

std::string occ::io::cosx_grid_level_to_string ( COSXGridLevel  level)

Convert COSXGridLevel enum to string.

Parameters
levelCOSX grid level
Returns
std::string String representation (e.g., "GRIDX 1")

◆ get_grid_settings()

GridSettings occ::io::get_grid_settings ( GridQuality  quality)

Get grid settings for a specific quality level.

Parameters
qualityGrid quality level
Returns
GridSettings configured for the specified quality

◆ grid_quality_from_string()

GridQuality occ::io::grid_quality_from_string ( const std::string &  str)

Convert string to GridQuality enum.

Parameters
strString representation (case-insensitive)
Returns
GridQuality Grid quality level
Exceptions
std::invalid_argumentif string is not recognized

◆ grid_quality_to_string()

std::string occ::io::grid_quality_to_string ( GridQuality  quality)

Convert GridQuality enum to string.

Parameters
qualityGrid quality level
Returns
std::string String representation of the quality level

◆ isosurface_to_json()

nlohmann::json occ::io::isosurface_to_json ( const isosurface::Isosurface surf)

◆ isosurface_to_json_string()

std::string occ::io::isosurface_to_json_string ( const isosurface::Isosurface surf)

◆ json_format()

JsonFormat occ::io::json_format ( const std::string &  str)
inline

◆ load_crystal()

occ::crystal::Crystal occ::io::load_crystal ( const std::string &  filename)

◆ load_molecule()

occ::core::Molecule occ::io::load_molecule ( const std::string &  filename)

◆ make_adaptive_bounds()

template<typename PropertyFunctor >
auto occ::io::make_adaptive_bounds ( PropertyFunctor &  func,
const typename AdaptiveGridBounds< PropertyFunctor >::Parameters &  params = {} 
)

◆ molecule_from_xyz_file()

occ::core::Molecule occ::io::molecule_from_xyz_file ( const std::string &  )

◆ molecule_from_xyz_string()

occ::core::Molecule occ::io::molecule_from_xyz_string ( const std::string &  )

◆ point_charges_from_file()

PointChargeFileReader::PointChargeList occ::io::point_charges_from_file ( const std::string &  )

◆ point_charges_from_string()

PointChargeFileReader::PointChargeList occ::io::point_charges_from_string ( const std::string &  )

◆ print_cosx_grid_summary()

void occ::io::print_cosx_grid_summary ( const GridSettings settings,
COSXGridLevel  level,
size_t  num_points,
size_t  num_batches,
size_t  num_atoms 
)

Print ORCA-style grid generation summary.

Prints a summary similar to ORCA's "COSX GRID GENERATION" output:

  • IntAcc, angular grid level, pruning method
  • Total grid points, batches, average points per batch/atom
Parameters
settingsGrid settings used
levelCOSX grid level (Grid1, Grid2, Grid3)
num_pointsTotal number of grid points
num_batchesNumber of batches
num_atomsNumber of atoms

◆ to_xyz_string() [1/2]

std::string occ::io::to_xyz_string ( const occ::core::Molecule molecule)

◆ to_xyz_string() [2/2]

std::string occ::io::to_xyz_string ( const occ::core::Molecule molecule,
const std::string &  comment 
)

◆ valid_json_format_string()

bool occ::io::valid_json_format_string ( const std::string &  str)
inline

◆ write_isosurface_json()

void occ::io::write_isosurface_json ( const std::string &  filename,
const isosurface::Isosurface surf 
)

◆ write_obj_file()

void occ::io::write_obj_file ( const std::string &  filename,
const isosurface::Isosurface isosurface 
)

◆ write_ply_file()

void occ::io::write_ply_file ( const std::string &  filename,
const Eigen::Matrix3Xf &  vertices,
const Eigen::Matrix3Xi &  faces 
)

◆ write_ply_mesh()

void occ::io::write_ply_mesh ( const std::string &  filename,
const isosurface::Isosurface isosurface,
bool  binary = true 
)