casm.project.Project
- class casm.project.Project(path=None, verbose=True)[source]
The Project class contains information about a CASM project
- path
Path to project root directory
- Type:
str
- name
Project name
- Type:
str
- settings
Contains project settings
- Type:
casm.project.ProjectSettings instance
- dir
Provides file and directory locations within the project
- Type:
casm.project.DirectoryStructure instance
- prim
Represents the primitive crystal structure
- Type:
casm.project.Prim instance
- composition_axes
Currently selected composition axes, or None
- Type:
casm.project.CompositionAxes or None
- all_composition_axes
Dict containing name:CompositionAxes pairs, including both standard and custom composition axes
- Type:
dict(str:casm.project.CompositionAxes)
- verbose
How much to print to stdout
- Type:
bool
- out
Contains last output of Project.command calls if capturing output. Use Project.command_options to set options.
- Type:
str or None
- err
Contains last error output of Project.command calls if capturing output. Use Project.command_options to set options.
- Type:
str or None
- code
Contains last return code of Project.command calls.
- Type:
int or None
Construct a CASM Project representation.
- Parameters:
path (str, optional, default=None) – Path to project root directory. Default=None uses project containing current working directory
verbose (bool, optional, default=True) – How much to print to stdout
- __init__(path=None, verbose=True)[source]
Construct a CASM Project representation.
- Parameters:
path (str, optional, default=None) – Path to project root directory. Default=None uses project containing current working directory
verbose (bool, optional, default=True) – How much to print to stdout
Methods
__init__
([path, verbose])Construct a CASM Project representation.
capture
(args[, combine_output])Execute a command via the c api and store stdout/stderr result as str.
command
(args[, out, err])Execute a command via the c api, writing output to stdout/stderr.
command_options
([capture, print_output, ...])Set options for Project.command
data
()Returns a 'ctypes.c_void_p' that points to a CASM project.
init
([root, prim_path, prim_str, verbose, ...])Calls casm init to create a new CASM project in the given directory
refresh
([read_settings, read_composition, ...])Refresh PrimClex properties to reflect changes to CASM project files.
Attributes