Estimating multiple properties¶
Estimating multiple properties is as simple as supplying a list of property names to the PropPred
interface. All properties are estimated by default if no property argument is supplied. In this example, we first estimate a few properties, and then estimate all properties.
import pyCRS
def print_props(mol):
for prop, value in mol.properties.items():
unit = pyCRS.PropPred.units[prop]
print(f'{prop:<20s}: {value:.3f} {unit}')
for prop, value in mol.properties_tdep.items():
print(f'{prop:<20s}:')
unit = pyCRS.PropPred.units[prop]
propunit = f'{prop} ({unit})'
print("T (K)".rjust(30)+f'{propunit:>30s}')
for t,v in value:
print(f'{t:>30.3f}{v:>30.8g}')
mol = pyCRS.Input.read_smiles("CCCCCCO")
props = ['meltingpoint','boilingpoint', 'density', 'flashpoint', 'vaporpressure']
pyCRS.PropPred.estimate(mol,props, temperatures=[298.15,308.15,318.15,328.15])
print("Results (temp-independent) :", mol.properties)
print("Results (temp-dependent) :", mol.properties_tdep)
# we can also estimate all properties by supplying the property name 'all' or simply omitting this argument
pyCRS.PropPred.estimate(mol, temperatures=[298.15,308.15,318.15,328.15])
print_props(mol)
The output produced is the following:
Results (temp-independent) : {'boilingpoint': 435.7771752780941, 'density': 0.7918196941677842, 'flashpoint': 342.2705857793571, 'meltingpoint': 231.1412353515625, 'molarvol': 0.1289491355419159}
Results (temp-dependent) : {'vaporpressure': [(298.1499938964844, 0.00122854727137622), (308.1499938964844, 0.0026233569814824815), (318.1499938964844, 0.005288582928457778), (328.1499938964844, 0.010122673317257832)]}
boilingpoint : 435.777 K
criticalpressure : 34.349 bar
criticaltemp : 878.101 K
criticalvol : 0.404 L/mol
density : 0.792 kg/L (298.15 K)
dielectricconstant : 10.951
entropygas : 439.885 J/(mol K)
flashpoint : 342.271 K
gidealgas : -131.869 kJ/mol
hcombust : -3678.121 kJ/mol
hformstd : -384.388 kJ/mol
hfusion : 18.505 kJ/mol
hidealgas : -316.821 kJ/mol
hsublimation : 80.980 kJ/mol
meltingpoint : 231.141 K
molarvol : 0.129 L/mol
parachor : 289.059
solubilityparam : 10.129 √(cal/cm^3)
synacc : 6.747
tpt : 230.404 K
vdwarea : 171.059 Ų
vdwvol : 120.519 ų
liquidviscosity :
T (K) liquidviscosity (Pa-s)
298.150 0.0044653385
308.150 0.003363708
318.150 0.0025843814
328.150 0.0020210327
vaporpressure :
T (K) vaporpressure (bar)
298.150 0.0012285473
308.150 0.002623357
318.150 0.0052885829
328.150 0.010122673