tfep.potentials.mimic.Cpmd
- class tfep.potentials.mimic.Cpmd(*args, executable_path=None, **kwargs)[source]
Bases:
CLIToolThe CPMD command.
The CPMD command takes two positional arguments: the path to the input script and the path to the directory including the definitions of the pseudopoentials. If given as relative paths, these must be relative to the working directory at the time of the execution.
- Parameters:
input_file_path (str) – The CPMD input file path.
pseudopotential_dir_path (str, optional) – The path to the directory including the pseudopotential definitions.
executable_path (str, optional) – The executable path associated to the instance of the command. If this is not specified, the
EXECUTABLE_PATHclass variable is used instead.
Examples
>>> cmd = Cpmd('input.in', 'path/to/pseudopotentials/') >>> cmd.to_subprocess() ['cpmd', 'input.in', 'path/to/pseudopotentials/']
If the executable is called differently, simply specify the executable path as a keyword argument.
>>> cmd = Cpmd('input.in', 'path/to/pseudopotentials/', executable_path='cpmd.x') >>> cmd.to_subprocess() ['cpmd.x', 'input.in', 'path/to/pseudopotentials/']
- __init__(*args, executable_path=None, **kwargs)
Methods
__init__(*args[, executable_path])Convert the command to a list that can be run with the
subprocessmodule.Attributes
EXECUTABLE_PATHSUBPROGRAMThe path to the command executable to run.
- property executable_path
The path to the command executable to run.
- to_subprocess()
Convert the command to a list that can be run with the
subprocessmodule.- Returns:
subprocess_cmd – The command in subprocess format. For example
['grep', '-v'].- Return type:
List[str]