chemsmart.settings package

Submodules

chemsmart.settings.executable module

class chemsmart.settings.executable.Executable(executable_folder=None, local_run=False, conda_env=None, modules=None, scripts=None, envars=None)[source]

Bases: RegistryMixin

Abstract base class for obtaining program executable paths and configurations.

This class provides a framework for managing executable configurations for different computational chemistry programs. It reads configuration from server YAML files and handles environment setup including conda environments, modules, scripts, and environment variables.

PROGRAM: Optional[str] = None
property available_servers

Get list of available server configurations.

Returns:

List of available server configuration names.

Return type:

list

property env

Parse environment variables from envars configuration.

Extracts export statements from the envars string and returns them as a dictionary of environment variables.

Returns:

Dictionary of environment variables if envars is set,

None otherwise.

Return type:

dict or None

classmethod from_servername(servername)[source]

Create an Executable instance from server configuration file.

Reads configuration from a YAML file in the user’s server directory and creates an instance with the appropriate settings for the specified computational chemistry program.

Parameters:

servername (str) – Name of the server configuration file (with or without .yaml extension).

Returns:

An instance configured with server-specific settings.

Return type:

Executable

property scratch_dir

Extract scratch directory path from environment variables.

Parses the envars configuration to find SCRATCH directory definition.

Returns:

Path to scratch directory if defined, None otherwise.

Return type:

str or None

class chemsmart.settings.executable.GaussianExecutable(executable_folder=None, **kwargs)[source]

Bases: Executable

Executable handler for Gaussian quantum chemistry software.

This class provides specific implementation for managing Gaussian 16 executable paths and configurations.

PROGRAM: Optional[str] = 'GAUSSIAN'
get_executable()[source]

Get the full path to the Gaussian executable.

Returns:

Full path to g16 executable if executable_folder is set,

None otherwise.

Return type:

str or None

class chemsmart.settings.executable.NCIPLOTExecutable(executable_folder=None, **kwargs)[source]

Bases: Executable

Executable handler for NCIPLOT non-covalent interaction analysis software.

This class provides specific implementation for managing NCIPLOT executable paths and configurations.

PROGRAM: Optional[str] = 'NCIPLOT'
get_executable()[source]

Get the full path to the NCIPLOT executable.

Returns:

Full path to nciplot executable if executable_folder is set,

None otherwise.

Return type:

str or None

class chemsmart.settings.executable.ORCAExecutable(executable_folder=None, **kwargs)[source]

Bases: Executable

Executable handler for ORCA quantum chemistry software.

This class provides specific implementation for managing ORCA executable paths and configurations.

PROGRAM: Optional[str] = 'ORCA'
get_executable()[source]

Get the full path to the ORCA executable.

Returns:

Full path to orca executable if executable_folder is set,

None otherwise.

Return type:

str or None

chemsmart.settings.gaussian module

class chemsmart.settings.gaussian.GaussianProjectSettings[source]

Bases: RegistryMixin

Base class for Gaussian project settings with default configurations.

This class provides a framework for managing Gaussian calculation settings across different job types. It defines default settings for common quantum chemistry calculations including geometry optimization, transition state searches, and various analysis methods.

PROJECT_NAME

Identifier for the project configuration.

Type:

str

functional

DFT functional to use for calculations.

Type:

str, optional

small_basis

Basis set for initial/fast calculations.

Type:

str, optional

large_basis

Basis set for high-accuracy calculations.

Type:

str, optional

PROJECT_NAME = 'general'
classmethod from_project(project)[source]

Create project settings instance based on project name.

Searches for project configuration in the following order: 1. User-defined project settings directory 2. Chemsmart test project configurations

Parameters:

project (str) – Name of the project configuration to load.

Returns:

Configured settings instance.

Return type:

GaussianProjectSettings

Raises:
functional = None
irc_settings()[source]

Get default settings for Intrinsic Reaction Coordinate calculations.

Returns:

IRC-specific settings with frequency disabled.

Return type:

GaussianIRCJobSettings

large_basis = None
main_settings()[source]

Get main Gaussian settings with key default values.

Returns:

Default job settings with functional and basis set.

Return type:

GaussianJobSettings

modred_settings()[source]

Get default settings for modified redundant coordinate optimization.

Returns:

Settings for constrained optimization jobs.

Return type:

GaussianJobSettings

nci_settings()[source]

Get default settings for Non-Covalent Interaction analysis.

Returns:

Settings for NCI analysis with frequency disabled.

Return type:

GaussianJobSettings

opt_settings()[source]

Get default settings for geometry optimization jobs.

Returns:

Settings configured for structure optimization.

Return type:

GaussianJobSettings

qmmm_settings()[source]

Gaussian default settings for qmmm job.

scan_settings()[source]

Get default settings for potential energy surface scan calculations.

Returns:

Settings for coordinate scanning with frequency disabled.

Return type:

GaussianJobSettings

small_basis = None
sp_settings()[source]

Get default settings for single point energy calculations.

Uses the large basis set for higher accuracy and disables frequency calculations for computational efficiency.

Returns:

Settings for single point calculations.

Return type:

GaussianJobSettings

ts_settings()[source]

Get default settings for transition state optimization jobs.

Returns:

Settings for transition state searches.

Return type:

GaussianJobSettings

wbi_settings()[source]

Get default settings for Wiberg Bond Index calculations.

Returns:

Settings for WBI analysis with frequency disabled.

Return type:

GaussianJobSettings

class chemsmart.settings.gaussian.GaussianProjectSettingsManager(filename)[source]

Bases: object

Manager for Gaussian project settings from YAML configuration files.

Provides management interface for loading Gaussian computational chemistry project settings from YAML files in a specified folder structure. Handles file validation and project settings creation.

filename

Absolute path to the YAML configuration file.

Type:

str

create()[source]

Create project settings from the specified YAML file.

Loads and parses the YAML configuration file to create a complete Gaussian project settings instance with all job configurations.

Returns:

Configured project settings loaded

from the YAML file.

Return type:

YamlGaussianProjectSettings

Raises:
class chemsmart.settings.gaussian.YamlGaussianProjectSettings(opt_settings, modred_settings, ts_settings, irc_settings, scan_settings, nci_settings, sp_settings, td_settings, wbi_settings, qmmm_settings)[source]

Bases: GaussianProjectSettings

YAML-based implementation of Gaussian project settings.

This class loads and manages Gaussian calculation settings from YAML configuration files. It provides specific settings for each job type as defined in the YAML configuration.

PROJECT_NAME

Set to “yaml” to identify YAML-based settings.

Type:

str

PROJECT_NAME = 'yaml'
classmethod from_yaml(filename)[source]
irc_settings()[source]

Get default settings for Intrinsic Reaction Coordinate calculations.

Returns:

IRC-specific settings with frequency disabled.

Return type:

GaussianIRCJobSettings

modred_settings()[source]

Get default settings for modified redundant coordinate optimization.

Returns:

Settings for constrained optimization jobs.

Return type:

GaussianJobSettings

nci_settings()[source]

Get default settings for Non-Covalent Interaction analysis.

Returns:

Settings for NCI analysis with frequency disabled.

Return type:

GaussianJobSettings

opt_settings()[source]

Get default settings for geometry optimization jobs.

Returns:

Settings configured for structure optimization.

Return type:

GaussianJobSettings

qmmm_settings()[source]

Gaussian default settings for qmmm job.

scan_settings()[source]

Get default settings for potential energy surface scan calculations.

Returns:

Settings for coordinate scanning with frequency disabled.

Return type:

GaussianJobSettings

sp_settings()[source]

Get default settings for single point energy calculations.

Uses the large basis set for higher accuracy and disables frequency calculations for computational efficiency.

Returns:

Settings for single point calculations.

Return type:

GaussianJobSettings

td_settings()[source]
ts_settings()[source]

Get default settings for transition state optimization jobs.

Returns:

Settings for transition state searches.

Return type:

GaussianJobSettings

wbi_settings()[source]

Get default settings for Wiberg Bond Index calculations.

Returns:

Settings for WBI analysis with frequency disabled.

Return type:

GaussianJobSettings

class chemsmart.settings.gaussian.YamlGaussianProjectSettingsBuilder(filename)[source]

Bases: object

Builder class for constructing YAML-based Gaussian project settings.

This class reads YAML configuration files and builds appropriate GaussianJobSettings instances for each job type. It handles the mapping between YAML configuration and specific settings classes.

filename

Path to the YAML configuration file.

Type:

str

build()[source]

Build a complete YamlGaussianProjectSettings instance.

Reads the YAML configuration and creates settings for all supported job types including optimization, transition states, IRC, scans, etc.

Returns:

Fully configured project settings.

Return type:

YamlGaussianProjectSettings

chemsmart.settings.orca module

class chemsmart.settings.orca.ORCAProjectSettings[source]

Bases: RegistryMixin

Base class for ORCA project settings with default configurations.

Provides fundamental settings and configurations for ORCA quantum chemistry calculations. Includes default values for computational parameters and methods for creating job-specific settings for various calculation types.

PROJECT_NAME

Name identifier for the project.

Type:

str

functional

DFT functional to use for calculations.

Type:

str

small_basis

Small basis set for initial calculations.

Type:

str

large_basis

Large basis set for high-accuracy calculations.

Type:

str

PROJECT_NAME = 'general'
classmethod from_project(project)[source]

Get project settings based on project name.

Loads project settings from various sources including user-defined settings and built-in test projects. Provides detailed error messages if the requested project is not found.

Parameters:

project (str) – Name of the project to load settings for.

Returns:

Configured YAML-based project settings instance.

Return type:

YamlORCAProjectSettings

Raises:

FileNotFoundError – If no project settings are found for the specified project name, with guidance on creating new settings.

functional = None
irc_settings()[source]

ORCA settings for intrinsic reaction coordinate calculations.

Creates settings for IRC calculations that trace reaction pathways from transition states to reactants and products. Frequency calculations are disabled by default for IRC jobs.

Returns:

Settings configured for IRC calculations.

Return type:

ORCAIRCJobSettings

large_basis = None
main_settings()[source]

Create main ORCA settings with default values.

Provides the base settings configuration that serves as the foundation for all other job types. Includes functional and basis set assignments.

Returns:

Default ORCA job settings with functional and basis set.

Return type:

ORCAJobSettings

modred_settings()[source]

ORCA settings for modredundant coordinate optimization.

Creates settings for constrained optimization using modredundant coordinates, allowing partial optimization of specific coordinates.

Returns:

Settings configured for modredundant optimization.

Return type:

ORCAJobSettings

nci_settings()[source]

ORCA settings for non-covalent interaction analysis.

Creates settings for NCI (Non-Covalent Interaction) analysis calculations that identify and characterize weak intermolecular interactions. Frequency calculations are disabled by default.

Returns:

Settings configured for NCI analysis.

Return type:

ORCAJobSettings

neb_settings()[source]

Create default ORCA NEB job settings.

Returns ORCANEBJobSettings instance with base configuration inherited from main settings and NEB-specific defaults.

Returns:

Default NEB settings with freq disabled

Return type:

ORCANEBJobSettings

opt_settings()[source]

ORCA settings for geometry optimization calculations.

Creates settings for geometry optimization jobs that find minimum energy structures on the potential energy surface.

Returns:

Settings configured for geometry optimization.

Return type:

ORCAJobSettings

qmmm_settings()[source]

ORCA default settings for QMMM job.

scan_settings()[source]

ORCA settings for potential energy surface scan calculations.

Creates settings for relaxed coordinate scans to explore potential energy surfaces along specific reaction coordinates. Frequency calculations are disabled by default.

Returns:

Settings configured for coordinate scan calculations.

Return type:

ORCAJobSettings

small_basis = None
sp_settings()[source]

ORCA settings for single point energy calculations.

Creates settings for single point calculations at higher level of theory using large basis set. Frequency calculations are disabled and the large basis set is used for improved accuracy.

Returns:

Settings configured for single point calculations.

Return type:

ORCAJobSettings

ts_settings()[source]

ORCA settings for transition state optimization calculations.

Creates settings for finding and optimizing transition states using specialized TS optimization algorithms in ORCA.

Returns:

Settings configured for transition state optimization.

Return type:

ORCATSJobSettings

wbi_settings()[source]

ORCA settings for Wiberg Bond Index calculations.

Creates settings for WBI calculations that provide quantitative measures of bond orders and electron sharing between atoms. Frequency calculations are disabled by default.

Returns:

Settings configured for WBI calculations.

Return type:

ORCAJobSettings

class chemsmart.settings.orca.ORCAProjectSettingsManager(filename)[source]

Bases: object

Manager for ORCA project settings from YAML configuration files.

Provides management interface for loading ORCA computational chemistry project settings from YAML files in a specified folder structure. Handles file validation and project settings creation.

filename

Absolute path to the YAML configuration file.

Type:

str

create()[source]

Create project settings from the specified YAML file.

Loads and parses the YAML configuration file to create a complete ORCA project settings instance with all job configurations.

Returns:

Configured project settings loaded

from the YAML file.

Return type:

YamlORCAProjectSettings

Raises:
class chemsmart.settings.orca.YamlORCAProjectSettings(opt_settings, modred_settings, ts_settings, irc_settings, scan_settings, nci_settings, sp_settings, td_settings, wbi_settings, qmmm_settings, neb_settings)[source]

Bases: ORCAProjectSettings

YAML-based ORCA project settings with job-specific configurations.

This class loads and manages ORCA calculation settings from YAML configuration files, providing pre-configured settings for different job types. Each job type maintains its own settings instance.

PROJECT_NAME

Project name identifier for YAML settings.

Type:

str

_opt_settings

Geometry optimization job settings.

_modred_settings

Modredundant coordinate job settings.

_ts_settings

Transition state optimization settings.

_irc_settings

Intrinsic reaction coordinate settings.

_scan_settings

Coordinate scan job settings.

_nci_settings

Non-covalent interaction analysis settings.

_sp_settings

Single point calculation settings.

_td_settings

Time-dependent DFT settings.

_wbi_settings

Wiberg bond index calculation settings.

PROJECT_NAME = 'yaml'
classmethod from_yaml(filename)[source]
irc_settings()[source]

Get intrinsic reaction coordinate calculation settings.

Returns:

Pre-configured IRC calculation settings.

Return type:

ORCAIRCJobSettings

modred_settings()[source]

Get modredundant coordinate optimization settings.

Returns:

Pre-configured modredundant settings.

Return type:

ORCAJobSettings

nci_settings()[source]

Get non-covalent interaction analysis settings.

Returns:

Pre-configured NCI analysis settings.

Return type:

ORCAJobSettings

neb_settings()[source]

Get Nudged Elastic Band calculation settings.

Returns:

Pre-configured NEB calculation settings.

Return type:

ORCANEBJobSettings

opt_settings()[source]

Get geometry optimization settings.

Returns:

Pre-configured optimization settings.

Return type:

ORCAJobSettings

qmmm_settings()[source]

ORCA default settings for QMMM job.

scan_settings()[source]

Get coordinate scan calculation settings.

Returns:

Pre-configured scan calculation settings.

Return type:

ORCAJobSettings

sp_settings()[source]

Get single point calculation settings.

Returns:

Pre-configured single point settings.

Return type:

ORCAJobSettings

td_settings()[source]

Get time-dependent DFT calculation settings.

Returns:

Pre-configured TD-DFT settings.

Return type:

ORCAJobSettings

ts_settings()[source]

Get transition state optimization settings.

Returns:

Pre-configured TS optimization settings.

Return type:

ORCATSJobSettings

wbi_settings()[source]

Get Wiberg bond index calculation settings.

Returns:

Pre-configured WBI calculation settings.

Return type:

ORCAJobSettings

class chemsmart.settings.orca.YamlORCAProjectSettingsBuilder(filename)[source]

Bases: object

Builder class for constructing YAML-based ORCA project settings.

This class reads YAML configuration files and builds appropriate ORCA project settings with job-specific configurations. Handles the mapping of YAML data to ORCA job settings objects.

filename

Path to the YAML configuration file.

Type:

str

build()[source]

Build complete ORCA project settings from YAML configuration.

Reads the YAML file and creates job-specific settings for all supported ORCA calculation types, constructing a complete project settings instance.

Returns:

Complete project settings with all

job types configured from YAML data.

Return type:

YamlORCAProjectSettings

Raises:

chemsmart.settings.server module

class chemsmart.settings.server.LSFServer(**kwargs)[source]

Bases: YamlServerSettings

LSF-specific server configuration.

Specialized server class for LSF (Load Sharing Facility) scheduler environments. Provides LSF-specific defaults and configurations.

NAME

Server type identifier (‘LSF’).

Type:

str

SCHEDULER_TYPE

Scheduler system type (‘LSF’).

Type:

str

name

Inherited; effective identifier (typically ‘LSF.yaml’).

Type:

str

kwargs

Inherited; configuration values parsed from YAML.

Type:

dict

_num_hours

Inherited default job time allocation.

Type:

int or None

_queue_name

Inherited default submission queue.

Type:

str or None

NAME = 'LSF'
SCHEDULER_TYPE = 'LSF'
class chemsmart.settings.server.PBSServer(**kwargs)[source]

Bases: YamlServerSettings

PBS-specific server configuration.

Specialized server class for PBS (Portable Batch System) scheduler environments. Provides PBS-specific defaults and configurations.

NAME

Server type identifier (‘PBS’).

Type:

str

SCHEDULER_TYPE

Scheduler system type (‘PBS’).

Type:

str

name

Inherited; effective identifier (typically ‘PBS.yaml’).

Type:

str

kwargs

Inherited; configuration values parsed from YAML.

Type:

dict

_num_hours

Inherited default job time allocation.

Type:

int or None

_queue_name

Inherited default submission queue.

Type:

str or None

NAME = 'PBS'
SCHEDULER_TYPE = 'PBS'
class chemsmart.settings.server.SGE_Server(**kwargs)[source]

Bases: YamlServerSettings

SGE-specific server configuration.

Specialized server class for SGE (Sun Grid Engine) scheduler environments. Provides SGE-specific defaults and configurations.

NAME

Server type identifier (‘SGE’).

Type:

str

SCHEDULER_TYPE

Scheduler system type (‘SGE’).

Type:

str

name

Inherited; effective identifier (typically ‘SGE.yaml’).

Type:

str

kwargs

Inherited; configuration values parsed from YAML.

Type:

dict

_num_hours

Inherited default job time allocation.

Type:

int or None

_queue_name

Inherited default submission queue.

Type:

str or None

NAME = 'SGE'
SCHEDULER_TYPE = 'SGE'
class chemsmart.settings.server.SLURMServer(**kwargs)[source]

Bases: YamlServerSettings

SLURM-specific server configuration.

Specialized server class for SLURM (Simple Linux Utility for Resource Management) scheduler environments. Provides SLURM-specific defaults and configurations for computational clusters.

NAME

Server type identifier (‘SLURM’).

Type:

str

SCHEDULER_TYPE

Scheduler system type (‘SLURM’).

Type:

str

name

Inherited; effective identifier (typically ‘SLURM.yaml’).

Type:

str

kwargs

Inherited; configuration values parsed from YAML.

Type:

dict

_num_hours

Inherited default job time allocation.

Type:

int or None

_queue_name

Inherited default submission queue.

Type:

str or None

NAME = 'SLURM'
SCHEDULER_TYPE = 'SLURM'
class chemsmart.settings.server.Server(name, **kwargs)[source]

Bases: RegistryMixin

Base class for computational server configurations.

Represents a computational server or cluster environment with associated settings for job submission, resource allocation, and queue management. Provides methods for server comparison, serialization, and configuration management.

name

Unique identifier for the server.

Type:

str

kwargs

Additional server configuration parameters.

Type:

dict

_num_hours

Default number of hours for job allocation.

Type:

int

_queue_name

Default queue name for job submission.

Type:

str

classmethod current()[source]

Get the current server based on detected scheduler type.

Returns:

Server instance for the current environment.

Return type:

Server

static detect_server_scheduler()[source]

Detect the server’s job scheduler system.

Checks for environment variables and available commands to identify the type of job scheduler running on the current system.

Returns:

The detected scheduler type (e.g., SLURM, PBS, LSF, SGE, HTCondor)

or “Unknown Scheduler” if none detected.

Return type:

str

property extra_commands

Get additional commands to execute during job setup.

Returns:

List of extra commands or None if not configured.

Return type:

list or None

classmethod from_dict(d)[source]

Create server instance from dictionary.

Parameters:

d (dict) – Dictionary containing server configuration.

Returns:

Configured server instance.

Return type:

Server

classmethod from_scheduler_type()[source]

Create a Server instance based on the detected scheduler type.

Automatically detects the scheduler type in the current environment and creates an appropriate server instance. Falls back to local server if no scheduler is detected.

Returns:

Server instance for the detected scheduler (or local fallback), typically a YamlServerSettings.

Return type:

Server

Raises:
  • ValueError – If no server class is

  • defined for the detected scheduler type.

classmethod from_servername(servername)[source]

Obtain server instance from server name.

Loads server configuration from YAML files based on the server name. Falls back to current server if no name is specified.

Parameters:

servername (str) – Name of the server configuration to load.

Returns:

Configured server instance.

Return type:

Server

classmethod from_yaml(name)[source]

Create server instance from YAML configuration file.

Parameters:

name (str) – Path to YAML configuration file.

Returns:

Server instance loaded from YAML.

Return type:

Server

Raises:

ValueError – If no YAML file is provided.

get_submitter(job, **kwargs)[source]

Get a job submitter for this server.

Creates an appropriate submitter instance based on the server’s scheduler type and job requirements.

Parameters:
  • job – Job instance to be submitted.

  • **kwargs – Additional submitter configuration parameters.

Returns:

Configured job submitter for this server.

Return type:

Submitter

property mem_gb

Get memory allocation in gigabytes.

Returns:

Memory allocation in GB (default: 64).

Return type:

int

property num_cores

Get number of CPU cores allocation.

Returns:

Number of CPU cores (default: 16).

Return type:

int

property num_gpus

Get number of GPU allocation.

Returns:

Number of GPUs (default: 0).

Return type:

int

property num_hours

Get or set the number of hours for job allocation.

Returns:

Number of hours for job time limit.

Return type:

int or None

property num_threads

Get number of threads for parallel execution.

Returns:

Number of threads (default: 16).

Return type:

int

property queue_name

Get or set the queue name for job submission.

Returns:

Queue name for job submission.

Return type:

str or None

register()[source]

Register this server in the global server registry.

Adds the server to the registry if not already present, enabling server lookup and management.

Returns:

This server instance.

Return type:

Server

property scheduler

Get the job scheduler for this server.

Returns:

Scheduler type (e.g., ‘slurm’, ‘pbs’) or None if not set.

Return type:

str or None

property scratch

Check if scratch directory is available.

Returns:

True if scratch directory is configured.

Return type:

bool

property scratch_dir

Get the scratch directory path for temporary files.

Returns:

Path to scratch directory or None if not configured.

Return type:

str or None

submit(job, test=False, cli_args=None, **kwargs)[source]

Submit a computational job to the server.

Handles the complete job submission process including validation, script writing, and actual submission to the scheduler.

Parameters:
  • job (Job) – Job instance to be submitted.

  • test (bool) – If True, only creates

  • submission. (scripts without actual) – Defaults to False.

  • cli_args – Command line arguments for the job.

  • **kwargs – Additional submission parameters.

property submit_command

Get the job submission command for this server.

Returns:

Command used to submit jobs to the scheduler.

Return type:

str

property use_hosts

Get host specification configuration.

Returns:

Host specification settings or None if not configured.

Return type:

str or None

class chemsmart.settings.server.ServerSettingsManager(filename)[source]

Bases: object

Manager for server settings from YAML configuration files.

Provides management interface for loading server configurations from YAML files in a specified folder structure. Handles file validation and server settings creation for computational cluster environments.

filename

Absolute path to the YAML configuration file.

Type:

str

create()[source]

Create server settings from the specified YAML file.

Loads and parses the YAML configuration file to create a complete server settings instance with all configurations.

Returns:

Configured server settings loaded from YAML.

Return type:

YamlServerSettings

Raises:
class chemsmart.settings.server.YamlServerSettings(name, **kwargs)[source]

Bases: Server

YAML-based server settings configuration.

Extends the base Server class to provide YAML file-based configuration loading for server settings. Allows server configurations to be defined in YAML files and loaded dynamically.

NAME

Identifier for YAML-based server settings.

Type:

str

name

YAML file path used as this settings’ identifier.

Type:

str

kwargs

Parsed configuration

Type:

dict

values from the YAML under "SERVER".
_num_hours

Default job time allocation in hours.

Type:

int or None

_queue_name

Default submission queue name.

Type:

str or None

NAME = 'yaml'
classmethod from_yaml(filename)[source]

Create server settings from YAML configuration file.

Parameters:

filename (str) – Path to YAML configuration file.

Returns:

Server settings loaded from YAML.

Return type:

YamlServerSettings

register()[source]

Register this server in the global registry.

Returns:

This server settings instance.

Return type:

YamlServerSettings

chemsmart.settings.submitters module

class chemsmart.settings.submitters.FUGAKUSubmitter(name='FUGAKU', job=None, server=None, **kwargs)[source]

Bases: Submitter

FUGAKU supercomputer job submitter.

Handles job submission to the FUGAKU supercomputer system using the Fujitsu Job Operation and Management (PJM) scheduler. Creates PJM-specific submission scripts with appropriate resource requests and scheduler directives.

NAME

Identifier for FUGAKU scheduler type (‘FUGAKU’).

Type:

str

name

Inherited; instance identifier (often ‘FUGAKU’).

Type:

str

job

Job instance to be submitted.

Type:

Job

server

Server configuration used for submission.

Type:

Server

kwargs

Additional submission

Type:

dict

parameters passed to the base class.
NAME: Optional[str] = 'FUGAKU'
class chemsmart.settings.submitters.PBSSubmitter(name='PBS', job=None, server=None, **kwargs)[source]

Bases: Submitter

PBS (Portable Batch System) job submitter.

Handles job submission to PBS/Torque cluster management systems. Creates PBS-specific submission scripts with appropriate resource requests and scheduler directives.

NAME

Identifier for PBS scheduler type (‘PBS’).

Type:

str

name

Inherited; instance identifier (often ‘PBS’).

Type:

str

job

Job instance to be submitted.

Type:

Job

server

Server configuration used for submission.

Type:

Server

kwargs

Additional submission

Type:

dict

parameters passed to the base class.
NAME: Optional[str] = 'PBS'
class chemsmart.settings.submitters.RunScript(filename, cli_args, batch=False)[source]

Bases: object

Script generator for computational job execution.

Creates Python scripts that handle job execution with proper environment setup and command line argument passing. Manages the execution context for computational chemistry jobs.

filename

Path to the output script file.

Type:

str

batch

Whether this is a batch job execution.

Type:

bool

cli_args

Command line arguments to pass to the job.

write()[source]

Write the run script to the specified file.

Creates a Python script file that can be executed to run the computational job with the specified arguments.

class chemsmart.settings.submitters.SLFSubmitter(name='SLF', job=None, server=None, **kwargs)[source]

Bases: Submitter

LSF (Load Sharing Facility) job submitter.

Handles job submission to IBM LSF cluster management systems. Creates LSF-specific submission scripts with appropriate resource requests and scheduler directives.

Note: The class name ‘SLFSubmitter’ appears to be a typo for ‘LSFSubmitter’ but is maintained for compatibility.

NAME

Identifier for LSF scheduler type (‘SLF’).

Type:

str

name

Inherited; instance identifier (often ‘SLF’).

Type:

str

job

Job instance to be submitted.

Type:

Job

server

Server configuration used for submission.

Type:

Server

kwargs

Additional submission

Type:

dict

parameters passed to the base class.
NAME: Optional[str] = 'SLF'
class chemsmart.settings.submitters.SLURMSubmitter(name='SLURM', job=None, server=None, **kwargs)[source]

Bases: Submitter

SLURM (Simple Linux Utility for Resource Management) job submitter.

Handles job submission to SLURM cluster management systems. Creates SLURM-specific submission scripts with appropriate resource requests and scheduler directives.

NAME

Identifier for SLURM scheduler type (‘SLURM’).

Type:

str

name

Inherited; instance identifier (often ‘SLURM’).

Type:

str

job

Job instance to be submitted.

Type:

Job

server

Server configuration used for submission.

Type:

Server

kwargs

Additional submission

Type:

dict

parameters passed to the base class.
NAME: Optional[str] = 'SLURM'
class chemsmart.settings.submitters.Submitter(name, job, server, **kwargs)[source]

Bases: RegistryMixin

Abstract base class for job submission systems.

Provides the foundation for scheduler-specific job submitters that handle the creation and submission of computational chemistry jobs to various cluster management systems.

NAME

Class-level identifier for the submitter type.

Type:

str

name

Instance identifier for

Type:

str

this submitter
Type:

often same as NAME

job

Job instance to be submitted.

Type:

Job

server

Server configuration used for submission.

Type:

Server

kwargs

Additional submission

Type:

dict

parameters passed through to subclasses.
NAME: Optional[str] = None
property executable

Get the executable configuration for the job’s program.

Returns:

Instance of the appropriate executable handler (GaussianExecutable, ORCAExecutable, or NCIPLOTExecutable) based on job.PROGRAM.

Return type:

Executable

Raises:

ValueError – If the job’s program is not supported.

classmethod from_dict(d)[source]

Create a submitter instance from a dictionary.

Parameters:

d (dict) – Dictionary containing submitter configuration.

Returns:

Configured submitter instance.

Return type:

Submitter

classmethod from_scheduler_type(scheduler_type, **kwargs)[source]

Create a submitter instance for the specified scheduler type.

Factory method that finds and instantiates the appropriate submitter subclass based on the scheduler type name.

Parameters:
  • scheduler_type (str) – Name of the scheduler system (e.g., “PBS”, “SLURM”, “SLF”, “FUGAKU”).

  • **kwargs – Additional arguments passed to the submitter constructor.

Returns:

Instance of the appropriate submitter subclass (one of PBSSubmitter, SLURMSubmitter, SLFSubmitter, or FUGAKUSubmitter) configured with the provided kwargs (e.g., job and server).

Return type:

Submitter

Raises:
  • ValueError – If no submitter is found

  • for the specified scheduler type.

property run_script

Get the run script filename.

Returns:

Filename for the job execution script.

Return type:

str

property submit_folder

Get the submission folder for the job.

Returns:

Path to the job submission folder.

Return type:

str

property submit_script

Get the submission script filename.

Returns:

Filename for the job submission script.

Return type:

str

write(cli_args)[source]

Write the submission and run scripts for the job.

Creates both the scheduler-specific submission script and the Python run script that will execute the computational job.

Parameters:

cli_args – Command line arguments for job execution.

chemsmart.settings.user module

User configuration management for ChemSmart computational chemistry software.

This module provides comprehensive user settings management including configuration file handling, directory structure management, and access to user-specific settings for computational chemistry software (Gaussian, ORCA) and server configurations. Manages the ~/.chemsmart user configuration directory and associated files.

Classes:

ChemsmartUserSettings: Main class for user configuration management

Dependencies:
  • chemsmart.io.yaml: YAML file handling utilities

Configuration Structure:

~/.chemsmart/ ├── usersettings.yaml ├── server/ │ └── server.yaml ├── gaussian/ │ └── aussian_project_settings.yaml └── orca/

└── orca_project_settings.yaml

class chemsmart.settings.user.ChemsmartUserSettings[source]

Bases: object

User configuration settings manager for ChemSmart.

Manages user-specific configuration files, directories, and settings for computational chemistry software. Provides access to configuration paths, environment variables, and user-defined project settings.

USER_YAML_FILE

Name of the main user settings YAML file.

Type:

str

USER_CONFIG_DIR

Path to the user configuration directory.

Type:

str

yaml

Full path to the user settings YAML file.

Type:

str

config_dir

User configuration directory path.

Type:

str

data

Loaded YAML configuration data.

Type:

dict

USER_CONFIG_DIR = '/home/docs/.chemsmart'
USER_YAML_FILE = 'usersettings.yaml'
property all_available_gaussian_projects

Get list of all available Gaussian project configurations.

Returns:

List of Gaussian project names (without .yaml extension)

available in the user Gaussian settings directory.

Return type:

list

property all_available_orca_projects

Get list of all available ORCA project configurations.

Returns:

List of ORCA project names (without .yaml extension)

available in the user ORCA settings directory.

Return type:

list

property all_available_servers

Get list of all available server configurations.

Returns:

List of server names (without .yaml extension) available

in the user server directory.

Return type:

list

property email

Get user email configuration.

Returns:

User email address or None if not configured.

Return type:

str or None

property gaussian_project_yaml_files

Get list of Gaussian project YAML configuration files.

Returns:

List of paths to Gaussian project configuration YAML files.

Return type:

list

property orca_project_yaml_files

Get list of ORCA project YAML configuration files.

Returns:

List of paths to ORCA project configuration YAML files.

Return type:

list

property project

Get default project configuration.

Returns:

Default project name or None if not configured.

Return type:

str or None

property scratch

Get scratch directory configuration.

Returns:

Path to scratch directory or None if not configured.

Return type:

str or None

property server_yaml_files

Get list of server YAML configuration files.

Returns:

List of paths to server configuration YAML files.

Return type:

list

property user_gaussian_envars

Get the path to Gaussian environment variables file.

Returns:

Path to the file containing Gaussian environment variables.

Return type:

str

property user_gaussian_modules

Get the path to Gaussian modules file.

Returns:

Path to the file containing Gaussian module loading commands.

Return type:

str

property user_gaussian_script

Get the path to Gaussian execution script.

Returns:

Path to the Gaussian execution script file.

Return type:

str

property user_gaussian_settings_dir

Get the user Gaussian settings directory.

Returns:

Path to the directory containing Gaussian-specific settings.

Return type:

str

property user_orca_envars

Get the path to ORCA environment variables file.

Returns:

Path to the file containing ORCA environment variables.

Return type:

str

property user_orca_modules

Get the path to ORCA modules file.

Returns:

Path to the file containing ORCA module loading commands.

Return type:

str

property user_orca_script

Get the path to ORCA execution script.

Returns:

Path to the ORCA execution script file.

Return type:

str

property user_orca_settings_dir

Get the user ORCA settings directory.

Returns:

Path to the directory containing ORCA-specific settings.

Return type:

str

property user_server_dir

Get the user server configurations directory.

Returns:

Path to the directory containing user server configurations.

Return type:

str

Module contents