### Example DP5 Analysis Run Source: https://github.com/aelashkin/dp5/blob/master/readme.md Navigates to a specific directory and runs DP5 analysis with example files. ```bash cd reassignments/S11 pydp4 -s S11a_.sdf S11b_.sdf -n S11_NMR -w w ``` -------------------------------- ### Install DP5 with uv Source: https://github.com/aelashkin/dp5/blob/master/readme.md Installs the DP5 package in editable mode using uv. ```bash uv pip install -e . ``` -------------------------------- ### Run README Example Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Execute the example provided in the README file from the 'reassignments/S11' directory. This command runs the DP4 analysis and writes outputs to the current directory. ```bash pydp4 -s S11a_.sdf S11b_.sdf -n S11_NMR -w w ``` -------------------------------- ### Install DP5 Package Source: https://github.com/aelashkin/dp5/blob/master/docs/source/usage.md Install the DP5 package in editable mode after cloning the repository. ```bash pip install -e . ``` -------------------------------- ### Install DP5 with Development Dependencies Source: https://github.com/aelashkin/dp5/blob/master/readme.md Installs DP5 and its development dependencies in editable mode using uv. ```bash uv pip install -e ".[dev]" ``` -------------------------------- ### Install DP5 with Development Dependencies Source: https://github.com/aelashkin/dp5/blob/master/docs/source/usage.md Install DP5 along with development dependencies like Sphinx for documentation building. ```bash pip install -e ".[dev]" ``` -------------------------------- ### Install uv on macOS Source: https://github.com/aelashkin/dp5/blob/master/readme.md Installs the uv package manager on macOS using Homebrew. ```bash brew install uv ``` -------------------------------- ### Install uv on Linux Source: https://github.com/aelashkin/dp5/blob/master/readme.md Installs the uv package manager on Linux using a curl script. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Build Sphinx Documentation Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Build the project's documentation in HTML format using Sphinx after installing the 'dev' dependencies. The output will be placed in the 'docs/build/' directory. ```bash sphinx-build -M html docs/source/ docs/build/ ``` -------------------------------- ### Load NMR Dataset Source: https://github.com/aelashkin/dp5/blob/master/nmrdb-dataset/README.md Loads a compressed pickled Pandas DataFrame containing NMR shift data. Ensure you have pandas and rdkit installed. Replace 'your filename' with the actual path to the dataset file. ```python import numpy as np import pandas as pd from rdkit import Chem # useful for further manipulations filename = 'your filename' data = pd.read_pickle(filename, compression='gzip') ``` -------------------------------- ### Create and Activate Python Environment with uv Source: https://github.com/aelashkin/dp5/blob/master/readme.md Creates a Python 3.10 virtual environment using uv and activates it. ```bash uv venv --python 3.10 .venv && source .venv/bin/activate ``` -------------------------------- ### Activate uv Environment Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Activate the created virtual environment to begin using the project's tools and dependencies. ```bash source .venv/bin/activate ``` -------------------------------- ### Create Temporary Output Folder Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Create a temporary directory using mkdir to specify an explicit output location for DP5 analysis results. ```bash mkdir -p /tmp/dp5-check ``` -------------------------------- ### Show DP4 CLI Help Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Display the help message for the DP4 command-line interface, showing available commands, options, and arguments. ```bash pydp4 --help ``` -------------------------------- ### Create Compatible uv Environment Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Use this command to create a Python virtual environment compatible with the project's requirements, specifically Python 3.10. ```bash uv venv --python 3.10 .venv ``` -------------------------------- ### DP5 Command Line Arguments Source: https://github.com/aelashkin/dp5/blob/master/docs/source/usage.md Overview of command-line flags for DP5, including input files, output directory, and workflow specifications. Arguments from the command line override those in configuration files. ```bash # Example usage of command line flags: # -s: Paths to structure files. # -n: Paths to NMR spectra or their description. # -c: Path to configuration file for the run. Defaults to dp5/config/default_config.toml. # -o: Path to output directory. Defaults to current working folder. # -i: Input file type. Can be sdf, smiles, smarts, or inchi. Default is sdf. # -w: Workflow type. Must be followed by workflow flags without spaces. # --stereocentres: Limit generation to specified stereocentres when generating diastereomers. # --nmr-assignment-mode: Manual NMR assignment mode: strict (default) or legacy. # --allow-extra-peaks: In strict manual mode, report extra experimental carbon shifts instead of aborting. # --allow-missing-peaks: In strict manual mode, report missing required carbon groups instead of aborting. # -l: Log file name. # --log_level: Logging levels. Can be warning, info, or debug. Default level is info. ``` -------------------------------- ### DFTMethod.prepare_command Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Builds a shell command to run a single calculation. Subclasses can override this for engine-specific syntax. ```APIDOC ## DFTMethod.prepare_command ### Description Build a shell command to run one calculation. Concrete subclasses can override this to handle engine-specific command syntax. ### Parameters * **file** (pathlib.Path) – File stem without extension. ### Returns Shell command string. ### Return type str ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.prepare_command Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Builds a shell command to run a single DFT calculation. Concrete subclasses can override this method to handle engine-specific command syntax. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.prepare_command(file) ### Description Build a shell command to run one calculation. Concrete subclasses can override this to handle engine-specific command syntax. ### Parameters * **file** (*pathlib.Path*) – File stem without extension. ### Returns Shell command string. ### Return type str ``` -------------------------------- ### Run DP5 with Explicit Output Folder Source: https://github.com/aelashkin/dp5/blob/master/AGENTS.md Run the DP5 analysis specifying an existing output folder using the -o flag. Replace placeholders with actual file paths and workflow flags. ```bash pydp4 -s -n -w -o /tmp/dp5-check ``` -------------------------------- ### NWChem DFT Methods Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Methods for configuring and interacting with NWChem DFT calculations. ```APIDOC ## e_options() ### Description Build NWChem task block for single-point energy. ### Returns NWChem task block. ### Return type str ``` ```APIDOC ## nmr_options() ### Description Build NWChem task block for NMR shielding calculation. ### Returns NWChem task block. ### Return type str ``` ```APIDOC ## opt_options() ### Description Build NWChem task block for geometry optimisation. ### Returns NWChem task block. ### Return type str ``` ```APIDOC ## prepare_command(file) ### Description Build a shell command to run one calculation. Concrete subclasses can override this to handle engine-specific command syntax. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - File stem without extension. ### Returns Shell command string. ### Return type str ``` ```APIDOC ## read_file(file) ### Description Parse NWChem output into DP5-standard result fields. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - NWChem output path. ### Returns `(atoms, coordinates, energy, shieldings, shielding_labels, completed, opt_converged)`. ### Return type tuple ``` ```APIDOC ## write_file(filename, coordinates, atoms, charge, calc_type) ### Description Write an NWChem `.nw` input file for one conformer. ### Parameters #### Path Parameters - **filename** (pathlib.Path) - Required - Output file stem. - **coordinates** (list) - Required - Cartesian coordinates. - **atoms** (list[str]) - Required - Element symbols. - **charge** (int | float) - Required - Molecular charge. - **calc_type** (str) - Required - Calculation type. ``` -------------------------------- ### Run DP5 Analysis Source: https://github.com/aelashkin/dp5/blob/master/readme.md Executes the DP5 analysis tool with specified SDF and NMR files. ```bash pydp4 -s -n -w w ``` -------------------------------- ### DFTMethod.get_files Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Retrieves completed calculation files, loading from disk if DFT_complete is set, otherwise preparing and executing new calculations. ```APIDOC ## DFTMethod.get_files ### Description Return completed calculation files for the requested calculation. If `self.dft_complete` is set, pre-existing files are loaded from disk. Otherwise new calculations are prepared and executed. ### Parameters * **mols** (list) – Molecules with conformer geometries. * **calc_type** (str) – Calculation type label. ### Returns Output file stems grouped per molecule. ### Return type list[list[pathlib.Path]] ``` -------------------------------- ### dp5.dft.gaussian.DFTMethod.e_options Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Builds the Gaussian route section specifically for single-point energy jobs. ```APIDOC ## dp5.dft.gaussian.DFTMethod.e_options() ### Description Build Gaussian route section for single-point energy jobs. ### Returns Gaussian route section. ### Return type str ``` -------------------------------- ### Gaussian DFT Methods Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Methods for configuring and interacting with Gaussian DFT calculations. ```APIDOC ## nmr_options() ### Description Build Gaussian route section for NMR shielding jobs. ### Returns Gaussian route section. ### Return type str ``` ```APIDOC ## opt_options() ### Description Build Gaussian route section for geometry optimisation jobs. ### Returns Gaussian route section. ### Return type str ``` ```APIDOC ## prepare_command(file) ### Description Prepare Gaussian execution command using input redirection. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - Input/output file stem. ### Returns Shell command string. ### Return type str ``` ```APIDOC ## read_file(file) ### Description Parse Gaussian output into DP5-standard result fields. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - Gaussian output path. ### Returns `(atoms, coordinates, energy, shieldings, shielding_labels, completed, opt_converged)`. ### Return type tuple ``` ```APIDOC ## write_file(filename, coordinates, atoms, charge, type) ### Description Write a Gaussian `.com` input file for one conformer. ### Parameters #### Path Parameters - **filename** (pathlib.Path) - Required - Output file stem. - **coordinates** (list) - Required - Cartesian coordinates. - **atoms** (list[str]) - Required - Element symbols. - **charge** (int | float) - Required - Molecular charge. - **type** (str) - Required - Calculation type (`"opt"`, `"e"`, `"nmr"`). ``` -------------------------------- ### dp5.dft.run_dft.dft_calculations Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Runs DFT stages (optimization, single-point energy, NMR) based on workflow flags. It dynamically loads the configured backend, instantiates its DFTMethod class, and executes the requested calculations. ```APIDOC ## dp5.dft.run_dft.dft_calculations(mols, workflow, config) ### Description Run DFT stages requested by the workflow and update molecule objects. This function dynamically imports the configured backend module, instantiates its `DFTMethod` class, and then executes optimisation, single-point energy, and/or NMR stages depending on workflow flags. ### Parameters * **mols** (*list*) – Molecule objects handled by the molecules container. * **workflow** (*dict*) – Workflow control flags (for example `dft_opt`, `dft_energies`, `dft_nmr`). * **config** (*dict*) – DFT configuration subsection. ### Returns Updated molecule list. ### Return type list ``` -------------------------------- ### Clone DP5 Repository Source: https://github.com/aelashkin/dp5/blob/master/readme.md Clones the DP5 repository from GitHub to your local machine. ```bash git clone https://github.com/ruslankotl/DP5.git ``` -------------------------------- ### ORCA DFT Methods Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Methods for configuring and interacting with ORCA DFT calculations. ```APIDOC ## prepare_command(file) ### Description Build a shell command to run one calculation. Concrete subclasses can override this to handle engine-specific command syntax. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - File stem without extension. ### Returns Shell command string. ### Return type str ``` ```APIDOC ## read_file(file) ### Description Parse ORCA output into DP5-standard result fields. ### Parameters #### Path Parameters - **file** (pathlib.Path) - Required - ORCA output path. ### Returns `(atoms, coordinates, energy, shieldings, shielding_labels, completed, converged)`. ### Return type tuple ``` ```APIDOC ## write_file(filename, coordinates, atoms, charge, calc_type) ### Description Write an ORCA `.inp` input file for one conformer. ### Parameters #### Path Parameters - **filename** (pathlib.Path) - Required - Output file stem. - **coordinates** (list) - Required - Cartesian coordinates. - **atoms** (list[str]) - Required - Element symbols. - **charge** (int | float) - Required - Molecular charge. - **calc_type** (str) - Required - Calculation type. ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.get_files Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Retrieves calculation files for a specified calculation type. If the DFT calculation is already complete, it loads existing files from disk; otherwise, it prepares and executes new calculations. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.get_files(mols, calc_type) ### Description Return completed calculation files for the requested calculation. If `self.dft_complete` is set, pre-existing files are loaded from disk. Otherwise new calculations are prepared and executed. ### Parameters * **mols** (*list*) – Molecules with conformer geometries. * **calc_type** (*str*) – Calculation type label. ### Returns Output file stems grouped per molecule. ### Return type list[list[pathlib.Path]] ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.write_file Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Writes an engine-specific input file for a single conformer. This method is intended to be overridden by concrete subclasses to handle the specific input file format of different DFT engines. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.write_file(filename, coordinates, atoms, charge, calc_type) ### Description Write an engine-specific input file for one conformer. ### Parameters * **filename** (*pathlib.Path*) – File stem without extension. * **coordinates** (*list*) – Cartesian coordinates for one conformer. * **atoms** (*list* *[**str* *]*) – Element symbols matching `coordinates`. * **charge** (*int* *|* *float*) – Molecular charge to use for the job. * **calc_type** (*str*) – Calculation type label. ``` -------------------------------- ### DFTMethod.read_file Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Parses ORCA output files into DP5-standard result fields. ```APIDOC ## DFTMethod.read_file ### Description Parse ORCA output into DP5-standard result fields. ### Parameters * **file** (pathlib.Path) – ORCA output path. ### Returns `(atoms, coordinates, energy, shieldings, shielding_labels, completed, converged)`. ### Return type tuple ``` -------------------------------- ### Manual NMR Description Format Source: https://github.com/aelashkin/dp5/blob/master/readme.md Illustrates the format for manual NMR descriptions, including carbon shifts, proton shifts, and atom assignments. ```text 140.1(any),129.7(any),126.7(C10),20.3(C14,C23) 0.0(any) C1,C3 C4,C5 C14,C23 OMIT C19,H51 ``` -------------------------------- ### DFTMethod.opt Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Runs or reads geometry optimization results for a list of molecules. ```APIDOC ## DFTMethod.opt ### Description Run/read geometry optimisation results. ### Parameters * **mols** (list) – Molecules to optimise. ### Returns Tuple of `(atoms, conformers, energies)` grouped by molecule, where conformers and energies correspond to converged optimisation outputs. ### Return type tuple[list, list, list] ``` -------------------------------- ### Legacy NMR Assignment Mode Source: https://github.com/aelashkin/dp5/blob/master/readme.md Enables the previous loose assignment behavior for NMR descriptions. ```bash --nmr-assignment-mode legacy ``` -------------------------------- ### DP5 Workflow Flags Source: https://github.com/aelashkin/dp5/blob/master/docs/source/usage.md Specifies workflow actions for DP5. These flags correspond to configuration file settings and control tasks like structure generation, conformational search, and analysis. ```bash # Workflow flags and their meanings: # c: cleanup - generate 3D structure, optimise using MMFF # g: generate - generate diastereomers # m: conf_search - perform conformational search # o: dft_opt - optimise geometries using DFT # e: dft_energies - calculate single point energies using DFT # n: dft_nmr - calculate NMR spectra using DFT-GIAO method # a: assign_only - assignment only (currently not supported) # s: dp4 - perform DP4 analysis # w: dp5 - perform DP5 analysis # Example: Default DP4 workflow for establishing stereochemistry # -w gnms # Example: Best results using DP5 workflow # -w gnomes ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.opt Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Runs or reads geometry optimization results for a list of molecules. Returns conformers and energies corresponding to converged optimization outputs. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.opt(mols) ### Description Run/read geometry optimisation results. ### Parameters * **mols** (*list*) – Molecules to optimise. ### Returns Tuple of `(atoms, conformers, energies)` grouped by molecule, where conformers and energies correspond to converged optimisation outputs. ### Return type tuple[list, list, list] ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.read_file Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Reads the output file of a DFT calculation, inspired by the cclib parser. It extracts atoms, coordinates, energies, shieldings, shielding labels, and flags for calculation termination and optimization convergence. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.read_file(file) ### Description Reads output file. Inspired by cclib parser ### Returns - atoms - coordinates - energies - shieldings - shielding labels - if calculation terminated normally - if optimisation has converged ``` -------------------------------- ### Allow Extra or Missing Peaks Source: https://github.com/aelashkin/dp5/blob/master/readme.md Flags to report partial coverage instead of aborting when extra or missing peaks are detected in NMR assignments. ```bash --allow-extra-peaks ``` ```bash --allow-missing-peaks ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.energy Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Runs or reads single-point energy calculations for a list of molecules. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.energy(mols) ### Description Run/read single-point energy calculations. ### Parameters * **mols** (*list*) – Molecules to evaluate. ### Returns Tuple of `(atoms, conformers, energies)` grouped by molecule. ### Return type tuple[list, list, list] ``` -------------------------------- ### DFTMethod.energy Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Runs or reads single-point energy calculations for a list of molecules. ```APIDOC ## DFTMethod.energy ### Description Run/read single-point energy calculations. ### Parameters * **mols** (list) – Molecules to evaluate. ### Returns Tuple of `(atoms, conformers, energies)` grouped by molecule. ### Return type tuple[list, list, list] ``` -------------------------------- ### dp5.nmr_processing.proton.bic_minimisation.BIC_minimisation_region_full Source: https://github.com/aelashkin/dp5/blob/master/docs/source/nmr_processing_api.md Fits and prunes a Pearson-VII model for a single proton region. It constructs an initial multi-peak model, relaxes parameters using lmfit, and iteratively removes peaks based on the Bayesian Information Criterion. ```APIDOC ## dp5.nmr_processing.proton.bic_minimisation.BIC_minimisation_region_full(ind1, uc, peak_regions, grouped_peaks, total_spectral_ydata, corr_distance, std) ### Description Fit and prune a Pearson-VII model for a single proton region. The routine constructs an initial multi-peak model from the candidate peaks in one region, relaxes the Pearson-VII parameters with `lmfit`, and then removes peaks one at a time whenever doing so lowers the Bayesian Information Criterion by more than a fixed threshold. ### Parameters #### Path Parameters - **ind1** (int) - Required - Region index within `peak_regions`. - **uc** (object) - Required - `nmrglue` unit-conversion object. - **peak_regions** (sequence) - Required - Regions of the spectrum identified as containing proton signal. - **grouped_peaks** (sequence) - Required - Candidate peak indices grouped by region. - **total_spectral_ydata** (numpy.ndarray) - Required - Processed proton spectrum intensities. - **corr_distance** (int) - Required - Correlation distance used to constrain peak widths and movement during fitting. - **std** (float) - Required - Estimated noise level. ### Returns Surviving fitted peaks, fitted parameters, and the simulated line shape for the region. ### Return type tuple[list, lmfit.Parameters, numpy.ndarray] ``` -------------------------------- ### dp5.nmr_processing.proton.bic_minimisation.multiproc_BIC_minimisation Source: https://github.com/aelashkin/dp5/blob/master/docs/source/nmr_processing_api.md Fits all proton regions in parallel and rebuilds the final multiplets. This function dispatches `BIC_minimisation_region_full` across regions, collects models, and reconstructs boundaries. ```APIDOC ## dp5.nmr_processing.proton.bic_minimisation.multiproc_BIC_minimisation(peak_regions, grouped_peaks, total_spectral_ydata, corr_distance, uc, std) ### Description Fit all proton regions in parallel and rebuild the final multiplets. This wrapper dispatches [`BIC_minimisation_region_full()`](#dp5.nmr_processing.proton.bic_minimisation.BIC_minimisation_region_full) over all preliminary proton regions, collects the per-region peak models, and then rebuilds the final region boundaries after splitting fitted groups that are more than 20 Hz apart. ### Parameters #### Path Parameters - **peak_regions** (sequence) - Required - Preliminary proton signal regions. - **grouped_peaks** (sequence) - Required - Candidate peak indices grouped by preliminary region. - **total_spectral_ydata** (numpy.ndarray) - Required - Processed proton spectrum intensities. - **corr_distance** (int) - Required - Correlation distance estimated during spectral processing. - **uc** (object) - Required - `nmrglue` unit-conversion object. - **std** (float) - Required - Estimated noise level. ### Returns Final picked peaks, grouped peaks, region boundaries, simulated global fit, and the combined fitted parameters. ### Return type tuple ``` -------------------------------- ### DFTMethod.is_completed Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Checks if a calculation terminated normally by looking for a completion flag. ```APIDOC ## DFTMethod.is_completed ### Description Check whether a calculation terminated normally. ### Parameters * **file** (pathlib.Path) – Output file path. ### Returns `True` if calculation completion flag is found. ### Return type bool ``` -------------------------------- ### DFTMethod.is_converged Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Checks if an optimization is marked as converged. ```APIDOC ## DFTMethod.is_converged ### Description Check whether an optimisation is marked as converged. ### Parameters * **file** (pathlib.Path) – Output file path. ### Returns `True` if optimisation converged. ### Return type bool ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.nmr Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Runs or reads NMR shielding calculations for a list of molecules. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.nmr(mols) ### Description Run/read NMR shielding calculations. ### Parameters * **mols** (*list*) – Molecules to evaluate. ### Returns Tuple of `(atoms, conformers, energies, shieldings, shielding_labels)` grouped by molecule. ### Return type tuple[list, list, list, list, list] ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.is_completed Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Checks if a calculation terminated normally by looking for a completion flag in the output file. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.is_completed(file) ### Description Check whether a calculation terminated normally. ### Parameters * **file** (*pathlib.Path*) – Output file path. ### Returns `True` if calculation completion flag is found. ### Return type bool ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.is_converged Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Checks if an optimization calculation is marked as converged in the output file. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.is_converged(file) ### Description Check whether an optimisation is marked as converged. ### Parameters * **file** (*pathlib.Path*) – Output file path. ### Returns `True` if optimisation converged. ### Return type bool ``` -------------------------------- ### DFTMethod.atom_num_to_symbol Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Converts an atomic number to its corresponding element symbol. ```APIDOC ## DFTMethod.atom_num_to_symbol ### Description Convert atomic number to element symbol. ### Parameters * **anum** (int) – Atomic number (1-indexed). ### Returns Element symbol. ### Return type str ``` -------------------------------- ### DFTMethod.nmr Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_architecture.md Runs or reads NMR shielding calculations for a list of molecules. ```APIDOC ## DFTMethod.nmr ### Description Run/read NMR shielding calculations. ### Parameters * **mols** (list) – Molecules to evaluate. ### Returns Tuple of `(atoms, conformers, energies, shieldings, shielding_labels)` grouped by molecule. ### Return type tuple[list, list, list, list, list] ``` -------------------------------- ### dp5.nmr_processing.proton.process.proton_processing Source: https://github.com/aelashkin/dp5/blob/master/docs/source/nmr_processing_api.md Processes a proton FID into assignment-ready multiplets. This function implements the full DP4-AI processing path, including spectral correction, peak picking, pruning, solvent removal, and region simulation. ```APIDOC ## dp5.nmr_processing.proton.process.proton_processing(total_spectral_ydata, uc, solvent) ### Description Process a proton FID into assignment-ready multiplets. The proton pipeline implements the most complete DP4-AI processing path: spectral correction, derivative-based peak picking, BIC-guided peak-model pruning, solvent removal, and region simulation for later integration. ### Parameters #### Path Parameters - **total_spectral_ydata** (numpy.ndarray) - Required - Complex frequency-domain proton spectrum. - **uc** (object) - Required - `nmrglue` unit-conversion object for converting point indices into ppm and Hz. - **solvent** (str) - Required - Solvent identifier used for solvent detection and referencing. ### Returns PPM axis, processed spectrum, final peak regions, grouped peaks, fitted peak indices, combined fit parameters, and simulated regions for downstream integration. ### Return type tuple ``` -------------------------------- ### dp5.dft.base_dft_method.BaseDFTMethod.atom_num_to_symbol Source: https://github.com/aelashkin/dp5/blob/master/docs/source/dft_api.md Converts an atomic number to its corresponding element symbol. ```APIDOC ## dp5.dft.base_dft_method.BaseDFTMethod.atom_num_to_symbol(anum: int) → str ### Description Convert atomic number to element symbol. ### Parameters * **anum** (*int*) – Atomic number (1-indexed). ### Returns Element symbol. ### Return type str ``` -------------------------------- ### dp5.nmr_processing.proton.assign.iterative_assignment Source: https://github.com/aelashkin/dp5/blob/master/docs/source/nmr_processing_api.md Assigns calculated proton shifts to processed multiplet centres using a strategy similar to DP4-AI. It involves initial scaling, integral-constrained methyl group assignment, Hungarian optimization, and iterative refinement. ```APIDOC ## dp5.nmr_processing.proton.assign.iterative_assignment(mol, exp_peaks, calculated_shifts, H_labels, rounded_integrals) ### Description Assign calculated proton shifts to processed multiplet centres. The implementation mirrors the DP4-AI proton assignment strategy described in the paper and ESI. A first pass uses external scaling, methyl groups are assigned as integral-constrained bundles, the remaining protons are matched with a Hungarian optimisation over a probability matrix, and the assignment is repeated after internal scaling until it converges. ### Parameters #### Path Parameters - **mol** (object) - Required - RDKit molecule used to identify methyl groups from connectivity. - **exp_peaks** (numpy.ndarray) - Required - Experimental multiplet centres in ppm, expanded according to the rounded integrals so that peaks can be assigned multiple times. - **calculated_shifts** (numpy.ndarray) - Required - Calculated proton shifts from DFT or a surrogate model. - **H_labels** (numpy.ndarray) - Required - Proton labels corresponding to `calculated_shifts`. - **rounded_integrals** (numpy.ndarray) - Required - Integer-like multiplet integrals derived from the deconvolved proton spectrum. ### Returns Assigned calculated shifts, assigned experimental peaks, assigned labels, and the final scaled shifts used internally. ### Return type tuple[list, list, list, numpy.ndarray] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.