Reference

casm.api

casm.api.API()

Class to provide access to the libccasm C API.

casm.api.command_list()

Get list of recognized casm commands implemented at the libcasm level

casm.api.casm_command(args[, root, …])

Execute a command via the c api, writing output to stdout/stderr.

casm.api.casm_capture(args[, root, …])

Execute a command via the c api and store stdout/stderr result as str.

casm.learn

casm.learn.create_halloffame(maxsize[, rel_tol])

casm.learn.EqualIndividual([rel_tol])

Functor class for checking equivalence of individuals in a HallOfFame.

casm.learn.empty_individual(n_features)

casm.learn.example_input_Lasso()

casm.learn.example_input_LassoCV()

casm.learn.example_input_RFE()

casm.learn.example_input_GeneticAlgorithm()

casm.learn.example_input_IndividualBestFirst()

casm.learn.example_input_PopulationBestFirst()

casm.learn.example_input_DirectSelection()

casm.learn.open_input(input_filename)

Read casm-learn input file into a dict

casm.learn.set_input_defaults(input[, …])

Set common input defaults.

casm.learn.FittingData(X, y, cv[, …])

FittingData holds feature values, target values, sample weights, etc.

casm.learn.TrainingData(input[, verbose])

TrainingData is a data structure used to collect data from the training data file.

casm.learn.print_input_help()

casm.learn.print_individual(hall, indices[, …])

Print selected individuals from hall of fame.

casm.learn.print_population(pop)

Print all individual in a population.

casm.learn.print_halloffame(hall[, format])

Print all individual in hall of fame.

casm.learn.print_eci(eci)

Print ECI.

casm.learn.to_json(index, indiv)

Serialize an individual to JSON records.

casm.learn.open_halloffame(halloffame_filename)

Open hall of fame from .pkl file.

casm.learn.save_halloffame(hall, …[, verbose])

Save hall of fame as .pkl file.

casm.learn.checkspecs(input[, verbose])

Output data and cv files containing the current problem specs.

casm.learn.checkhull(input, hall[, indices, …])

Check for hull properties and add pandas.DataFrame attributes to each individual:

casm.learn.fit_and_select(input[, save, …])

param input

The input settings as a dict

casm.learn.direct_fit(input[, save, …])

Fit ECI and add details for a set of individuals specified for feature_selection method ‘DirectSelection’ via the ‘population’ kwarg.

casm.project

casm.project.project_path([dir])

Crawl up from dir to find ‘.casm’.

casm.project.ClexDescription(name, property, …)

Settings for a cluster expansion

casm.project.ProjectSettings([path])

Settings for a CASM project

casm.project.DirectoryStructure([path])

Standard file and directory locations for a CASM project

casm.project.Project([path, verbose])

The Project class contains information about a CASM project

casm.project.Prim(proj)

The Primitive Crystal Structure

casm.project.Selection([proj, path, type, all])

A Selection object contains information about a CASM project

casm.project.query(proj, columns, …[, …])

Return a pandas.DataFrame with casm query output

casm.project.write_eci(proj, eci[, …])

Write eci.json

casm.project.AttributeInfo(filename)

Contains the atom and molecule attributes’ information self.atom_type: List[str] - Contains the atom types self.atom_dofs: Dict{Dict{List[float or int]}} - Contains dofs for all the atoms in the structure.json self.mol_type: List[str] - Contains the molecule types self.mol_dofs: Dict{Dict{List[float or int]}} - Contains dofs for the molecules Look the example below for clarity regarding object properties

casm.vasp

casm.vasp.io

Tools for VASP input and output

casm.vasp.VaspError

VASP related errors

casm.vasp.VaspWarning(msg)

VASP related warnings

casm.vasp.continue_job(jobdir, contdir, settings)

Use the files in vasp job directory ‘jobdir’, to setup a vasp job in directory ‘contdir’.

casm.vasp.IbzkptError()

VERY BAD NEWS! internal error in subroutine IBZKPT

casm.vasp.FEXCFError()

ERROR FEXCF: supplied exchange-correlation table

casm.vasp.SubSpaceMatrixError()

WARNING: Sub-Space-Matrix is not hermitian

casm.vasp.InisymError()

VASP can’t figure out the (magnetic) symmetry

casm.vasp.SgrconError()

VASP is having yet another symmetry problem

casm.vasp.WavecarError()

A bad WAVECAR is causing the job to crash/abort

casm.vasp.NbandsError()

Your highest band is occupied at some k-points! Unless you are

casm.vasp.NoConvergeError()

An ionic step was performed without a fully-converged density

casm.vasp.FreezeError()

VASP appears frozen

casm.vasp.error_check(jobdir, stdoutfile, …)

Check vasp stdout for errors

casm.vasp.crash_check(jobdir, stdoutfile, …)

Check vasp stdout for evidence of a crash

casm.vasp.complete_job(jobdir, settings)

Remove files from a vasp job directory

casm.vasp.run([jobdir, stdout, stderr, …])

Run vasp using subprocess.

casm.vasp.Relax([calcdir, settings])

The Relax class contains functions for setting up, executing, and parsing a VASP relaxation.

casm.vasp.Converge([propdir, settings, prop])

The Converge class contains functions for setting up, executing, and parsing a VASP convergence.

casm.vasp.io

casm.vasp.io.VASP_INPUT_FILE_LIST

Built-in mutable sequence.

casm.vasp.io.DEFAULT_VASP_MOVE_LIST

Built-in mutable sequence.

casm.vasp.io.DEFAULT_VASP_COPY_LIST

Built-in mutable sequence.

casm.vasp.io.DEFAULT_VASP_REMOVE_LIST

Built-in mutable sequence.

casm.vasp.io.VaspIOError(msg)

casm.vasp.io.job_complete([jobdir])

Return True if vasp job at path ‘jobdir’ is complete

casm.vasp.io.get_incar_tag(key[, jobdir])

Opens INCAR in ‘jobdir’ and returns ‘key’ value.

casm.vasp.io.set_incar_tag(tag_dict[, …])

Opens INCAR in ‘jobdir’, sets ‘key’ value, and writes INCAR If ‘val’ is None, the tag is removed from the INCAR.

casm.vasp.io.ionic_steps([jobdir])

Find the number of ionic steps completed in ‘jobdir’

casm.vasp.io.write_potcar(filename, poscar, …)

Write an appropriate POTCAR

casm.vasp.io.write_stopcar([mode, jobdir])

Write STOPCAR file with two modes: mode = ‘e’ for ‘VASP stops at the next electronic step’ mode = ‘i’ for ‘VASP stops at the next ionic step’

casm.vasp.io.write_vasp_input(dirpath, …)

Write VASP input files in directory ‘dirpath’

casm.vasp.io.VASP_TAG_INT_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_FLOAT_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_BOOL_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_SITEF_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_SPECF_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_SPECI_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_STRING_LIST

Built-in mutable sequence.

casm.vasp.io.VASP_TAG_LIST

Built-in mutable sequence.

casm.vasp.io.IncarError(msg)

casm.vasp.io.Incar(filename[, species, …])

The INCAR class contains:

casm.vasp.io.KpointsError(msg)

casm.vasp.io.Kpoints(filename)

The Kpoints class contains:

casm.vasp.io.OutcarError(msg)

casm.vasp.io.Outcar(filename)

Parse OUTCAR files.

casm.vasp.io.OszicarError(msg)

casm.vasp.io.Oszicar(filename)

Parse OSZICAR files.

casm.vasp.io.Site(cart, position[, SD_FLAG, …])

Site in a basis.

casm.vasp.io.PoscarError(msg)

casm.vasp.io.Poscar(filename[, species, …])

The Poscar class contains:

casm.vasp.io.SpeciesError(msg)

casm.vasp.io.SpeciesDict

SpeciesDict subclasses dict so it can hold additional metadata without disrupting routines that

casm.vasp.io.IndividualSpecies(values, tags, …)

The IndividualSpecies class contains:

casm.vasp.io.species_settings(filename)

Returns a SpeciesDict of IndividualSpecies objects, with keys equal to their names.

casm.vasp.io.write_species_settings(species, …)

Write a SPECIES file from a species dict

casm.vasp.io.VaspIO(incarfile, …[, sort])

Generate a set of VASP input files from settings files

casm.vasp.io.VasprunError(msg)

casm.vasp.io.Vasprun(filename[, DOS, Band])

An object containing values read from vasprun.xml

casm.vasp.io.OrbitalOccupationError(message)

casm.vasp.io.OrbitalOccupation(…[, …])

Orbital occupation information for a single site.

casm.vasp.io.write_occupations(filename, …)

Write a dict of occupations out to an OCCMATRIX-like file filename : str, output filename occupations : dict of OrbitalOccupation, site occupations stored using site indices (from 0) as keys

casm.vasp.io.CmagspinAttr(dof_info)

Class containing information specific to Cmagspin dof.

casm.vaspwrapper

casm.vaspwrapper.Converge([configdir, auto, …])

The Converge class contains functions for setting up, executing, and parsing a VASP convergence test.

casm.vaspwrapper.Relax(selection[, …])

The Relax class contains functions for setting up, executing, and parsing a VASP relaxation.

casm.vaspwrapper.VaspCalculatorBase(selection)

Base class containing all the basic functions that method classes can inherit

casm.vaspwrapper.VaspWrapperError(msg)

casm.vaspwrapper.read_settings(filename)

Returns a JSON object reading JSON files containing settings for VASP PBS jobs.

casm.vaspwrapper.write_settings(settings, …)

Write ‘settings’ as json file, ‘filename’

casm.vaspwrapper.vasp_input_file_names(dir, …)

Collect casm.vaspwrapper input files from the CASM project hierarchy

casm.wrapper

casm.wrapper.jobname(configname)

Return a name for a submitted job for configuration with ‘configname’