nlesc-nano / nano-CAT

A collection of tools for the analysis of nanocrystals.
Other
3 stars 2 forks source link

ENH: Add a new recipe for perforiming fast-sigma COSMO-RS calculations #78

Closed BvB93 closed 3 years ago

BvB93 commented 3 years ago

Add the new nanoCAT.recipes.run_fast_sigma recipe for performing (fast-sigma) COSMO-RS property calculations on the passed SMILES and solvents. The output is exported to the cosmo-rs.csv file.

Includes the following 5 properties:

Jobs are performed in parallel, with chunks of a given size being distributed to a user-specified number of processes and subsequently cached. After all COSMO-RS calculations have been performed, the temporary .csv files are concatenated into cosmo-rs.csv.

Examples

>>> import pandas as pd
>>> from nanoCAT.recipes import run_fast_sigma

>>> smiles_list = ["CO[H]", "CCO[H]", "CCCO[H]"]
>>> solvent_dict = {
...     "water": "$AMSRESOURCES/ADFCRS/Water.coskf",
...     "octanol": "$AMSRESOURCES/ADFCRS/1-Octanol.coskf",
... }

>>> run_fast_sigma(smiles_list, solvent_dict)
>>> pd.read_csv("cosmo-rs.csv", header=[0, 1], index_col=0)
property Activity Coefficient              ... Solvation Energy
solvent               octanol       water  ...          octanol      water
smiles                                     ...
CO[H]               -2.977354    4.954782  ...              inf  -3.274420
CCO[H]              -4.184214   12.735228  ...              inf  -3.883986
CCCO[H]             -4.907177   47.502557  ...         3.680445  -3.779867

[3 rows x 8 columns]
codecov[bot] commented 3 years ago

Codecov Report

Merging #78 (43ed1bd) into master (dab89ae) will increase coverage by 0.13%. The diff coverage is 41.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
+ Coverage   36.88%   37.01%   +0.13%     
==========================================
  Files          32       33       +1     
  Lines        2245     2426     +181     
==========================================
+ Hits          828      898      +70     
- Misses       1417     1528     +111     
Impacted Files Coverage Δ
nanoCAT/__init__.py 100.00% <ø> (ø)
nanoCAT/asa/asa.py 0.00% <0.00%> (ø)
nanoCAT/asa/md_asa.py 0.00% <0.00%> (ø)
nanoCAT/ff/match_job.py 30.55% <ø> (-0.64%) :arrow_down:
nanoCAT/ligand_solvation.py 0.00% <0.00%> (ø)
nanoCAT/qd_opt_ff.py 20.58% <ø> (ø)
nanoCAT/recipes/dissociation.py 84.78% <ø> (ø)
nanoCAT/recipes/mark_surface.py 96.22% <ø> (-0.07%) :arrow_down:
nanoCAT/recipes/fast_sigma.py 39.13% <39.13%> (ø)
nanoCAT/bde/bde_workflow.py 15.38% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dab89ae...fb0d361. Read the comment docs.