pyef.cli¶
Command-line interface (CLI) entry point
Module Contents¶
Functions¶
|
Print first to welcome the user while it waits to load the modules |
|
|
|
Parse a CSV file and extract specific columns as lists and tuples. |
|
Reads in auxiliary files containing job information |
|
Main function for running the pyEF workflow. |
|
CLI entry point |
|
- parse_job_batch_file(file_path)[source]¶
Parse a CSV file and extract specific columns as lists and tuples. The input file allows Python style comments on any line.
- Parameters:
file_path (str) – The file path of the CSV file to be parsed.
- Returns:
analysis_types (list of str) – List of analysis types (‘ef’, ‘esp’, ‘estab’, or combinations like ‘ef+esp’).
molden_paths (list of str) – List of paths to .molden files.
xyz_paths (list of str) – List of paths to .xyz files.
metal_indices (list of int or None) – List containing metal atom indices. None if metal indices are not provided.
bond_indices (list of tuples or None) – List of bond tuples for each job. None if bond indices are not provided.
Notes
New format (required): - analysis_type, path_to_molden, path_to_xyz, [bond_tuples or metal_index] - Examples:
ef, /path/to/optim.molden, /path/to/optim.xyz, (25, 26), (25, 27)
esp, /path/to/optim.molden, /path/to/optim.xyz, 30
estab, /path/to/optim.molden, /path/to/optim.xyz
ef+esp, /path/to/optim.molden, /path/to/optim.xyz, 35
- run_analysis(job_name, molden_paths, xyz_paths, analysis_types, metal_indices, bond_indices, dielectric, geom_flag, multiwfn_path, charge_types=['Hirshfeld_I'], multipole_bool=True, use_multipole=False, save_atomwise_decomposition=False, substrate_idxs=None, env_idxs=None, multipole_order=2, include_ptchgs=False, ptchg_file='', dielectric_scale=1.0, use_ecp=False, exclude_atoms=[])[source]¶
Main function for running the pyEF workflow.
- Parameters:
job_name (str) – Name for output files
molden_paths (list of str) – List of paths to .molden files
xyz_paths (list of str) – List of paths to .xyz files
analysis_types (list of str) – List of analysis types per job (‘ef’, ‘esp’, ‘estab’, or combinations)
metal_indices (list of int or None) – List of metal atom indices (only required for ESP analysis or auto-finding bonds)
bond_indices (list of tuples) – List of bond pairs (required for E-field if metal_indices not provided)
dielectric (float) – Dielectric constant
geom_flag (bool) – Run geometry checks
multiwfn_path (str) – Path to Multiwfn executable
charge_types (list of str, optional) – Charge partitioning schemes (default: [‘Hirshfeld_I’])
multipole_bool (bool, optional) – Use multipole expansion for E-field (default: True)
use_multipole (bool, optional) – Use multipole expansion for ESP (default: False)
save_atomwise_decomposition (bool, optional) – Save atom-wise decomposition to CSV (default: False)
substrate_idxs (list or None, optional) – Substrate atom indices for estab calculation (default: None)
env_idxs (list or None, optional) – Environment atom indices for estab calculation (default: None)
multipole_order (int, optional) – Multipole expansion order (default: 2)
include_ptchgs (bool, optional) – Include MM point charges from QM/MM calculations (default: False)
ptchg_file (str, optional) – Filename of point charge file (default: ‘’) File is looked for in the same directory as each job’s molden file. Example: ‘pointcharges.txt’ will look for this file in each job directory.
dielectric_scale (float, optional) – Dielectric scaling factor for MM charges (default: 1.0)
use_ecp (bool, optional) – Use effective core potential (ECP) correction for molden files (default: False)
exclude_atoms (list of int or list of lists, optional) – Atom indices to exclude from E-field calculations (default: []) Can be either: - Flat list [0, 1, 2] for same exclusions across all jobs - Nested list [[0, 1], [2, 3], []] for different exclusions per job
- cli(ctx, config)¶
CLI entry point
- run(config)¶