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  Basis
 Everything needed to define the energy model, independent of crystal packing. More...
 
struct  BasisSetInput
 
struct  BuckinghamPair
 
struct  CellData
 
class  CifParser
 
class  CifWriter
 Writer class for crystallographic information files (CIF) More...
 
struct  ColumnConfiguration
 
struct  COSXSettings
 
struct  CrystalData
 
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  GridSymmetryInfo
 
struct  IndependentMolecule
 
struct  IsosurfaceInput
 
struct  JsonWavefunctionReader
 
struct  JsonWavefunctionWriter
 
struct  MethodInput
 
class  MoldenReader
 
struct  MoleculeSite
 
struct  MoleculeType
 
struct  OccInput
 
struct  OptimizationInput
 
class  OrcaJSONReader
 
struct  OutputInput
 
struct  PairInput
 
class  PeriodicGrid
 
struct  PointChargeFileReader
 
struct  Potentials
 
struct  QCSchemaBond
 
struct  QCSchemaInput
 
struct  QCSchemaModel
 
class  QCSchemaReader
 
struct  QCSchemaTopology
 
struct  ReferenceEnergies
 
struct  RowConfiguration
 
struct  RuntimeInput
 
struct  Settings
 
class  ShelxFile
 Unified reader/writer for SHELX .res/.ins crystallographic files. More...
 
struct  SiteMultipoles
 
struct  SolventInput
 
struct  StructureInput
 Complete input for crystal energy calculations. More...
 
struct  SymmetryData
 
class  Table
 
struct  XyzFileReader
 

Typedefs

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

Enumerations

enum class  RIPolicy { Auto , None , JK , COSX }
 
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={})
 
occ::crystal::Crystal load_crystal (const std::string &filename)
 
occ::core::Molecule load_molecule (const std::string &filename)
 
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 to_json (nlohmann::json &j, const SiteMultipoles &m)
 
void from_json (const nlohmann::json &j, SiteMultipoles &m)
 
void to_json (nlohmann::json &j, const MoleculeSite &s)
 
void from_json (const nlohmann::json &j, MoleculeSite &s)
 
void to_json (nlohmann::json &j, const MoleculeType &mt)
 
void from_json (const nlohmann::json &j, MoleculeType &mt)
 
void to_json (nlohmann::json &j, const IndependentMolecule &im)
 
void from_json (const nlohmann::json &j, IndependentMolecule &im)
 
void to_json (nlohmann::json &j, const BuckinghamPair &bp)
 
void from_json (const nlohmann::json &j, BuckinghamPair &bp)
 
void to_json (nlohmann::json &j, const Potentials &p)
 
void from_json (const nlohmann::json &j, Potentials &p)
 
void to_json (nlohmann::json &j, const Settings &s)
 
void from_json (const nlohmann::json &j, Settings &s)
 
void to_json (nlohmann::json &j, const ReferenceEnergies &r)
 
void from_json (const nlohmann::json &j, ReferenceEnergies &r)
 
void to_json (nlohmann::json &j, const Basis &b)
 
void from_json (const nlohmann::json &j, Basis &b)
 
void to_json (nlohmann::json &j, const CrystalData &c)
 
void from_json (const nlohmann::json &j, CrystalData &c)
 
void to_json (nlohmann::json &j, const StructureInput &si)
 
void from_json (const nlohmann::json &j, StructureInput &si)
 
StructureInput read_structure_json (const std::string &path)
 
void write_structure_json (const std::string &path, const StructureInput &input)
 
void write_force_field_json (const std::string &path, const Basis &basis, const std::string &title="")
 Write only the force-field section (molecule definitions, multipoles, pair potentials, and model settings) to a standalone JSON file.
 
bool is_structure_format (const std::string &json_path)
 Detect whether a JSON file uses the structure format.
 
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)
 
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)
 
void write_obj_file (const std::string &filename, const isosurface::Isosurface &isosurface)
 
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)
 
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

◆ GridDataType

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

◆ GridFormat

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

◆ JsonFormat

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

◆ RIPolicy

enum class occ::io::RIPolicy
strong
Enumerator
Auto 
None 
JK 
COSX 

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)

◆ from_json() [1/11]

void occ::io::from_json ( const nlohmann::json &  j,
Basis b 
)

◆ from_json() [2/11]

void occ::io::from_json ( const nlohmann::json &  j,
BuckinghamPair bp 
)

◆ from_json() [3/11]

void occ::io::from_json ( const nlohmann::json &  j,
CrystalData c 
)

◆ from_json() [4/11]

void occ::io::from_json ( const nlohmann::json &  j,
IndependentMolecule im 
)

◆ from_json() [5/11]

void occ::io::from_json ( const nlohmann::json &  j,
MoleculeSite s 
)

◆ from_json() [6/11]

void occ::io::from_json ( const nlohmann::json &  j,
MoleculeType mt 
)

◆ from_json() [7/11]

void occ::io::from_json ( const nlohmann::json &  j,
Potentials p 
)

◆ from_json() [8/11]

void occ::io::from_json ( const nlohmann::json &  j,
ReferenceEnergies r 
)

◆ from_json() [9/11]

void occ::io::from_json ( const nlohmann::json &  j,
Settings s 
)

◆ from_json() [10/11]

void occ::io::from_json ( const nlohmann::json &  j,
SiteMultipoles m 
)

◆ from_json() [11/11]

void occ::io::from_json ( const nlohmann::json &  j,
StructureInput si 
)

◆ is_structure_format()

bool occ::io::is_structure_format ( const std::string &  json_path)

Detect whether a JSON file uses the structure format.

◆ 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 &  )

◆ read_structure_json()

StructureInput occ::io::read_structure_json ( const std::string &  path)

◆ to_json() [1/11]

void occ::io::to_json ( nlohmann::json &  j,
const Basis b 
)

◆ to_json() [2/11]

void occ::io::to_json ( nlohmann::json &  j,
const BuckinghamPair bp 
)

◆ to_json() [3/11]

void occ::io::to_json ( nlohmann::json &  j,
const CrystalData c 
)

◆ to_json() [4/11]

void occ::io::to_json ( nlohmann::json &  j,
const IndependentMolecule im 
)

◆ to_json() [5/11]

void occ::io::to_json ( nlohmann::json &  j,
const MoleculeSite s 
)

◆ to_json() [6/11]

void occ::io::to_json ( nlohmann::json &  j,
const MoleculeType mt 
)

◆ to_json() [7/11]

void occ::io::to_json ( nlohmann::json &  j,
const Potentials p 
)

◆ to_json() [8/11]

void occ::io::to_json ( nlohmann::json &  j,
const ReferenceEnergies r 
)

◆ to_json() [9/11]

void occ::io::to_json ( nlohmann::json &  j,
const Settings s 
)

◆ to_json() [10/11]

void occ::io::to_json ( nlohmann::json &  j,
const SiteMultipoles m 
)

◆ to_json() [11/11]

void occ::io::to_json ( nlohmann::json &  j,
const StructureInput si 
)

◆ 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_force_field_json()

void occ::io::write_force_field_json ( const std::string &  path,
const Basis basis,
const std::string &  title = "" 
)

Write only the force-field section (molecule definitions, multipoles, pair potentials, and model settings) to a standalone JSON file.

Despite the serialized key being "basis" for historical reasons, this is distinct from the GTO basis set used elsewhere in OCC.

◆ 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 
)

◆ write_structure_json()

void occ::io::write_structure_json ( const std::string &  path,
const StructureInput input 
)