schrodinger.application.matsci.solvation_entropy_utils module¶
Utilities for solvation entropy in reaction workflow.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.solvation_entropy_utils.TempPressProp(temperature_K, pressure_atm, solvent_density_g_cm3)¶
Bases:
tuple
- pressure_atm¶
Alias for field number 1
- solvent_density_g_cm3¶
Alias for field number 2
- temperature_K¶
Alias for field number 0
- class schrodinger.application.matsci.solvation_entropy_utils.StructurePropertyInfo(key, is_total_energy, is_logged, lnq_key)¶
Bases:
tuple
- is_logged¶
Alias for field number 2
- is_total_energy¶
Alias for field number 1
- key¶
Alias for field number 0
- lnq_key¶
Alias for field number 3
- schrodinger.application.matsci.solvation_entropy_utils.add_temp_press_parser_arguments(parser)¶
Add temperature and pressure related arguments to the parser.
- Parameters:
parser (
argparse.ArgumentParser
) – the parser to add these arguments to
- schrodinger.application.matsci.solvation_entropy_utils.get_jaguar_solvents_csv()¶
Return the Jaguar solvents in solvents.csv.
- Return type:
list[str]
- Returns:
the Jaguar solvents
- schrodinger.application.matsci.solvation_entropy_utils.get_jaguar_solvents_xml()¶
Return the Jaguar solvents in jaguar_keywords.xml.
- Return type:
list[str]
- Returns:
the Jaguar solvents
- schrodinger.application.matsci.solvation_entropy_utils.get_jaguar_solvents()¶
Return the Jaguar solvents.
- Return type:
list[str]
- Returns:
the Jaguar solvents
- schrodinger.application.matsci.solvation_entropy_utils.add_solvation_entropy_arguments(parser)¶
Add solvation entropy related arguments to the parser.
- Parameters:
parser (
argparse.ArgumentParser
) – the parser to add these arguments to
- schrodinger.application.matsci.solvation_entropy_utils.get_solvent_params(solvent)¶
Return the solvent parameters for the given Jaguar-supported solvent.
- Parameters:
solvent (str) – the Jaguar-supported solvent
- Raises:
SolvationEntropyException – if there is an issue
- Return type:
- Returns:
the solvent parameters
- schrodinger.application.matsci.solvation_entropy_utils.get_solvent_params_by_t_and_p(solvent, temp_press_data)¶
Return the solvent parameters for the given Jaguar-supported solvent keyed by temprature and pressure.
- Parameters:
solvent (str) – the Jaguar-supported solvent
temp_press_data (
rxnwfu.TempPressData
) – the temperature and pressure data for thermochemical properties
- Return type:
dict
- Returns:
the solvent parameters keyed by temperature and pressure
- schrodinger.application.matsci.solvation_entropy_utils.get_flags_from_solvent_params(solvent_params)¶
Return a list of flags from the given solvent parameters.
- Parameters:
solvent_params (SolventParams) – the solvent parameters
- Return type:
list[str]
- Returns:
the flags
- schrodinger.application.matsci.solvation_entropy_utils.get_lnQtot(temperature, energy)¶
Return ln(Q_tot) from the given Gibbs free energy.
- Parameters:
temperature (float) – temperature in K
energy (float) – the Gibbs free energy in hartree
- Return type:
float
- Returns:
ln(Q_tot)
- schrodinger.application.matsci.solvation_entropy_utils.get_gibbs_free_energy(temperature, lnqtot)¶
Return Gibbs free energy from the given ln(Q_tot).
- Parameters:
temperature (float) – temperature in K
lnqtot (float) – ln(Q_tot)
- Return type:
float
- Returns:
Gibbs free energy in hartree
- exception schrodinger.application.matsci.solvation_entropy_utils.SolvationEntropyException¶
Bases:
Exception
- class schrodinger.application.matsci.solvation_entropy_utils.SolvationEntropyProperties(st, stage_idx, out_fp)¶
Bases:
object
- S_TRANSLATION_START = 'Translation'¶
- S_ROTATION_START = 'Rotation'¶
- S_VIBRATION_START = 'Vibration'¶
- S_CONCENTRATION_START = 'Concentration'¶
- S_CAVITY_START = 'Cavity'¶
- S_TOTAL_START = 'Total'¶
- S_STARTERS = ['Translation', 'Rotation', 'Vibration', 'Concentration', 'Cavity', 'Total']¶
- S_TRANSLATION_KEY = 'S_trans'¶
- S_ROTATION_KEY = 'S_rot'¶
- S_VIBRATION_KEY = 'S_vib'¶
- S_CONCENTRATION_KEY = 'S_conc'¶
- S_CAVITY_KEY = 'S_cav'¶
- S_TOTAL_KEY = 'S_tot'¶
- S_KEYS = ['S_trans', 'S_rot', 'S_vib', 'S_conc', 'S_cav', 'S_tot']¶
- S_STARTERS_TO_KEYS = {'Cavity': 'S_cav', 'Concentration': 'S_conc', 'Rotation': 'S_rot', 'Total': 'S_tot', 'Translation': 'S_trans', 'Vibration': 'S_vib'}¶
- G_TOTAL_OMEGA_START = 'Total Gibbs free energy with S_omega'¶
- G_TOTAL_EPSILON_START = 'Total Gibbs free energy with S_epsilon'¶
- G_TOTAL_EPSILON_ALPHA_START = 'Total Gibbs free energy with S_epsilon_alpha'¶
- G_IDXS_TO_STARTERS = {1: 'Total Gibbs free energy with S_omega', 2: 'Total Gibbs free energy with S_epsilon', 3: 'Total Gibbs free energy with S_epsilon_alpha'}¶
- G_TOTAL_KEY = 'G_tot'¶
- LNQ_TOTAL_KEY = 'lnQ_tot'¶
- OMEGA_KEY = 'omega'¶
- EPSILON_KEY = 'epsilon'¶
- EPSILON_ALPHA_KEY = 'epsilon_alpha'¶
- TYPES_TO_IDXS = {'epsilon': 2, 'epsilon_alpha': 3, 'omega': 1}¶
- SOLVATION_ENTROPY = 'solvation_entropy'¶
- PROP_STARTER = 'r_matsci_solvation_entropy'¶
- ENTROPY_STARTER = 'r_matsci_solvation_entropy_{type_key}_{s_key}_(cal/mol/K)'¶
- ENTROPY_PROP = 'r_matsci_solvation_entropy_{type_key}_{s_key}_(cal/mol/K){temp_press}_stage_{idx}'¶
- FREE_ENERGY_STARTER = 'r_matsci_solvation_entropy_{type_key}_G_tot_(au)'¶
- FREE_ENERGY_PROP = 'r_matsci_solvation_entropy_{type_key}_G_tot_(au){temp_press}_stage_{idx}'¶
- LNQ_STARTER = 'r_matsci_solvation_entropy_{type_key}_lnQ_tot'¶
- LNQ_PROP = 'r_matsci_solvation_entropy_{type_key}_lnQ_tot{temp_press}_stage_{idx}'¶
- __init__(st, stage_idx, out_fp)¶
- Parameters:
st (
schrodinger.structure.Structure
) – the structurestage_idx (int) – the stage index
out_fp (str) – path to the solvation entropy output file
- parseTempPress(lines)¶
Parse the temperature and pressure.
- Parameters:
lines (list[str]) – lines from the output
- Raises:
SolvationEntropyException – if there is an issue
- parseZPEEnergy(lines)¶
Parse the ZPE energy.
- Parameters:
lines (list[str]) – lines from the output
- Raises:
SolvationEntropyException – if there is an issue
- parseSCFEnergy(lines)¶
Parse the SCF energy.
- Parameters:
lines (list[str]) – lines from the output
- Raises:
SolvationEntropyException – if there is an issue
- parseSolvationEntropySection(lines)¶
Parse the solvation entropy section.
- Parameters:
lines (list[str]) – lines from the output
- Raises:
SolvationEntropyException – if there is an issue
- Return type:
int
- Returns:
the 0-based index of the line marking the start of the solvation entropy section
- parseEntropies(lines, properties)¶
Parse the entropies.
- Parameters:
lines (list[str]) – lines from the output
properties (dict) – dictionary to which to add properties
- Raises:
SolvationEntropyException – if there is an issue
- parseFreeEnergies(lines, properties)¶
Parse the Gibbs free energies.
- Parameters:
lines (list[str]) – lines from the output
properties (dict) – dictionary to which to add properties
- Raises:
SolvationEntropyException – if there is an issue
- calculatelnQs(properties)¶
Calculate the lnQs.
- Parameters:
properties (dict) – dictionary to which to add properties
- parseFile()¶
Parse the solvation entropy output.
- static getEntropyInfos(temperature, pressure, stage_idx)¶
Return a list of entropy StructurePropertyInfo.
- Parameters:
temperature (float) – temperature in K
pressure (float) – pressure in atm
stage_idx (int) – the stage index
- Return type:
list[StructurePropertyInfo]
- Returns:
entropy properties
- static getFreeEnergyInfos(temperature, pressure, stage_idx)¶
Return a list of free energy StructurePropertyInfo.
- Parameters:
temperature (float) – temperature in K
pressure (float) – pressure in atm
stage_idx (int) – the stage index
- Return type:
list[StructurePropertyInfo]
- Returns:
free energy properties
- static getlnQInfos(temperature, pressure, stage_idx)¶
Return a list of ln(Q) StructurePropertyInfo.
- Parameters:
temperature (float) – temperature in K
pressure (float) – pressure in atm
stage_idx (int) – the stage index
- Return type:
list[StructurePropertyInfo]
- Returns:
ln(Q) properties
- setStructureProperties()¶
Set the structure properties.
- getOutMaeFileName()¶
Return the output mae file name.
- Return type:
str
- Returns:
the output mae file name
- writeStructure()¶
Write the structure.
- run()¶
Run it.
- class schrodinger.application.matsci.solvation_entropy_utils.SolvationEntropyJob(st, stage_idx, out_fn, temperature, pressure, solvent_params, *args, **kwargs)¶
Bases:
LoggingSubprocessJob
Manage a solvation entropy job.
- __init__(st, stage_idx, out_fn, temperature, pressure, solvent_params, *args, **kwargs)¶
See parent class for documentation.
- Parameters:
st (
schrodinger.structure.Structure
) – the structurestage_idx (int) – the stage index
out_fn (str) – the Jaguar .out output file name
temperature (float) – the temperature in K
pressure (float) – the pressure in atm
solvent_params (SolventParams) – the solvent parameters
- update()¶
See parent class for documentation.
- exception schrodinger.application.matsci.solvation_entropy_utils.TempPressDataException¶
Bases:
Exception
- class schrodinger.application.matsci.solvation_entropy_utils.TempPressData(temp_start=298.15, temp_step=10.0, temp_n=1, press_start=1.0, press_step=1.0, press_n=1, temp_press_props_fn=None)¶
Bases:
object
Manage temperatures and pressures and properties that depend them.
- __init__(temp_start=298.15, temp_step=10.0, temp_n=1, press_start=1.0, press_step=1.0, press_n=1, temp_press_props_fn=None)¶
- Parameters:
temp_start (float) – the starting temperature in K
temp_step (float) – the temperature step in K
temp_n (int) – the number of temperatures
press_start (float) – the starting pressure in atm
press_step (float) – the pressure step in atm
press_n (int) – the number of pressures
temp_press_props_fn (str) – csv file containing temperatures in K, pressures in atm, and any other properties, using column names TEMPERATURE_COL, PRESSURE_COL, and SOLVENT_DENSITY_COL
- setFromOptions(options)¶
Set from options.
- Parameters:
options (
argparse.Namespace
) – the object holding all the option values
- setFromJaguarKeywords(keywords)¶
Set from Jaguar keywords.
- Parameters:
keywords (dict) – Jaguar keywords
- getCmd()¶
Return the command line.
- Return type:
list[str]
- Returns:
the command line
- static getTempPressDataFromOptions(options)¶
Return TempPressData from the given options.
- Parameters:
options (
argparse.Namespace
) – the object holding all the option values- Return type:
- Returns:
the TempPressData from the given options
- static getTempPressDataFromJaguarKeywords(keywords)¶
Return TempPressData from the given Jaguar keywords.
- Parameters:
keywords (dict) – Jaguar keywords
- Return type:
- Returns:
the TempPressData from the given Jaguar keywords
- getPressuresTemperatures()¶
Return the list of pressures and temepratures.
- Return type:
list[float], list[float]
- Returns:
pressures in atm, temperatures in K
- getJaguarKeywords()¶
Return the Jaguar keywords.
- Return type:
dict
- Returns:
the Jaguar keywords
- static removeFromJaguarKeywords(key_dict)¶
Remove the temperature and pressure keywords from the given dictionary of Jaguar keywords.
- Parameters:
key_dict (dict) – the Jaguar keywords
- setPropsByTAndP()¶
Set the temperature and pressure dependent properties dictionary.
- Raises:
TempPressDataException – if there is an issue