CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::DB::StructureMap< Configuration > Class Reference

#include <ConfigImport.hh>

Detailed Description

Definition at line 34 of file ConfigImport.hh.

Public Types

typedef std::back_insert_iterator< std::vector< ConfigIO::Result > > map_result_inserter
 

Public Member Functions

 StructureMap (ConfigMapping::Settings const &_set, const PrimClex &_primclex)
 Construct with PrimClex and settings (see Import / Update desc) More...
 
map_result_inserter map (fs::path p, std::vector< std::string > const &req_properties, std::unique_ptr< Configuration > const &hint_config, map_result_inserter result) const
 Specialized mapping method for Configuration. More...
 
const ConfigMapping::Settingssettings () const
 Returns settings used for mapping. More...
 

Private Member Functions

SimpleStructure _make_structure (const fs::path &p) const
 Read SimpleStructure to be imported. More...
 

Private Attributes

std::unique_ptr< ConfigMapperm_configmapper
 

Member Typedef Documentation

◆ map_result_inserter

typedef std::back_insert_iterator<std::vector<ConfigIO::Result> > CASM::DB::StructureMap< Configuration >::map_result_inserter

Definition at line 41 of file ConfigImport.hh.

Constructor & Destructor Documentation

◆ StructureMap()

Construct with PrimClex and settings (see Import / Update desc)

Construct with PrimClex and ConfigMapping::Settings (see Import / Update desc)

Definition at line 102 of file ConfigImport.cc.

Member Function Documentation

◆ _make_structure()

SimpleStructure CASM::DB::StructureMap< Configuration >::_make_structure ( const fs::path &  p) const
private

Read SimpleStructure to be imported.

Read BasicStructure to be imported.

If 'p.extension()' == ".json" or ".JSON", read as properties.calc.json Else, read as VASP POSCAR

Definition at line 212 of file ConfigImport.cc.

◆ map()

StructureMap< Configuration >::map_result_inserter CASM::DB::StructureMap< Configuration >::map ( fs::path  p,
std::vector< std::string > const &  req_properties,
std::unique_ptr< Configuration > const &  hint_config,
map_result_inserter  result 
) const

Specialized mapping method for Configuration.

Specialized import method for ConfigType.

Parameters
pPath to structure or properties.calc.json file. Not guaranteed to exist or be valid.
req_properties,listof names of properties that are required for mapped data to be considered 'complete'
hintstd::unique_ptr<Configuration> to 'from' config for 'casm update', or 'end' if unknown as with 'casm import'.
resultInsert iterator of Result objects to output mapping results
  • Should output one or more mapping results from the structure located at specied path
  • >1 result handles case of non-primitive configurations
  • responsible for filling in Result data structure
  • If 'hint' is not nullptr, use hint as 'from' config, else 'from' == 'to'
Parameters
pPath to structure or properties.calc.json file. Not guaranteed to exist or be valid.
hintstd::unique_ptr<Configuration> to 'from' config for 'casm update', or null if unknown as with 'casm import'.
resultInsert iterator of Result objects to output mapping results
  • Should output one or more mapping results from the structure located at specied path
  • >1 result handles case of non-primitive configurations
  • responsible for filling in Result data structure

Definition at line 121 of file ConfigImport.cc.

◆ settings()

Returns settings used for mapping.

Definition at line 96 of file ConfigImport.cc.

Member Data Documentation

◆ m_configmapper

std::unique_ptr<ConfigMapper> CASM::DB::StructureMap< Configuration >::m_configmapper
private

Definition at line 71 of file ConfigImport.hh.


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