CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::FileEnumerator Class Reference

#include <FileEnumerator.hh>

Detailed Description

Lists all files in a CASM project, for use with 'casm files' command.

Definition at line 20 of file FileEnumerator.hh.

Public Member Functions

 FileEnumerator (const PrimClex &_primclex, bool _all_settings=false, bool _relative=false)
 A CASM project file enumerator. More...
 
template<typename OutputIterator >
OutputIterator basic_files (OutputIterator result)
 Enumerate all setting independent files. More...
 
template<typename OutputIterator >
OutputIterator bset_files (OutputIterator result)
 Enumerate bset files. More...
 
template<typename OutputIterator >
OutputIterator reference_files (OutputIterator result)
 Enumerate reference files. More...
 
template<typename OutputIterator >
OutputIterator eci_files (OutputIterator result)
 Enumerate eci files. More...
 
template<typename OutputIterator >
OutputIterator calc_settings_files (OutputIterator result)
 Enumerate calculation settings files. More...
 
template<typename OutputIterator >
OutputIterator calc_status_files (OutputIterator result)
 Enumerate calculation status files. More...
 
template<typename OutputIterator >
OutputIterator all_calc_files (OutputIterator result)
 Enumerate all training data files. More...
 

Private Member Functions

fs::path _if_relative (fs::path path)
 make paths relative to m_primclex.dir().root_dir() if m_relative More...
 
template<typename OutputIterator >
OutputIterator _if_exists (OutputIterator result, fs::path path)
 output path if it exists More...
 
template<typename OutputIterator >
OutputIterator _all_that_exist (OutputIterator result, fs::path location)
 Get all regular files that exist in directory 'location'. More...
 

Private Attributes

const PrimClexm_primclex
 
DirectoryStructure m_dir
 
ProjectSettings m_set
 
bool m_all_settings
 
bool m_relative
 
std::vector< std::string > m_all_bset
 
std::vector< std::string > m_all_calctype
 
std::vector< std::string > m_all_property
 

Constructor & Destructor Documentation

◆ FileEnumerator()

CASM::FileEnumerator::FileEnumerator ( const PrimClex _primclex,
bool  _all_settings = false,
bool  _relative = false 
)

A CASM project file enumerator.

Parameters
_primclexThe PrimClex representing the project to enumerate files
_resultOutputIterator taking list of fs::path
_all_settingsIf true, output files for all settings combinations.
_relativeIf true, enumerate paths relative to the project root directory. If false, use absolute paths.
Returns
Iterator to end of region containing the output file paths

Definition at line 87 of file FileEnumerator.hh.

Member Function Documentation

◆ _all_that_exist()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::_all_that_exist ( OutputIterator  result,
fs::path  location 
)
private

Get all regular files that exist in directory 'location'.

Definition at line 122 of file FileEnumerator.hh.

◆ _if_exists()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::_if_exists ( OutputIterator  result,
fs::path  path 
)
private

output path if it exists

Definition at line 112 of file FileEnumerator.hh.

◆ _if_relative()

fs::path CASM::FileEnumerator::_if_relative ( fs::path  path)
inlineprivate

make paths relative to m_primclex.dir().root_dir() if m_relative

make paths relative to CASM project root directory

Definition at line 101 of file FileEnumerator.hh.

◆ all_calc_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::all_calc_files ( OutputIterator  result)

Enumerate all training data files.

  • all files in 'training_data' directory, recursively

Definition at line 296 of file FileEnumerator.hh.

◆ basic_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::basic_files ( OutputIterator  result)

Enumerate all setting independent files.

  • prim.json
  • PRIM
  • project_settings.json
  • config_list.json
  • enumerator plugins
  • SCEL
  • lattice_point_group.json
  • factor_group.json
  • crystal_point_group.json

Definition at line 153 of file FileEnumerator.hh.

◆ bset_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::bset_files ( OutputIterator  result)

Enumerate bset files.

  • bspecs.json
  • clust.json
  • basis.json
  • X_Clexulator.cc

Definition at line 175 of file FileEnumerator.hh.

◆ calc_settings_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::calc_settings_files ( OutputIterator  result)

Enumerate calculation settings files.

  • training_data/settings files (also at supercell and config level)

Definition at line 248 of file FileEnumerator.hh.

◆ calc_status_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::calc_status_files ( OutputIterator  result)

Enumerate calculation status files.

  • properties.calc.json and status.json files

Definition at line 276 of file FileEnumerator.hh.

◆ eci_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::eci_files ( OutputIterator  result)

Enumerate eci files.

  • eci.json

Definition at line 217 of file FileEnumerator.hh.

◆ reference_files()

template<typename OutputIterator >
OutputIterator CASM::FileEnumerator::reference_files ( OutputIterator  result)

Enumerate reference files.

  • composition_axes.json
  • chemical_reference.json

Definition at line 195 of file FileEnumerator.hh.

Member Data Documentation

◆ m_all_bset

std::vector<std::string> CASM::FileEnumerator::m_all_bset
private

Definition at line 72 of file FileEnumerator.hh.

◆ m_all_calctype

std::vector<std::string> CASM::FileEnumerator::m_all_calctype
private

Definition at line 73 of file FileEnumerator.hh.

◆ m_all_property

std::vector<std::string> CASM::FileEnumerator::m_all_property
private

Definition at line 74 of file FileEnumerator.hh.

◆ m_all_settings

bool CASM::FileEnumerator::m_all_settings
private

Definition at line 69 of file FileEnumerator.hh.

◆ m_dir

DirectoryStructure CASM::FileEnumerator::m_dir
private

Definition at line 67 of file FileEnumerator.hh.

◆ m_primclex

const PrimClex& CASM::FileEnumerator::m_primclex
private

Definition at line 66 of file FileEnumerator.hh.

◆ m_relative

bool CASM::FileEnumerator::m_relative
private

Definition at line 70 of file FileEnumerator.hh.

◆ m_set

ProjectSettings CASM::FileEnumerator::m_set
private

Definition at line 68 of file FileEnumerator.hh.


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