Command Line Tools¶
CompChemUtils has a command line tool ccu with the following sub-commands.
sub-command |
description |
|---|---|
|
places an adsorbate in nonequivalent configurations |
|
launches free energy diagram GUI |
|
redefines the c vector of a given structure |
|
permutes sites within a structure |
Enable Shell Completion¶
Add this to ~/.bashrc:
eval "$(_CCU_COMPLETE=bash_source ccu)"
Add this to ~/.zshrc:
eval "$(_CCU_COMPLETE=zsh_source ccu)"
Add this to ~/.config/fish/completions/ccu.fish:
_CCU_COMPLETE=fish_source ccu | source
CLI Commands¶
ccu¶
The main CLI function.
ccu [OPTIONS] COMMAND [ARGS]...
Options
- -V, --version¶
Show the version and exit.
- -v, --verbose¶
Control how much information is printed to the terminal. This option can be repeated.
- -q, --quiet¶
- --log-file <log_file>¶
Specify a log file for all logging messages.
- --log-level <log_level>¶
Specify the log level for all logging messages.
- Options:
DEBUG | INFO | WARNING | ERROR | CRITICAL
adsorption¶
Adsorption calculation tools.
ccu adsorption [OPTIONS] COMMAND [ARGS]...
place-adsorbate¶
Create adsorbate complexes for a given structure and.
Each complex is written to a .traj file with identifying metadata
about the adsorbate identity, orientation, site, and structure.
ADSORBATE is the name of the adsorbate to place on the surface.
STRUCTURE is the path to the surface on which the adsorbate will be placed.
DESTINATION is the directory in which to write the .traj files. The
directory is created if it does not exist. Defaults to the current
working directory.
ccu adsorption place-adsorbate [OPTIONS] ADSORBATE STRUCTURE [DESTINATION]
Options
- -s, --separation <separation>¶
specify the minimum distance between the surface and any adsorbate atom
- -c, --special-centres¶
include atom-centred orientations
- -Y, --symmetric¶
treat the adsorbate as symmetric
- -V, --vertical¶
include vertical adsorption configurations
- -l, --list¶
list all available adsorbates
Arguments
- ADSORBATE¶
Required argument
- STRUCTURE¶
Required argument
- DESTINATION¶
Optional argument
bader¶
Bader charge analysis tools.
ccu bader [OPTIONS] COMMAND [ARGS]...
sum¶
Sum the bader charges atoms specified by indices.
INDICES is a list of integers indicating the indices for which to sum
Bader charges. Unless the --sort-file option is used, these
indices are interpreted as the indices within the
CHARGE_ANALYSIS.txt file. Note that if specified along with
--smart-mode, --smart-mode is ignored.
ccu bader sum [OPTIONS] [INDICES]...
Options
- --atoms <atoms>¶
A file from which an ase.Atoms object can be read via ase.io.read. This option is required if –smart-mode is used.
- --smart-mode¶
This is a special mode that will print out cumulative Bader charges for each tag group in the format
<<TAG>>: <<BADER_CHARGE>>where<<TAG>>is an integer used to tag atoms in anAtomsobject and<<BADER_CHARGE>>is the sum of the Bader charge of all atoms with that tag. To use this option, you must specify a file from which an Atoms object can be read via ase.io.read via the--atomsoption. Note that if both--smart-modeandINDICESare specified, this option is ignored.
- --sort-file <sort_file>¶
Specify a file in the format of
ase-sort.datused to translate indices in the Bader charge analysis file to the indices in the correspondingase.atoms.Atomsobject.
- --bader-file <bader_file>¶
Specify a path to the
CHARGE_ANALYSIS.txtfile produced bybader_analysis.py- Default:
'CHARGE_ANALYSIS.txt'
Arguments
- INDICES¶
Optional argument(s)
fancyplots¶
Launch the FancyPlots GUI.
ccu fancyplots [OPTIONS]
Options
- --cache <CACHE_FILE>¶
Load fancyplots with a cached session.
- --data <DATA_FILE>¶
Initialize fancyplots with free energy diagram data.
- --style <STYLE_FILE>¶
Specify a style file.
structure¶
Structure manipulation tools.
ccu structure [OPTIONS] COMMAND [ARGS]...
permute¶
Creates permutations of a given structure.
SITES is a list of sites to permute. Can be specified as a list of indices or a list of chemical symbols.
ccu structure permute [OPTIONS] [SITES]...
Options
- -o, --occupant <occupants>¶
a 2-tuple indicating an element with which to permute the specified sites and the number of times to include the element. This option can be specified multiple times, but note that the sum of all second elements must not exceed the number of sites specified.
- -s, --source <source>¶
Required the structure file to permute
- -d, --destination <destination>¶
the directory in which to place the permuted structure files. Defaults to current working directory.
Arguments
- SITES¶
Optional argument(s)
- Examples::
ccu structure permute -o Co 1 -o Cu 1 -s Ni.traj -d trimetallics/ 0 1 2
ccu structure permute -o Co 1 -o Cu 1 -s NiO.traj -d trimetallics/ Ni
resize-cell¶
Resizes the c-vector and centres given structure.
STRUCTURE is the structure to be resized and centred.
C_VECTOR is the new magnitude of the c-vector.
ccu structure resize-cell [OPTIONS] STRUCTURE [C_VECTOR]
Arguments
- STRUCTURE¶
Required argument
- C_VECTOR¶
Optional argument
thermo¶
Thermochemistry tools.
ccu thermo [OPTIONS] COMMAND [ARGS]...
chempot¶
Launch the chemical potential calculator parametrized with PBE-D3.
MOLECULES are the molecules for which the chemical potential will be calculated.
ccu thermo chempot [OPTIONS] MOLECULE
Options
- -t, --temperature <temperatures>¶
Specify the temperature (in Kelvin).
- Default:
273.15
- -p, --pressure <pressures>¶
Specify the temperature (in bar).
- Default:
1.0
- -i, --interactive¶
Execute interactively.
- -l, --list¶
Print the list of all molecules for which chempot is parametrized
Arguments
- MOLECULE¶
Optional argument(s)
gibbs¶
Calculate the free energy of a system.
ccu thermo gibbs [OPTIONS]
Options
- -v, --verbose¶
Controls the verbosity. 0: Show messages of level warning and higher. 1: Show messages of level info and higher. 2: Show all messages-useful for debugging.
- Default:
0
- -T, --transition-state¶
Assume that the system is a transition state when calculating the free energy of the system. One imaginary vibrational mode (corresponding to the reaction coordinate) will be discarded.
- Default:
False
- -S, --solution-phase¶
Assume that the system is in solution when calculating the free energy of the system. When activated, low vibrations are shifted to 100 cm-1; otherwise, low vibrations are shifted to 12 cm-1.
- Default:
False
- --ideal-gas¶
Use the ideal gas limit to calculate the free energy. With \(N\) atoms, \(3N - 6\) vibrational modes will be considered (\(3N - 5\) if the
--linearflag is provided).- Default:
False
- --harmonic¶
Use the harmonic limit to calculate the free energy. All vibrational modes will be considered.
- Default:
True
- -Y, --symmetry <symmetry>¶
Specify the symmetry number of the system. Note that this is only relevant under the ideal gas approximation.
- Default:
1
- --linear¶
Specify that the system is linear. Note that this is only relevant under the ideal gas approximation.
- Default:
False
- --non-linear¶
Specify that the system is nonlinear. Note that this is only relevant under the ideal gas approximation.
- Default:
True
- -t, --temperature <temperature>¶
Specify the temperature (in Kelvin).
- Default:
273.15
- -p, --pressure <pressure>¶
Specify the temperature (in bar). Note that this is only applicable for the ideal gas approximation.
- Default:
1.0
- -s, --spin <spin>¶
Specify the spin. Note that this is only relevant for the gas-phase approximation.
- Default:
0
- --atoms-file <atoms_file>¶
The name of the file containing the structure corresponding to the vibrational frequencies. Note that this is only used in the ideal gas approximation.
- Default:
'in.traj'
- --dg-file <dg_file>¶
The name of the file in which the save the quantity \(-TS + ZPE\).
- Default:
'dg_ase.log'
- --freq-file <freq_file>¶
The name of the file in which to save the frequencies used to calculate the free energy. Use “-” to print to the standard output.
- Default:
'gibbs_freq_used.txt'
- --vib-file <vib_file>¶
The name of the file from which to read the frequencies used to calculate the free energy.
- Default:
'vib.txt'
- --log-file <log_file>¶
The name of the file in which to save all the information used to calculate the free energy. Use
-to print to the standard output.
- --energy-file <energy_file>¶
The name of the file in which to save the free energy. Use
-to print to the standard output.