CASM  1.1.0
A Clusters Approach to Statistical Mechanics
Project

Detailed Description

Relates to CASM project settings, directory structure, etc.

A CASM project encompasses all the settings, calculations, cluster expansions, Monte Carlo results, etc. related to a single parent crystal structure (known as the 'prim').

All the results and data related to a CASM project may be stored in a directory tree with structure defined by the DirectoryStructure class, and accessible through the top-level data structure PrimClex.

Modules

 PrimClex
 PrimClex is the top-level data structure for a CASM project.
 

Classes

struct  CASM::QueryTraits< DataObject >
 
class  CASM::ProjectSettings
 
struct  CASM::jsonConstructor< ReturnType >
 Helper struct for constructing objects that need additional data. More...
 
struct  CASM::jsonConstructor< ProjectSettings >
 

Functions

bool CASM::is_valid_project_name (std::string project_name)
 
void CASM::throw_if_project_name_is_not_valid (std::string project_name)
 Throw if project name is invalid. More...
 
bool CASM::create_all_directories (ProjectSettings const &set)
 
void CASM::print_compiler_settings_summary (ProjectSettings const &set, Log &log)
 Print summary of compiler settings, as for 'casm settings -l'. More...
 
void CASM::print_summary (ProjectSettings const &set, Log &log)
 Print summary of ProjectSettings, as for 'casm settings -l'. More...
 
jsonParserCASM::to_json (const ProjectSettings &set, jsonParser &json)
 Serialize ProjectSettings to JSON. More...
 
void CASM::write_project_settings (ProjectSettings const &set, fs::path project_settings_path)
 
ProjectSettings CASM::read_project_settings (fs::path project_settings_path)
 
void CASM::commit (ProjectSettings const &set)
 
ProjectSettings CASM::open_project_settings (fs::path path_in_project)
 

Function Documentation

◆ commit()

void CASM::commit ( ProjectSettings const &  set)

Write project settings file for an existing project

Equivalent to write_project_settings(set, set.dir().project_settings())

Definition at line 688 of file ProjectSettings.cc.

◆ create_all_directories()

bool CASM::create_all_directories ( ProjectSettings const &  set)

Add directories for all cluster expansions

For all ClexDescription currently saved in this->cluster_expansions(), create bset, calc_settings, ref, and eci directories

Definition at line 393 of file ProjectSettings.cc.

◆ is_valid_project_name()

bool CASM::is_valid_project_name ( std::string  project_name)

Return true if project name is valid

Notes:

  • Should be a short descriptive name such as "ZrO" or "NiAl"
  • Must be a valid C++ identifier:
    • only alphanumeric characters and underscores allowed
    • cannot start with a number

check if project_name is suitable:

check if project_name is suitable:

Definition at line 22 of file ProjectSettings.cc.

◆ open_project_settings()

ProjectSettings CASM::open_project_settings ( fs::path  path_in_project)

Open the project settings JSON file of an existing project

Note:

  • After construction, root dir is set (ProjectSettings::has_dir() == true)
  • path_in_project does not need to be a root dir exactly, it may be anywere inside a CASM project
  • Throws if path_in_project is not inside any CASM project or reading fails

Definition at line 692 of file ProjectSettings.cc.

◆ print_compiler_settings_summary()

void CASM::print_compiler_settings_summary ( ProjectSettings const &  set,
Log log 
)

Print summary of compiler settings, as for 'casm settings -l'.

Definition at line 420 of file ProjectSettings.cc.

◆ print_summary()

void CASM::print_summary ( ProjectSettings const &  set,
Log log 
)

Print summary of ProjectSettings, as for 'casm settings -l'.

Definition at line 433 of file ProjectSettings.cc.

◆ read_project_settings()

ProjectSettings CASM::read_project_settings ( fs::path  project_settings_path)

Read ProjectSettings from JSON file

Parameters
project_settings_pathLocation of ProjectSettings JSON file

Note:

Definition at line 676 of file ProjectSettings.cc.

◆ throw_if_project_name_is_not_valid()

void CASM::throw_if_project_name_is_not_valid ( std::string  project_name)

Throw if project name is invalid.

check if project_name is suitable:

check if project_name is suitable:

Definition at line 30 of file ProjectSettings.cc.

◆ to_json()

jsonParser & CASM::to_json ( const ProjectSettings set,
jsonParser json 
)

Serialize ProjectSettings to JSON.

Definition at line 501 of file ProjectSettings.cc.

◆ write_project_settings()

void CASM::write_project_settings ( ProjectSettings const &  set,
fs::path  project_settings_path 
)

Write ProjectSettings to JSON file

Parameters
setProjectSettings
project_settings_pathLocation to write ProjectSettings JSON file

Definition at line 665 of file ProjectSettings.cc.