├── .gitignore ├── LICENSE ├── README.md ├── examples └── cosmors_calculation.ipynb ├── pyproject.toml ├── setup.py ├── src ├── __init__.py └── opencosmorspy │ ├── __init__.py │ ├── cosmo_visualizations.py │ ├── cosmors.py │ ├── helper_functions.py │ ├── input_parsers.py │ ├── molecules.py │ ├── parameterization.py │ └── segtp_collection.py └── tests ├── COSMO_ORCA ├── C2H2Cl4_001_1112tetrachloroethane │ ├── COSMO_TZVPD │ │ └── C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo │ └── slurm-84643.out ├── C2H5NO_002_Acetamide │ ├── COSMO_TZVPD │ │ └── C2H5NO_002_Acetamide_CnfS1_c000.orcacosmo │ └── slurm-84661.out ├── CH4O_001_methanol │ ├── COSMO_TZVPD │ │ └── CH4O_001_methanol_c000.orcacosmo │ └── slurm-84631.out ├── H2O │ ├── COSMO_TZVPD │ │ └── H2O_c000.orcacosmo │ └── slurm-84634.out ├── OLD_C2H2Cl4_001_1112tetrachloroethane │ └── COSMO_TZVPD │ │ └── C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo ├── OLD_C2H5NO_002_Acetamide │ └── COSMO_TZVPD │ │ └── C2H5NO_002_Acetamide_CnfS1_c000.orcacosmo ├── OLD_CH4O_001_methanol │ └── COSMO_TZVPD │ │ └── CH4O_001_methanol_c000.orcacosmo ├── OLD_H2O_001 │ └── COSMO_TZVPD │ │ └── H2O_c000.orcacosmo ├── acetaminophen.orcacosmo ├── acetic_acid.orcacosmo ├── acetone.orcacosmo ├── benzene.orcacosmo ├── cyclohexane.orcacosmo ├── ethanol.orcacosmo ├── ethanol.xyz └── water.orcacosmo ├── test_cosmors.py ├── test_cosmors_integration.py └── test_input_parsers_orca.py /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | .vscode/ 3 | .pytest_cache/ 4 | .ipynb_checkpoints/ 5 | build/ 6 | dist/ 7 | 000_*/ 8 | *.egg* 9 | *.png 10 | *.pdf 11 | *.svg 12 | *.html 13 | *.zip 14 | *.csv 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openCOSMO-RS(py) package 2 | 3 | ## About 4 | 5 | This package is a fully python based implementation of the model COSMO-RS, supporting multiple segment descriptors. 6 | Details about this implementation can be found in our publication: 7 | 8 | https://www.sciencedirect.com/science/article/abs/pii/S0378381222000954 9 | 10 | 11 | ## Application 12 | 13 | The package can be installed via pip with the following command: 14 | ``` 15 | pip install git+https://github.com/TUHH-TVT/openCOSMO-RS_py 16 | ``` 17 | 18 | A short introduction on its use can be found in the examples directory. 19 | 20 | To generate the needed quantum chemical input files using RDKit and ORCA with the CPCM module, please have a look here: https://github.com/TUHH-TVT/openCOSMO-RS_conformer_pipeline 21 | 22 | ## License 23 | 24 | This project is licensed under the GNU General Public License v2.0 25 | 26 | ## Other COSMO-RS related projects 27 | 28 | The reader might be also interested in the following related projects: 29 | - [openCOSMO-RS_cpp](https://github.com/TUHH-TVT/openCOSMO-RS_cpp) 30 | - [LVPP sigma profile database](https://github.com/lvpp/sigma) 31 | - [Benchmark COSMO-SAC implementation](https://github.com/usnistgov/COSMOSAC) 32 | - [Pysac](https://github.com/lvpp/pysac) 33 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel"] 3 | build-backend = "setuptools.build_meta" 4 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r", encoding="utf-8") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="opencosmorspy", 8 | version="0.0.1", 9 | author="thmsg", 10 | description="openCOSMO-RS python implementation of COSMO-RS", 11 | long_description=long_description, 12 | long_description_content_type="text/markdown", 13 | url="https://github.com/TUHH-V8/openCOSMO-RS_py", 14 | classifiers=[ 15 | "Programming Language :: Python :: 3", 16 | "License :: OSI Approved :: GPL v2.0", 17 | "Operating System :: OS Independent", 18 | ], 19 | package_dir={"": "src"}, 20 | packages=setuptools.find_packages(where="src"), 21 | python_requires=">=3.7", 22 | ) 23 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/opencosmorspy/__init__.py: -------------------------------------------------------------------------------- 1 | from opencosmorspy.parameterization import Parameterization 2 | from opencosmorspy.cosmors import COSMORS -------------------------------------------------------------------------------- /src/opencosmorspy/cosmo_visualizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import matplotlib.pyplot as plt 4 | import numpy as np 5 | import pandas as pd 6 | import plotly.express as px 7 | import plotly.graph_objects as go 8 | from rdkit import Chem 9 | import rdkit.Chem.rdDetermineBonds 10 | 11 | from opencosmorspy.input_parsers import SigmaProfileParser 12 | 13 | def get_atom_color_map(atoms_available=None): 14 | element_color_discrete_map = { 15 | # Blended H-bonded atoms (50% white + atom color) 16 | "H-C": "#E4E4E4", # Light gray (between white and C gray) 17 | "H-O": "#FF8A8A", # Light red 18 | "H-N": "#98A8FC", # Light blue 19 | "H-S": "#FFE88F", # Light yellow 20 | "H-F": "#C8F4A8", # Pale green 21 | "H-Cl": "#BFFFBF", # Mint green 22 | "H-Br": "#D59494", # Dusty pink 23 | "H-I": "#EAC0EA", # Soft purple 24 | "H-P": "#FFD1A0", # Light orange 25 | "H-B": "#FFDADA", # Blush pink 26 | "H-Si": "#F1DCA0", # Light tan 27 | 28 | # Standard atoms (CPK colors) 29 | "H": "#FFFFFF", # White 30 | "C": "#909090", # Gray 31 | "N": "#3050F8", # Blue 32 | "O": "#FF0D0D", # Red 33 | "F": "#90E050", # Green 34 | "Cl": "#1FF01F", # Bright green 35 | "Br": "#A62929", # Brownish red 36 | "I": "#940094", # Violet 37 | "S": "#FFD123", # Yellow 38 | "P": "#FF8000", # Orange 39 | "B": "#FFB5B5", # Pink 40 | "Si": "#DAA520", # Goldenrod/tan 41 | "Na": "#0000FF", # Blue 42 | "K": "#8F40D4", # Purple 43 | "Mg": "#8AFF00", # Lime 44 | "Ca": "#3DFF00", # Green 45 | "Fe": "#E06633", # Rusty orange 46 | "Zn": "#7D80B0", # Light steel blue 47 | } 48 | missing_labels = [AN for AN in atoms_available if AN not in element_color_discrete_map] 49 | safe_palette = px.colors.qualitative.Safe 50 | for i, label in enumerate(missing_labels): 51 | color = safe_palette[i % len(safe_palette)] 52 | element_color_discrete_map[label] = color 53 | 54 | return element_color_discrete_map 55 | 56 | 57 | def plot_sigma_profiles( 58 | filepath_lst, 59 | plot_name=None, 60 | plot_label_dct=None, 61 | xlim=(-0.02, 0.02), 62 | dir_plot=None, 63 | aggregate_plots=False 64 | ): 65 | if not dir_plot: 66 | dir_plot = os.getcwd() 67 | 68 | if plot_name is None: 69 | plot_name = "sigma_profiles" 70 | 71 | plot_label_lst = [] 72 | for filepath in filepath_lst: 73 | if plot_label_dct is not None and filepath in plot_label_dct: 74 | plot_label_lst.append(plot_label_dct[filepath]) 75 | else: 76 | plot_label_lst.append(os.path.basename(filepath)) 77 | 78 | fig, ax = plt.subplots(figsize=(12, 6)) 79 | 80 | for filepath, label in zip(filepath_lst, plot_label_lst): 81 | spp = SigmaProfileParser(filepath) 82 | sigmas, areas = spp.cluster_and_create_sigma_profile() 83 | ax.plot(sigmas, areas, label=label) 84 | 85 | ax.set_xlim(*xlim) 86 | 87 | if aggregate_plots: 88 | if dir_plot: 89 | fig.savefig(os.path.join(dir_plot, f"{plot_name}_{label}.png"), dpi=300) 90 | else: 91 | plt.show() 92 | 93 | if not aggregate_plots: 94 | if dir_plot: 95 | fig.savefig(os.path.join(dir_plot, f"{plot_name}_{label}.png"), dpi=300) 96 | else: 97 | plt.show() 98 | 99 | 100 | def plot_sigma_profiles_plotly( 101 | filepath_lst, 102 | plot_name=None, 103 | plot_label_dct=None, 104 | xlim=(-0.02, 0.02), 105 | dir_plot=None, 106 | mode="static" 107 | ): 108 | if not dir_plot: 109 | dir_plot = os.getcwd() 110 | 111 | if plot_name is None: 112 | plot_name = "sigma_profiles" 113 | 114 | plot_label_lst = [] 115 | for filepath in filepath_lst: 116 | if plot_label_dct is not None and filepath in plot_label_dct: 117 | plot_label_lst.append(plot_label_dct[filepath]) 118 | else: 119 | plot_label_lst.append(os.path.basename(filepath)) 120 | 121 | fontsize = 20 122 | 123 | if mode == "dynamic": 124 | xaxis_title = "sigma" 125 | yaxis_title = "p(sigma)" 126 | elif mode == "static": 127 | xaxis_title = "$\large \sigma \; [e/ 10^{-10} m]$" 128 | yaxis_title = "$\large p(\sigma) \; [-]$" 129 | 130 | fig = go.Figure() 131 | 132 | y_max = 0 133 | for idx, (filepath, label) in enumerate( 134 | zip(filepath_lst, plot_label_lst) 135 | ): 136 | 137 | if idx == 0: 138 | line = {"dash": "solid", "color": "black"} # blue '#316395' 139 | elif idx == 1: 140 | line = {"dash": "longdash", "color": "#AF0000"} 141 | elif idx == 2: 142 | line = {"dash": "dashdot", "color": "#109618"} 143 | elif idx == 4: 144 | line = {"dash": "dot", "color": "#09118C"} 145 | elif idx == 5: 146 | line = {"dash": "dash", "color": "#7600b5"} 147 | 148 | elif idx == 5: 149 | line = {"dash": "longdashdot", "color": "#DEBC00"} 150 | elif idx == 6: 151 | line = {"dash": "dot", "color": "#565656"} 152 | 153 | spp = SigmaProfileParser(filepath) 154 | sigmas, areas = spp.cluster_and_create_sigma_profile() 155 | y_max = max(y_max, areas.max()) 156 | 157 | basename = os.path.basename(filepath) 158 | 159 | fig.add_trace( 160 | go.Scatter( 161 | x=sigmas, 162 | y=areas, 163 | mode="lines", 164 | name=basename, 165 | line=line, 166 | ) 167 | ) 168 | 169 | fig.update_layout( 170 | width=700, 171 | height=500, 172 | xaxis_title=xaxis_title, 173 | yaxis_title=yaxis_title, 174 | # margin=dict( 175 | # l=50, 176 | # r=50, 177 | # b=50, 178 | # t=50, 179 | # pad=4), 180 | ) 181 | fig.update_layout( 182 | { 183 | "xaxis_range": xlim, 184 | "yaxis_range": [0, y_max * 1.2], 185 | "plot_bgcolor": "rgba(0, 0, 0, 0)", 186 | "paper_bgcolor": "White", 187 | "font": {"size": fontsize, "color": "rgba(1, 1, 1, 1)"}, 188 | "legend_title_text": "", 189 | "showlegend": False, 190 | "legend": { 191 | "yanchor": "top", 192 | "y": 0.98, 193 | "xanchor": "right", 194 | "x": 0.98, 195 | "bgcolor": "White", 196 | "bordercolor": "Black", 197 | "borderwidth": 0.5, 198 | }, 199 | } 200 | ) 201 | 202 | fig.update_xaxes( 203 | tick0=-0.02, 204 | dtick=0.005, 205 | color="rgba(1, 1, 1, 1)", 206 | gridcolor="rgba(0, 0, 0, 0.0)", 207 | showgrid=False, 208 | zeroline=False, 209 | zerolinecolor="rgba(1, 1, 1, 1)", 210 | zerolinewidth=0.5, 211 | tickformat=".3f", 212 | mirror=True, 213 | linecolor="black", 214 | ticks="outside", 215 | showline=True, 216 | ) 217 | fig.update_yaxes( 218 | tick0=0, 219 | # dtick = 1, 220 | color="rgba(1, 1, 1, 1)", 221 | gridcolor="rgba(0, 0, 0, 0.0)", 222 | showgrid=False, 223 | zeroline=True, 224 | zerolinecolor="rgba(1, 1, 1, 1)", 225 | zerolinewidth=0.5, 226 | tickformat=".1f", 227 | mirror=True, 228 | linecolor="black", 229 | ticks="outside", 230 | showline=True, 231 | ) 232 | 233 | fig.show() 234 | if mode == "static": 235 | fig.write_image(os.path.join(dir_plot, plot_name + ".png")) 236 | fig.write_image(os.path.join(dir_plot, plot_name + ".pdf")) 237 | fig.write_image(os.path.join(dir_plot, plot_name + ".svg")) 238 | if mode == "dynamic": 239 | fig.write_html(os.path.join(dir_plot, plot_name + ".html")) 240 | 241 | 242 | def plot_extended_sigma_profile_plotly(filepath, area_max_size=30, dir_plot=None, mode="dynamic"): 243 | if not dir_plot: 244 | dir_plot = os.getcwd() 245 | plot_name = "extsp_" + os.path.splitext(os.path.basename(filepath))[0] 246 | 247 | spp = SigmaProfileParser(filepath) 248 | spp.calculate_averaged_sigmas(averaging_radius=1) 249 | sigmas_corr = spp['seg_sigma_averaged'].copy() 250 | spp.calculate_averaged_sigmas() 251 | sigmas = spp['seg_sigma_averaged'] 252 | 253 | sigma_orth = sigmas_corr - 0.816 * sigmas 254 | pt = Chem.GetPeriodicTable() 255 | atom_AN = [pt.GetAtomicNumber(v) for v in spp['atm_elmnt']] 256 | for i, AN in enumerate(atom_AN): 257 | if AN == 1: 258 | adjacent_index = np.flatnonzero(spp['adjacency_matrix'][i, :])[0] 259 | atom_AN[i] = 100 + atom_AN[adjacent_index] 260 | atom_AN = np.array(atom_AN) 261 | seg_AN = np.array([atom_AN[n] for n in spp['seg_atm_nr']]) 262 | 263 | descriptors = [sigmas, sigma_orth, seg_AN] 264 | descriptor_ranges = [np.arange(-0.03, 0.03, 0.001), np.arange(-0.03, 0.03, 0.001), np.sort(np.unique(atom_AN))] 265 | clustered_descriptors, clustered_areas = spp.cluster_segments_into_segmenttypes( 266 | descriptors, descriptor_ranges 267 | ) 268 | data = { 269 | 'sigma': clustered_descriptors[:, 0].tolist(), 270 | 'sigma_orth': clustered_descriptors[:, 1].tolist(), 271 | 'seg_AN': clustered_descriptors[:, 2].tolist(), 272 | 'area': clustered_areas.tolist(), 273 | } 274 | df_esp = pd.DataFrame(data) 275 | 276 | ANs = [] 277 | AN_labels = [] 278 | for AN in sorted(set(atom_AN)): 279 | if AN > 100: 280 | ANs.append(AN) 281 | AN_labels.append(f'H-{pt.GetElementSymbol(int(AN - 100))}') 282 | for AN in sorted(set(atom_AN)): 283 | if AN < 100: 284 | ANs.append(AN) 285 | AN_labels.append(pt.GetElementSymbol(int(AN))) 286 | 287 | df_esp["seg_AN_label"] = '' 288 | for AN, AN_label in zip(ANs, AN_labels): 289 | df_esp.loc[df_esp["seg_AN"] == AN, "seg_AN_label"] = AN_label 290 | 291 | # Make small areas visible, as they are clusters 292 | df_esp.loc[(df_esp["area"] != 0) & (df_esp["area"] < 0.06), "area"] = 0.06 293 | 294 | # Pivot 295 | df_temp = pd.pivot_table(df_esp, values="sigma_orth", index="sigma", aggfunc='sum') 296 | df_temp.reset_index(inplace=True) 297 | 298 | fontsize = 24 299 | fontsize_tick = 24 300 | 301 | # In static mode latex works very bad 302 | if mode == "static": 303 | labels = { 304 | "sigma": r"$\Large\sigma [e/10^{-10} m]$", 305 | "sigma_orth": r"$\Large\sigma^{\perp} [e/10^{-10} m]$", 306 | } 307 | elif mode == "dynamic": 308 | labels = {} 309 | 310 | atom_color_map = get_atom_color_map(AN_labels) 311 | fig = px.scatter( 312 | df_esp, 313 | x="sigma", 314 | y="sigma_orth", 315 | color="seg_AN_label", 316 | labels=labels, 317 | size="area", 318 | hover_data=["sigma", "sigma_orth", "seg_AN"], 319 | size_max=area_max_size, 320 | opacity=0.7, 321 | color_discrete_map=atom_color_map, 322 | category_orders={"seg_AN_label": AN_labels}, 323 | width=800, 324 | height=500, 325 | ) 326 | fig.update_layout( 327 | { 328 | "xaxis_range": [-0.025, 0.025], 329 | "yaxis_range": [-0.007, 0.007], 330 | "plot_bgcolor": "rgba(0, 0, 0, 0)", 331 | "paper_bgcolor": "White", 332 | "font": {"size": fontsize, "color": "rgba(1, 1, 1, 1)"}, 333 | "legend_title_text": "", 334 | "legend": { 335 | "yanchor": "top", 336 | "y": 0.98, 337 | "xanchor": "left", 338 | "x": 0.85, 339 | "bgcolor": "White", 340 | "bordercolor": "Black", 341 | "borderwidth": 0.5, 342 | }, 343 | } 344 | ) 345 | 346 | fig.update_xaxes( 347 | tick0=-0.020, 348 | tickfont={"size": fontsize_tick}, 349 | dtick=0.01, 350 | color="rgba(1, 1, 1, 1)", 351 | gridcolor="rgba(0, 0, 0, 0.0)", 352 | zeroline=False, 353 | tickformat=".3f", 354 | mirror=True, 355 | linecolor="black", 356 | ticks="outside", 357 | showline=True, 358 | ) 359 | fig.update_yaxes( 360 | tick0=-0.006, 361 | dtick=0.002, 362 | tickfont={"size": fontsize_tick}, 363 | color="rgba(1, 1, 1, 1)", 364 | gridcolor="rgba(0, 0, 0, 0.0)", 365 | zeroline=False, 366 | tickformat=".3f", 367 | mirror=True, 368 | linecolor="black", 369 | ticks="outside", 370 | showline=True, 371 | ) 372 | 373 | fig.show() 374 | if mode == "static": 375 | fig.write_image(os.path.join(dir_plot, plot_name + ".png")) 376 | fig.write_image(os.path.join(dir_plot, plot_name + ".pdf")) 377 | fig.write_image(os.path.join(dir_plot, plot_name + ".svg")) 378 | if mode == "dynamic": 379 | fig.write_html(os.path.join(dir_plot, plot_name + ".html")) 380 | 381 | 382 | def plot_3D_segment_location(filepath, mode="dynamic", dir_plot=".", plot_name="cosmo_surface"): 383 | 384 | spp = SigmaProfileParser(filepath) 385 | mol = rdkit.Chem.MolFromXYZBlock(spp.save_to_xyz()) 386 | charge = int(spp['seg_charge'].sum()) 387 | rdkit.Chem.rdDetermineBonds.DetermineBonds(mol, charge=charge) 388 | if mol is None: 389 | raise ValueError("Unable to load molecule from XYZ file.") 390 | 391 | fig = go.Figure( 392 | data=[ 393 | go.Scatter3d( 394 | x=spp["seg_pos"][:, 0], 395 | y=spp["seg_pos"][:, 1], 396 | z=spp["seg_pos"][:, 2], 397 | mode="markers", 398 | marker=dict( 399 | size=spp["seg_area"] 400 | * 50, # Scale the size for better visualization 401 | color=spp["seg_charge"], # Set the color based on charge 402 | colorscale="bluered", # Color scale for charges 403 | colorbar=dict(title="Charge"), 404 | opacity=0.7, 405 | ), 406 | name=None, 407 | showlegend=False, 408 | ) 409 | ] 410 | ) 411 | atoms_available = sorted(set(spp['atm_elmnt'])) 412 | atom_color_map = get_atom_color_map(atoms_available) 413 | 414 | # Add bonds as lines (RDKit automatically infers bonds from 3D structure) 415 | for bond in mol.GetBonds(): 416 | i = bond.GetBeginAtomIdx() 417 | j = bond.GetEndAtomIdx() 418 | 419 | # Add bond (line) between the two atoms 420 | fig.add_trace( 421 | go.Scatter3d( 422 | x=[spp["atm_pos"][i, 0], spp["atm_pos"][j, 0]], 423 | y=[spp["atm_pos"][i, 1], spp["atm_pos"][j, 1]], 424 | z=[spp["atm_pos"][i, 2], spp["atm_pos"][j, 2]], 425 | mode="lines", 426 | line=dict(color="black", width=8), 427 | showlegend=False, 428 | ) 429 | ) 430 | 431 | # Add spheres for each atom (after bonds to ensure Z-order) 432 | for i, element in enumerate(spp["atm_elmnt"]): 433 | # Get atomic position and radius 434 | x_atm = spp["atm_pos"][i, 0] 435 | y_atm = spp["atm_pos"][i, 1] 436 | z_atm = spp["atm_pos"][i, 2] 437 | radius = spp["atm_rad"][i] 438 | 439 | # Get the color for the current element 440 | color = atom_color_map.get( 441 | element, "orange" 442 | ) # Default to green if element not found 443 | 444 | # Add a sphere for the atom 445 | fig.add_trace( 446 | go.Scatter3d( 447 | x=[x_atm], 448 | y=[y_atm], 449 | z=[z_atm], 450 | mode="markers", 451 | marker=dict( 452 | size=radius * 10, # Scale radius for better visualization 453 | color=color, 454 | ), 455 | name=None, 456 | showlegend=False, # Don't clutter the legend with atom labels 457 | ) 458 | ) 459 | 460 | # Add labels and titles 461 | fig.update_layout( 462 | scene=dict( 463 | xaxis_title="X Position", yaxis_title="Y Position", zaxis_title="Z Position" 464 | ), 465 | width=800, 466 | height=800, 467 | ) 468 | 469 | # Remove grid lines 470 | fig.update_scenes(xaxis_showgrid=False, yaxis_showgrid=False, zaxis_showgrid=False) 471 | 472 | # Show the plot 473 | fig.show() 474 | 475 | if mode == "static": 476 | fig.write_image(os.path.join(dir_plot, plot_name + ".png")) 477 | fig.write_image(os.path.join(dir_plot, plot_name + ".pdf")) 478 | fig.write_image(os.path.join(dir_plot, plot_name + ".svg")) 479 | if mode == "dynamic": 480 | fig.write_html(os.path.join(dir_plot, plot_name + ".html")) 481 | -------------------------------------------------------------------------------- /src/opencosmorspy/helper_functions.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | 4 | import matplotlib.pyplot as plt 5 | import numpy as np 6 | import pandas as pd 7 | import scipy.spatial as spsp 8 | 9 | 10 | def calculate_squared_distances(coord: np.array, diagonal_element=0.0): 11 | 12 | dist = spsp.distance.cdist(coord, coord, "euclidean") 13 | dist_sq_arr = dist * dist 14 | 15 | if diagonal_element != 0.0: 16 | np.fill_diagonal(dist_sq_arr, diagonal_element) 17 | 18 | return dist_sq_arr 19 | 20 | 21 | def get_segtp_index(df_extsp, segtp_tar): 22 | 23 | bool_series = None 24 | for desc in segtp_tar.keys(): 25 | if bool_series is None: 26 | bool_series = np.abs(df_extsp[desc] - segtp_tar[desc]) < 1e-14 27 | else: 28 | bool_series = bool_series & ( 29 | np.abs(df_extsp[desc] - segtp_tar[desc]) < 1e-14 30 | ) 31 | 32 | df_temp = df_extsp.loc[bool_series, :] 33 | 34 | if len(df_temp.index) != 1: 35 | index = None 36 | print("Did not find index. Inspect returned dataframe.") 37 | else: 38 | index = df_temp.index[0] 39 | 40 | return index, df_temp 41 | 42 | 43 | class PycrsError(Exception): 44 | pass 45 | 46 | 47 | if __name__ == "__main__": 48 | 49 | int_arr_dct = {} 50 | 51 | int_arr_dct["A_int"] = np.loadtxt(r"publication/test_A_int.csv", delimiter=",") 52 | int_arr_dct["A_mf"] = np.loadtxt(r"publication/test_A_mf.csv", delimiter=",") 53 | int_arr_dct["A_hb"] = np.loadtxt(r"publication/test_A_hb.csv", delimiter=",") 54 | int_arr_dct["tau"] = np.loadtxt(r"publication/test_tau.csv", delimiter=",") 55 | 56 | df_extsp = pd.read_csv(r"publication/clusters_mix.csv", index_col=0) 57 | 58 | X = np.loadtxt(r"publication/test_X.csv", delimiter=",") 59 | Gamma = np.loadtxt(r"publication/test_X.csv", delimiter=",") 60 | 61 | ##################################################### 62 | segtp_tar_1 = { 63 | "sigma": -0.012, 64 | "sigma_orth": -0.01, 65 | "elmnt_nr": 106, 66 | "mol_charge": 0, 67 | } 68 | idx_1, df_segtp_1 = get_segtp_index(df_extsp, segtp_tar_1) 69 | 70 | segtp_tar_2 = {"sigma": 0.017, "sigma_orth": 0.014, "elmnt_nr": 8, "mol_charge": 0} 71 | idx_2, df_segtp_2 = get_segtp_index(df_extsp, segtp_tar_2) 72 | 73 | print("A_hb", idx_1, idx_2, int_arr_dct["A_hb"][idx_1, idx_2]) 74 | 75 | #################################################### 76 | 77 | ##################################################### 78 | segtp_tar_1 = { 79 | "sigma": -0.012, 80 | "sigma_orth": -0.01, 81 | "elmnt_nr": 106, 82 | "mol_charge": 0, 83 | } 84 | idx_1, df_segtp_1 = get_segtp_index(df_extsp, segtp_tar_1) 85 | 86 | segtp_tar_2 = {"sigma": 0.007, "sigma_orth": 0.005, "elmnt_nr": 8, "mol_charge": 0} 87 | idx_2, df_segtp_2 = get_segtp_index(df_extsp, segtp_tar_2) 88 | 89 | print("A_hb", idx_1, idx_2, int_arr_dct["A_hb"][idx_1, idx_2]) 90 | 91 | #################################################### 92 | -------------------------------------------------------------------------------- /src/opencosmorspy/input_parsers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import re 6 | from collections import UserDict 7 | 8 | import numpy as np 9 | 10 | kJ_per_kcal = 4.184 # kJ/kcal 11 | angstrom_per_bohr = 0.52917721092 # angstrom/bohr 12 | kJdivmol_per_hartree = 2625.499639479 # (kJ/mol)/hartree 13 | 14 | 15 | class SigmaProfileParser(UserDict): 16 | def __init__(self, filepath, qc_program=None, *, calculate_averaged_sigmas=False): 17 | 18 | if qc_program is None: 19 | ext = os.path.splitext(filepath)[-1] 20 | if ext.lower().startswith(".cosmo"): 21 | qc_program = "turbomole" 22 | else: 23 | qc_program = "orca" 24 | 25 | self.data = { 26 | "filepath": filepath, 27 | "filename": os.path.basename(filepath), 28 | "qc_program": qc_program, 29 | "method": "", 30 | "area": None, 31 | "dipole_moment": None, # Debye 32 | "volume": None, 33 | "energy_tot": None, # kJ/mol 34 | "energy_dielectric": None, # kJ/mol 35 | "energy_tot_uncorrected": None, # kJ/mol 36 | "energy_dielectric_uncorrected": None, # kJ/mol 37 | "atm_nr": [], 38 | "atm_pos": [], # angstrom 39 | "atm_elmnt": [], 40 | "atm_rad": [], 41 | "seg_nr": [], 42 | "seg_atm_nr": [], 43 | "seg_pos": [], 44 | "seg_charge": [], # in e 45 | "seg_charge_uncorrected": [], # in e 46 | "seg_area": [], # angstrom² 47 | "seg_sigma_raw": [], # e/angstrom² 48 | "seg_sigma_raw_uncorrected": [], # e/angstrom² 49 | "seg_potential": [], # #kJ/(e*mol) 50 | "seg_potential_uncorrected": [], # #kJ/(e*mol) 51 | "version": 1, 52 | } 53 | 54 | if qc_program == "turbomole": 55 | self._read_turbomolesp() 56 | elif qc_program == "orca": 57 | self._read_orcasp() 58 | else: 59 | raise ValueError(f"Unknown QC file format: {qc_program}") 60 | 61 | if calculate_averaged_sigmas: 62 | self.calculate_averaged_sigmas() 63 | 64 | def save_to_xyz(self, comment=""): 65 | lines = [] 66 | n_atoms = len(self["atm_nr"]) 67 | lines.append(f"{n_atoms}") 68 | lines.append(f"{comment}") 69 | for i_atom in range(n_atoms): 70 | lines.append( 71 | "{:s} {:.16f} {:.16f} {:.16f}".format( 72 | self["atm_elmnt"][i_atom], 73 | self["atm_pos"][i_atom][0], 74 | self["atm_pos"][i_atom][1], 75 | self["atm_pos"][i_atom][2], 76 | ) 77 | ) 78 | return "\n".join(lines) 79 | 80 | def save_to_xyz_file(self, filepath_xyz, comment=""): 81 | with open(filepath_xyz, "w") as xyzf: 82 | xyzf.write(self.save_to_xyz(comment)) 83 | 84 | def cluster_segments_into_segmenttypes(self, descriptors, descriptor_ranges): 85 | areas = self['seg_area'] 86 | if len(descriptors) != len(descriptor_ranges): 87 | raise ValueError('descriptors and descriptor_ranges have to have same length.') 88 | 89 | # descriptor_ranges are assumed to be float, equidistant and sorted or integer and sorted 90 | descriptor_types = [descriptor_range.dtype for descriptor_range in descriptor_ranges] 91 | if not all([dt == float or dt == int for dt in descriptor_types]): 92 | raise TypeError('Only int or float descriptors are supported right now.') 93 | 94 | descriptors = np.transpose(np.array(descriptors)) 95 | n_descriptors = descriptors.shape[1] 96 | 97 | def cluster_segments_to_segment_types_for_one_descriptor(segments_descriptors, segments_area, i_descriptor_to_cluster): 98 | segment_types_descriptors = [] 99 | segment_type_areas = [] 100 | i_descriptor_range = descriptor_ranges[i_descriptor_to_cluster] 101 | for segment_descriptors, segment_area in zip(segments_descriptors, segments_area): 102 | descriptor_value = segment_descriptors[i_descriptor_to_cluster] 103 | 104 | ind_left = np.flatnonzero(i_descriptor_range <= descriptor_value)[-1] 105 | left_clustered_descriptor_value = i_descriptor_range[ind_left] 106 | left_new_segment_type_descriptors = segment_descriptors.copy() 107 | left_new_segment_type_descriptors[i_descriptor_to_cluster] = left_clustered_descriptor_value 108 | segment_types_descriptors.append(left_new_segment_type_descriptors) 109 | 110 | if left_clustered_descriptor_value == descriptor_value: 111 | segment_type_areas.append(segment_area) 112 | else: 113 | right_new_segment_type_descriptors = segment_descriptors.copy() 114 | right_clustered_descriptor_value = i_descriptor_range[ind_left + 1] 115 | clustered_delta = right_clustered_descriptor_value - left_clustered_descriptor_value 116 | right_new_segment_type_descriptors[i_descriptor_to_cluster] = right_clustered_descriptor_value 117 | segment_types_descriptors.append(right_new_segment_type_descriptors) 118 | segment_type_areas.append(segment_area * ((right_clustered_descriptor_value - descriptor_value)/clustered_delta)) 119 | segment_type_areas.append(segment_area * ((descriptor_value - left_clustered_descriptor_value)/clustered_delta)) 120 | 121 | return segment_types_descriptors, segment_type_areas 122 | 123 | all_segment_types = [] 124 | all_segment_type_areas = [] 125 | 126 | for i_segment_descriptors, i_segment_area in zip(descriptors, areas): 127 | 128 | segments_types, segments_types_areas = [i_segment_descriptors.tolist()], [i_segment_area] 129 | 130 | for i_descriptor in range(n_descriptors): 131 | segments_types, segments_types_areas = cluster_segments_to_segment_types_for_one_descriptor(segments_types, segments_types_areas, i_descriptor) 132 | 133 | for segment_type, segment_type_area in zip(segments_types, segments_types_areas): 134 | if segment_type not in all_segment_types: 135 | all_segment_types.append(segment_type) 136 | all_segment_type_areas.append(0) 137 | 138 | segment_type_index = all_segment_types.index(segment_type) 139 | all_segment_type_areas[segment_type_index] += segment_type_area 140 | 141 | all_segment_types = np.array(all_segment_types) 142 | all_segment_type_areas = np.array(all_segment_type_areas) 143 | 144 | # sort 145 | descriptors = [all_segment_types[:, i].tolist() for i in range(n_descriptors)] 146 | descriptors.reverse() 147 | sorted_indices = np.lexsort(descriptors) 148 | 149 | all_segment_types = all_segment_types[sorted_indices] 150 | all_segment_type_areas = all_segment_type_areas[sorted_indices] 151 | 152 | return all_segment_types, all_segment_type_areas 153 | 154 | def cluster_and_create_sigma_profile( 155 | self, sigmas="seg_sigma_averaged", sigmas_range=np.arange(-0.03, 0.03, 0.001) 156 | ): 157 | if sigmas == "seg_sigma_averaged": 158 | if "seg_sigma_averaged" not in self: 159 | self.calculate_averaged_sigmas() 160 | 161 | descriptors = [self[sigmas]] 162 | descriptor_ranges = [sigmas_range] 163 | sp_areas = [] 164 | sp_sigmas = [] 165 | clustered_sigmas, clustered_areas = self.cluster_segments_into_segmenttypes( 166 | descriptors, descriptor_ranges 167 | ) 168 | clustered_sigmas = clustered_sigmas.reshape(-1) 169 | 170 | for sigma in sigmas_range: 171 | area = 0.0 172 | if sigma in clustered_sigmas: 173 | area = clustered_areas[clustered_sigmas == sigma][0] 174 | sp_areas.append(area) 175 | sp_sigmas.append(sigma) 176 | return np.array(sp_sigmas), np.array(sp_areas) 177 | 178 | def calculate_averaged_sigmas(self, *, sigmas_raw=None, averaging_radius=0.5): 179 | 180 | if sigmas_raw is None: 181 | sigmas_raw = self["seg_sigma_raw"] 182 | 183 | areas = self["seg_area"] 184 | seg_radii_squared = areas / np.pi 185 | 186 | averaging_radius_squared = averaging_radius**2 187 | sigmas_averaged = np.zeros_like(sigmas_raw) 188 | 189 | for i_segment in range(len(sigmas_raw)): 190 | d_ij_squared = np.power( 191 | self["seg_pos"] - self["seg_pos"][i_segment, :], 2 192 | ).sum(1) 193 | 194 | radii_squared_plus_r_av_squared = ( 195 | seg_radii_squared + averaging_radius_squared 196 | ) 197 | 198 | sigma_weights = ( 199 | seg_radii_squared 200 | * averaging_radius_squared 201 | / radii_squared_plus_r_av_squared 202 | ) * np.exp(-1 * d_ij_squared / radii_squared_plus_r_av_squared) 203 | 204 | sigmas_averaged[i_segment] = np.sum(sigmas_raw * sigma_weights) / np.sum( 205 | sigma_weights 206 | ) 207 | 208 | self["seg_sigma_averaged"] = sigmas_averaged 209 | 210 | def calculate_sigma_moments(self, *, sigmas=None, sigma_hb_threshold=0.0085): 211 | 212 | if sigmas is None: 213 | if "seg_sigma_averaged" not in self: 214 | self.calculate_averaged_sigmas() 215 | sigmas = self["seg_sigma_averaged"] 216 | 217 | # Zeroth Moment (total surface) 218 | # First Moment (charge) 219 | # Second Moment (polarity) 220 | # Third Moment (sigma profile skewness) 221 | # Fourth Moment (no physical meaning) 222 | # Fifth Moment (no physical meaning...) 223 | # Sixth Moment (no physical meaning...) 224 | 225 | n_moments = 7 226 | areas = self["seg_area"] 227 | 228 | sigma_moments = np.zeros((n_moments)) 229 | 230 | for i in range(n_moments): 231 | sigma_moments[i] = np.sum(np.power(sigmas, i) * areas) 232 | if i > 1: 233 | sigma_moments[i] *= 100**i 234 | 235 | self["sigma_moments"] = sigma_moments 236 | 237 | sigma_hydrogen_bond_acceptor_moments = np.zeros((n_moments)) 238 | sigma_hydrogen_bond_donor_moments = np.zeros((n_moments)) 239 | 240 | # first step adjusting to manual 241 | # only calculate: 242 | # Second Moment 243 | # Third Moment 244 | # Fourth Moment 245 | for i in [2, 3, 4]: 246 | current_HB_threshold = 0.006 + i * 0.002 247 | 248 | sigma_hydrogen_bond_acceptor_moments[i] = np.sum( 249 | np.maximum(sigmas - current_HB_threshold, 0) * areas 250 | ) 251 | sigma_hydrogen_bond_donor_moments[i] = np.sum( 252 | np.maximum(-1 * sigmas - current_HB_threshold, 0) * areas 253 | ) 254 | 255 | sigma_hydrogen_bond_acceptor_moments = 100 * np.abs( 256 | sigma_hydrogen_bond_acceptor_moments 257 | ) 258 | sigma_hydrogen_bond_donor_moments = 100 * np.abs( 259 | sigma_hydrogen_bond_donor_moments 260 | ) 261 | 262 | self["sigma_hydrogen_bond_acceptor_moments"] = ( 263 | sigma_hydrogen_bond_acceptor_moments 264 | ) 265 | self["sigma_hydrogen_bond_donor_moments"] = sigma_hydrogen_bond_donor_moments 266 | 267 | def _read_single_float(self, line, variable, regex, scaling_factor): 268 | 269 | re_match = re.match(regex, line) 270 | if re_match: 271 | self[variable] = float(re_match.groups()[0]) 272 | self[variable] *= scaling_factor 273 | 274 | def _read_turbomole_atom_section(self, cosmofile): 275 | 276 | line = True 277 | 278 | mode = None 279 | while line: 280 | line = next(cosmofile).strip() 281 | line_splt = line.split() 282 | if len(line_splt) != 4 and len(line_splt) != 6: 283 | if mode: 284 | break 285 | else: 286 | continue 287 | 288 | if not mode: 289 | mode = len(line_splt) 290 | 291 | if len(line_splt) == 6: 292 | atm_nr = int(line_splt[0]) - 1 293 | atm_pos = [float(val) for val in line_splt[1:4]] 294 | atm_elmnt = line_splt[4].title() 295 | atm_rad = float(line_splt[5]) 296 | elif len(line_splt) == 4: 297 | atm_nr = len(self["atm_nr"]) 298 | atm_pos = [float(val) for val in line_splt[1:4]] 299 | atm_elmnt = line_splt[0].title() 300 | atm_rad = None 301 | else: 302 | raise ValueError("Lines shoud either have a length of 4 or 6.") 303 | 304 | self["atm_nr"].append(atm_nr) 305 | self["atm_pos"].append(atm_pos) 306 | self["atm_elmnt"].append(atm_elmnt) 307 | self["atm_rad"].append(atm_rad) 308 | 309 | atm_pos_multiplier = angstrom_per_bohr 310 | if mode == 4: 311 | atm_pos_multiplier = 1 312 | 313 | self["atm_nr"] = np.array(self["atm_nr"], dtype="int64") 314 | self["atm_pos"] = ( 315 | np.array(self["atm_pos"], dtype="float64") * atm_pos_multiplier 316 | ) 317 | self["atm_rad"] = np.array(self["atm_rad"], dtype="float64") 318 | 319 | def _read_turbomole_seg_section(self, cosmofile): 320 | 321 | line = next(cosmofile) 322 | 323 | while line: 324 | try: 325 | line = next(cosmofile).strip() 326 | line_splt = line.split() 327 | if len(line_splt) != 9: 328 | if self["seg_nr"]: 329 | break 330 | else: 331 | continue 332 | 333 | except StopIteration: 334 | break 335 | if not line: 336 | break 337 | 338 | self["seg_nr"].append(int(line_splt[0]) - 1) 339 | self["seg_atm_nr"].append(int(line_splt[1]) - 1) 340 | self["seg_pos"].append([float(val) for val in line_splt[2:5]]) 341 | self["seg_charge"].append(float(line_splt[5])) 342 | self["seg_area"].append(float(line_splt[6])) 343 | self["seg_sigma_raw"].append(float(line_splt[7])) 344 | self["seg_potential"].append(float(line_splt[8])) 345 | 346 | self["seg_nr"] = np.array(self["seg_nr"], dtype="int64") 347 | self["seg_atm_nr"] = np.array(self["seg_atm_nr"], dtype="int64") 348 | self["seg_pos"] = np.array(self["seg_pos"], dtype="float64") * angstrom_per_bohr 349 | self["seg_charge"] = np.array(self["seg_charge"], dtype="float64") 350 | self["seg_area"] = np.array(self["seg_area"], dtype="float64") 351 | self["seg_sigma_raw"] = np.array(self["seg_sigma_raw"], dtype="float64") 352 | self["seg_potential"] = ( 353 | np.array(self["seg_potential"], dtype="float64") * kJdivmol_per_hartree * angstrom_per_bohr 354 | ) 355 | 356 | def _read_turbomolesp(self): 357 | 358 | with open(self["filepath"], "r") as cosmofile: 359 | 360 | for i_line, line in enumerate(cosmofile): 361 | 362 | line = line.strip() 363 | 364 | if line == "$info": 365 | line = next(cosmofile).strip() 366 | self["method"] = ( 367 | f'{line.split(";")[-2]}_{line.split(";")[-1]}'.lower() 368 | ) 369 | 370 | self._read_single_float( 371 | line, "area", r"area\s*=\s*([0-9+-.eE]+)", angstrom_per_bohr**2 372 | ) 373 | 374 | self._read_single_float( 375 | line, "volume", r"volume\s*=\s*([0-9+-.eE]+)", angstrom_per_bohr**3 376 | ) 377 | 378 | self._read_single_float( 379 | line, 380 | "energy_tot", 381 | r"Total\s+energy\s+corrected.*=\s*([0-9+-.eE]+)", 382 | kJdivmol_per_hartree, 383 | ) 384 | 385 | self._read_single_float( 386 | line, 387 | "energy_dielectric", 388 | r"Dielectric\s+energy\s+\[a\.u\.\]\s*=\s*([0-9+-.eE]+)", 389 | kJdivmol_per_hartree, 390 | ) 391 | 392 | if line == "$coord_rad" or i_line == 0 and line == "$coord_car": 393 | self._read_turbomole_atom_section(cosmofile) 394 | 395 | if line == "$segment_information": 396 | self._read_turbomole_seg_section(cosmofile) 397 | 398 | def _read_orca_atom_coordinates(self, orcasp_file): 399 | 400 | next(orcasp_file) 401 | line = next(orcasp_file).strip() 402 | 403 | atm_nr = 0 404 | while line: 405 | try: 406 | line = next(orcasp_file).strip() 407 | except StopIteration: 408 | line = False 409 | 410 | if not line or "###" in line: 411 | break 412 | line_splt = line.split() 413 | 414 | self["atm_nr"].append(atm_nr) 415 | atm_nr += 1 416 | 417 | self["atm_pos"].append([float(val) for val in line_splt[1:]]) 418 | self["atm_elmnt"].append(line_splt[0].title()) 419 | 420 | self["atm_nr"] = np.array(self["atm_nr"], dtype="int64") 421 | self["atm_pos"] = np.array(self["atm_pos"], dtype="float64") 422 | 423 | def _read_orca_atom_radii(self, orcasp_file): 424 | 425 | line = next(orcasp_file) 426 | 427 | while line: 428 | line = next(orcasp_file).strip() 429 | if not line or "---" in line: 430 | break 431 | line_splt = line.split() 432 | 433 | self["atm_rad"].append(line_splt[3]) 434 | 435 | self["atm_rad"] = np.array(self["atm_rad"], dtype="float64") * angstrom_per_bohr 436 | 437 | def _read_orca_seg_section(self, orcasp_file): 438 | 439 | next(orcasp_file) 440 | line = next(orcasp_file) 441 | 442 | seg_nr = 0 443 | while line: 444 | try: 445 | line = next(orcasp_file).strip() 446 | except StopIteration: 447 | break 448 | if not line: 449 | break 450 | line_splt = line.split() 451 | 452 | self["seg_nr"].append(seg_nr) 453 | seg_nr += 1 454 | self["seg_atm_nr"].append(int(line_splt[-1])) 455 | self["seg_pos"].append([float(val) for val in line_splt[0:3]]) 456 | self["seg_charge_uncorrected"].append(float(line_splt[5])) 457 | self["seg_area"].append(float(line_splt[3])) 458 | self["seg_potential_uncorrected"].append(float(line_splt[4])) 459 | 460 | self["seg_nr"] = np.array(self["seg_nr"], dtype="int64") 461 | self["seg_atm_nr"] = np.array(self["seg_atm_nr"], dtype="int64") 462 | self["seg_pos"] = np.array(self["seg_pos"], dtype="float64") * angstrom_per_bohr 463 | self["seg_charge_uncorrected"] = np.array( 464 | self["seg_charge_uncorrected"], dtype="float64" 465 | ) 466 | self["seg_area"] = ( 467 | np.array(self["seg_area"], dtype="float64") * angstrom_per_bohr**2 468 | ) 469 | self["seg_sigma_raw_uncorrected"] = ( 470 | self["seg_charge_uncorrected"] / self["seg_area"] 471 | ) 472 | self["seg_potential_uncorrected"] = ( 473 | np.array(self["seg_potential_uncorrected"], dtype="float64") 474 | * kJdivmol_per_hartree 475 | ) 476 | 477 | def _read_orca_cpcm_correction_section(self, orcasp_file): 478 | 479 | line = next(orcasp_file) 480 | self._read_single_float( 481 | line, 482 | "energy_dielectric", 483 | r"Corrected\s+dielectric\s+energy\s+=\s*([0-9+-.eE]+)", 484 | kJdivmol_per_hartree, 485 | ) 486 | 487 | self["energy_tot_uncorrected"] = self["energy_tot"] 488 | self["energy_tot"] = ( 489 | self["energy_tot_uncorrected"] 490 | - self["energy_dielectric_uncorrected"] 491 | + self["energy_dielectric"] 492 | ) 493 | next(orcasp_file) 494 | next(orcasp_file) 495 | 496 | corrected_charges = [] 497 | while line: 498 | try: 499 | line = next(orcasp_file).strip() 500 | except StopIteration: 501 | break 502 | if not line: 503 | break 504 | 505 | corrected_charge = float(line) 506 | corrected_charges.append(corrected_charge) 507 | 508 | assert self["seg_charge_uncorrected"].size == len(corrected_charges) 509 | self["seg_charge"] = np.array(corrected_charges, dtype="float64") 510 | self["seg_sigma_raw"] = self["seg_charge"] / self["seg_area"] 511 | 512 | def _read_orca_adjacency_matrix(self, orcasp_file): 513 | 514 | atm_nr = self["atm_pos"].shape[0] 515 | adjacency_marix = [] 516 | for line_nr in range(atm_nr): 517 | line = next(orcasp_file) 518 | line = [int(entry.strip()) for entry in line.split()] 519 | adjacency_marix.append(line) 520 | 521 | self["adjacency_matrix"] = np.array(adjacency_marix, dtype="int") 522 | 523 | def calculate_molecular_dipole(self): 524 | if "dipole_moment" not in self: 525 | raise ValueError( 526 | "The specified input file did not include dipole moment information." 527 | ) 528 | return float(np.linalg.norm(self["dipole_moment"])) 529 | 530 | def _read_orcasp(self): 531 | 532 | with open(self["filepath"], "r") as orcasp_file: 533 | 534 | line = next(orcasp_file).strip() 535 | self["name"], self["method"] = (entry.strip() for entry in line.split(":")) 536 | 537 | for line in orcasp_file: 538 | 539 | line = line.strip() 540 | 541 | self._read_single_float( 542 | line, "area", r"\s*([0-9+-.eE]+)\s+#\s*Area", angstrom_per_bohr**2 543 | ) 544 | 545 | self._read_single_float( 546 | line, 547 | "volume", 548 | r"\s*([0-9+-.eE]+)\s+#\s*Volume", 549 | angstrom_per_bohr**3, 550 | ) 551 | 552 | self._read_single_float( 553 | line, 554 | "energy_tot", 555 | r"FINAL\s+SINGLE\s+POINT\s+ENERGY\s*([0-9+-.eE]+)", 556 | kJdivmol_per_hartree, 557 | ) 558 | 559 | self._read_single_float( 560 | line, 561 | "energy_dielectric_uncorrected", 562 | r"\s*([0-9+-.eE]+)\s+#\s*CPCM\s+dielectric\s+energy", 563 | kJdivmol_per_hartree, 564 | ) 565 | 566 | if line == "#XYZ_FILE": 567 | self._read_orca_atom_coordinates(orcasp_file) 568 | 569 | if "CARTESIAN COORDINATES (A.U.)" in line: 570 | self._read_orca_atom_radii(orcasp_file) 571 | 572 | if "SURFACE POINTS (A.U.)" in line: 573 | self._read_orca_seg_section(orcasp_file) 574 | 575 | if "#COSMO_corrected" in line or "#CPCM_corrected" in line: 576 | self._read_orca_cpcm_correction_section(orcasp_file) 577 | 578 | if "#ADJACENCY_MATRIX" in line: 579 | self._read_orca_adjacency_matrix(orcasp_file) 580 | 581 | if "DIPOLE MOMENT (Debye)" in line: 582 | line = next(orcasp_file).strip() 583 | self["dipole_moment"] = np.array( 584 | [float(v) for v in line.strip().split()[-3:]] 585 | ) 586 | 587 | 588 | class PyCrsError(Exception): 589 | pass 590 | 591 | 592 | if __name__ == "__main__": 593 | main() 594 | -------------------------------------------------------------------------------- /src/opencosmorspy/molecules.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Implementation of molecule classes 5 | 6 | @author: Thomas Gerlach, 2021 7 | """ 8 | import collections 9 | 10 | import matplotlib.pyplot as plt 11 | import numpy as np 12 | import pandas as pd 13 | import plotly.express as px 14 | import plotly.graph_objects as go 15 | import plotly.io as pio 16 | 17 | pio.renderers.default = "browser" 18 | 19 | import opencosmorspy.helper_functions as hf 20 | from opencosmorspy.input_parsers import SigmaProfileParser 21 | from opencosmorspy.parameterization import Parameterization 22 | from opencosmorspy.segtp_collection import SegtpCollection 23 | 24 | 25 | class Molecule(object): 26 | def __init__(self, filepath_lst): 27 | 28 | if len(filepath_lst) > 1: 29 | raise NotImplementedError("More than one conformer not supported") 30 | 31 | self.cosmo_struct_lst = [] 32 | for path in filepath_lst: 33 | cosmo_info = SigmaProfileParser(path) 34 | self.cosmo_struct_lst.append(COSMOStruct(cosmo_info)) 35 | self.cosmo_struct_lst[-1] 36 | 37 | def convert_properties(self, r_av, mf_r_av_corr): 38 | 39 | for cosmo_struct in self.cosmo_struct_lst: 40 | cosmo_struct.convert_properties(r_av, mf_r_av_corr) 41 | 42 | def get_segtp_area_dct(self): 43 | 44 | return self.cosmo_struct_lst[0].segtp_area_dct 45 | 46 | def get_segtp_nseg_dct(self, a_eff): 47 | 48 | segtp_nseg_dct = {} 49 | 50 | for idxstp, area in self.cosmo_struct_lst[0].segtp_area_dct.items(): 51 | segtp_nseg_dct[idxstp] = area / a_eff 52 | 53 | return segtp_nseg_dct 54 | 55 | def get_segtp_nseg_arr(self, a_eff, n_segtp): 56 | 57 | segtp_nseg_arr = np.zeros(n_segtp, dtype="float64") 58 | 59 | segtp_nseg_dct = self.get_segtp_nseg_dct(a_eff) 60 | 61 | for idxstp, n_seg in segtp_nseg_dct.items(): 62 | segtp_nseg_arr[idxstp] = n_seg 63 | 64 | return segtp_nseg_arr 65 | 66 | def get_area(self): 67 | 68 | return self.cosmo_struct_lst[0].area 69 | 70 | def get_volume(self): 71 | 72 | return self.cosmo_struct_lst[0].volume 73 | 74 | 75 | class COSMOStruct(object): 76 | def __init__(self, cosmo_info: dict): 77 | """ 78 | self.cosmo_info = { 79 | 'filepath': filepath, 80 | 'filename': os.path.basename(filepath), 81 | 'qc_program': qc_program, 82 | 'method': '', 83 | 'area': None, 84 | 'volume': None, 85 | 'energy_tot': None, 86 | 'energy_dielectric': None, 87 | 'atm_nr': [], 88 | 'atm_pos': [], 89 | 'atm_elmnt': [], 90 | 'atm_rad': [], 91 | 'seg_nr': [], 92 | 'seg_atm_nr': [], 93 | 'seg_pos': [], 94 | 'seg_charge': [], 95 | 'seg_area': [], 96 | 'seg_sigma_raw': [], 97 | 'seg_potential': [] 98 | } 99 | """ 100 | 101 | self.filepath = cosmo_info["filepath"] 102 | self.filename = cosmo_info["filename"] 103 | 104 | self.energy_tot = cosmo_info["energy_tot"] 105 | self.energy_dielectric = cosmo_info["energy_dielectric"] 106 | 107 | self.area = cosmo_info["area"] 108 | self.volume = cosmo_info["volume"] 109 | 110 | self.atm_elmnt = np.array([elmnt.lower() for elmnt in cosmo_info["atm_elmnt"]]) 111 | 112 | self.atm_pos = cosmo_info["atm_pos"] 113 | self.atm_rad = cosmo_info["atm_rad"] 114 | self.seg_nr = cosmo_info["seg_nr"] 115 | self.seg_atm_nr = cosmo_info["seg_atm_nr"] 116 | self.seg_pos = cosmo_info["seg_pos"] 117 | self.seg_charge = cosmo_info["seg_charge"] 118 | self.seg_area = cosmo_info["seg_area"] 119 | self.seg_sigma_raw = ( 120 | cosmo_info["seg_sigma_raw"] 121 | if len(cosmo_info["seg_sigma_raw"]) != 0 122 | else cosmo_info["seg_sigma_raw_uncorrected"] 123 | ) 124 | self.seg_potential = cosmo_info["seg_potential"] 125 | 126 | # Define missing properties 127 | self.seg_sigma = None 128 | self.seg_sigma_orth = None 129 | self.atm_elmnt_nr = None 130 | self.seg_elmnt_nr = None 131 | self.seg_group = None 132 | self.screen_charge = None 133 | 134 | self.seg_segtp_assignment_lst = [] 135 | self.segtp_area_dct = {} 136 | 137 | def convert_properties(self, r_av, mf_r_av_corr): 138 | 139 | self.atm_elmnt_nr = _convert_element_symbols(self.atm_elmnt) 140 | 141 | # Modify element numbers of hydrogen to account for bond 142 | self._convert_hydrogen_element_number() 143 | 144 | # Add element numbers to segments 145 | self.seg_elmnt_nr = self.atm_elmnt_nr[self.seg_atm_nr] 146 | 147 | # Assign groups to segment 148 | self.seg_group = np.array(["default"] * len(self.seg_nr)) 149 | 150 | # Calculate total screening charge 151 | self.screen_charge = (self.seg_area * self.seg_sigma_raw).sum() 152 | 153 | # Calculate averaged sigma and sigma_orth 154 | self.seg_sigma, dist_sq_arr = sigma_averaging( 155 | r_av, self.seg_pos, self.seg_area, self.seg_sigma_raw 156 | ) 157 | 158 | # Calculate sigma_orthogonal 159 | seg_sigma_corr, _ = sigma_averaging( 160 | mf_r_av_corr, 161 | self.seg_pos, 162 | self.seg_area, 163 | self.seg_sigma_raw, 164 | dist_sq_arr=dist_sq_arr, 165 | ) 166 | self.seg_sigma_orth = seg_sigma_corr - 0.816 * self.seg_sigma 167 | 168 | # print('WARNING: OVERWRITING SIGMA ORTH FOR TESTS') 169 | # self.seg_sigma_orth = seg_sigma_corr 170 | 171 | def _convert_hydrogen_element_number(self): 172 | 173 | dist_sq_arr = hf.calculate_squared_distances( 174 | self.atm_pos, diagonal_element=np.nan 175 | ) 176 | 177 | for idx, elmnt in enumerate(self.atm_elmnt_nr): 178 | if elmnt == 1: 179 | 180 | idx_bnd = np.nanargmin(dist_sq_arr[idx, :]) 181 | 182 | elmnt_nr_new = 100 + self.atm_elmnt_nr[idx_bnd] 183 | 184 | assert elmnt_nr_new != 101 185 | 186 | self.atm_elmnt_nr[idx] = elmnt_nr_new 187 | 188 | def associate_segtps(self, seg_segtp_assignment_lst): 189 | """ 190 | 191 | 192 | Parameters 193 | ---------- 194 | seg_segtp_assignment_lst : List of dict. required 195 | Each dictionary corresponds to a segment and contains 196 | index_of_segtp_in_collection:fraction_of_seg_in_segtp 197 | pairs 198 | 199 | Returns 200 | ------- 201 | None. 202 | 203 | """ 204 | self.seg_segtp_assignment_lst = seg_segtp_assignment_lst 205 | 206 | segtp_area_dct = {} 207 | 208 | assert len(seg_segtp_assignment_lst) == len(self.seg_area) 209 | 210 | for area, assignment in zip(self.seg_area, self.seg_segtp_assignment_lst): 211 | for key, value in assignment.items(): 212 | if key in segtp_area_dct: 213 | segtp_area_dct[key] += area * value 214 | else: 215 | segtp_area_dct[key] = area * value 216 | 217 | self.segtp_area_dct = segtp_area_dct 218 | 219 | 220 | def sigma_averaging(r_av, seg_pos, seg_area, seg_sigma_raw, dist_sq_arr=None): 221 | """ 222 | Creates averaged sigmas from raw sigmas 223 | 224 | Arguments: 225 | --------- 226 | r_av: float. required. 227 | Averaging radius in Angstrom 228 | 229 | Returns: 230 | -------- 231 | None 232 | 233 | """ 234 | 235 | r_seg_sq = (1 / np.pi) * seg_area 236 | r_av_sq = r_av**2 237 | 238 | inv_rad_arr = 1 / (r_seg_sq + r_av_sq) 239 | 240 | if dist_sq_arr is None: 241 | dist_sq_arr = hf.calculate_squared_distances(seg_pos) 242 | 243 | exp_arr = np.exp(-dist_sq_arr * inv_rad_arr) 244 | 245 | buff_arr = (r_av_sq * inv_rad_arr * exp_arr).T 246 | 247 | # sigma_av = ((seg_sigma_raw*fac_arr).sum(axis=1) / 248 | # fac_arr.sum(axis=1)) 249 | sigma_av = (seg_sigma_raw * r_seg_sq).dot(buff_arr) / r_seg_sq.dot(buff_arr) 250 | 251 | do_test = False 252 | if do_test: 253 | n_seg = seg_pos.shape[0] 254 | sigma_av_test = np.zeros(n_seg) 255 | dist_sq_arr_test = np.zeros((n_seg, n_seg)) 256 | for idx1 in range(n_seg): 257 | buffdb1 = 0 258 | sigma_av_test[idx1] = 0 259 | # r_seg_sq_idx1_test = 1/np.pi*seg_area[idx1] 260 | for idx2 in range(n_seg): 261 | dist_sq_arr_test[idx1, idx2] = ( 262 | (seg_pos[idx1, 0] - seg_pos[idx2, 0]) ** 2 263 | + (seg_pos[idx1, 1] - seg_pos[idx2, 1]) ** 2 264 | + (seg_pos[idx1, 2] - seg_pos[idx2, 2]) ** 2 265 | ) 266 | 267 | r_seg_sq_idx2_test = 1 / np.pi * seg_area[idx2] 268 | 269 | buffdb3 = r_seg_sq_idx2_test + r_av_sq 270 | 271 | av_fac = ( 272 | r_seg_sq_idx2_test 273 | * r_av_sq 274 | / buffdb3 275 | * np.exp(-dist_sq_arr_test[idx1, idx2] / buffdb3) 276 | ) 277 | 278 | buffdb1 = buffdb1 + av_fac 279 | 280 | sigma_av_test[idx1] += seg_sigma_raw[idx2] * av_fac 281 | 282 | sigma_av_test[idx1] /= buffdb1 283 | 284 | sigma_av = sigma_av_test 285 | 286 | return sigma_av, dist_sq_arr 287 | 288 | 289 | def _convert_element_symbols(elmnt_lst): 290 | 291 | elmnt_dct = { 292 | "h": 1, "he": 2, "li": 3, "be": 4, "b": 5, "c": 6, "n": 7, "o": 8, "f": 9, "ne": 10, 293 | "na": 11, "mg": 12, "al": 13, "si": 14, "p": 15, "s": 16, "cl": 17, "ar": 18, "k": 19, "ca": 20, 294 | "sc": 21, "ti": 22, "v": 23, "cr": 24, "mn": 25, "fe": 26, "co": 27, "ni": 28, "cu": 29, "zn": 30, 295 | "ga": 31, "ge": 32, "as": 33, "se": 34, "br": 35, "kr": 36, "rb": 37, "sr": 38, "y": 39, "zr": 40, 296 | "nb": 41, "mo": 42, "tc": 43, "ru": 44, "rh": 45, "pd": 46, "ag": 47, "cd": 48, "in": 49, "sn": 50, 297 | "sb": 51, "te": 52, "i": 53, "xe": 54, "cs": 55, "ba": 56, "la": 57, "ce": 58, "pr": 59, "nd": 60, 298 | "pm": 61, "sm": 62, "eu": 63, "gd": 64, "tb": 65, "dy": 66, "ho": 67, "er": 68, "tm": 69, "yb": 70, 299 | "lu": 71, "hf": 72, "ta": 73, "w": 74, "re": 75, "os": 76, "ir": 77, "pt": 78, "au": 79, "hg": 80, 300 | "tl": 81, "pb": 82, "bi": 83, "po": 84, "at": 85, "rn": 86, "fr": 87, "ra": 88, "ac": 89, "th": 90, 301 | "pa": 91, "u": 92, "np": 93, "pu": 94, "am": 95, "cm": 96, "bk": 97, "cf": 98, "es": 99, "fm": 100, 302 | "md": 101, "no": 102, "lr": 103, "rf": 104, "db": 105, "sg": 106, "bh": 107, "hs": 108, "mt": 109, 303 | "ds": 110, "rg": 111, "cn": 112, "nh": 113, "fl": 114, "mc": 115, "lv": 116, "ts": 117, "og": 118 304 | } 305 | 306 | elmnt_lst_lower = [elmnt.lower() for elmnt in elmnt_lst] 307 | 308 | missing_elements = set(elmnt_lst_lower) - set(elmnt_dct.keys()) 309 | if missing_elements: 310 | raise ValueError("Unknown elements") 311 | 312 | elmnt_nr_lst = [elmnt_dct[elmnt] for elmnt in elmnt_lst] 313 | 314 | return np.array(elmnt_nr_lst, dtype="int_") 315 | 316 | 317 | def helper_create_extsp(path_inp, qc_program): 318 | 319 | if qc_program == "turbomole": 320 | par = Parameterization("default_turbomole") 321 | else: 322 | par = Parameterization("default_orca") 323 | 324 | mol = Molecule([path_inp], qc_program) 325 | mol.convert_properties(par.r_av, par.mf_r_av_corr) 326 | 327 | segtp_col = SegtpCollection(par) 328 | 329 | segtp_col.cluster_cosmo_struct( 330 | mol.cosmo_struct_lst[0], par.sigma_grid, par.sigma_orth_grid 331 | ) 332 | print("N_clusters", len(segtp_col.segtp_lst)) 333 | 334 | # cosmo_struct = mol.cosmo_struct_lst[0] 335 | df_esp = pd.DataFrame(segtp_col.get_segtps_as_array_dct()) 336 | df_esp["area"] = 0.0 337 | df_esp.loc[list(mol.cosmo_struct_lst[0].segtp_area_dct.keys()), "area"] = list( 338 | mol.cosmo_struct_lst[0].segtp_area_dct.values() 339 | ) 340 | 341 | return df_esp 342 | 343 | 344 | def helper_print_segment_clusters(crs): 345 | 346 | segtp_col = crs.enth.segtp_collection 347 | print("N_clusters", len(segtp_col.segtp_lst)) 348 | df_esp = pd.DataFrame(segtp_col.get_segtps_as_array_dct()) 349 | 350 | return df_esp 351 | 352 | 353 | if __name__ == "__main__": 354 | 355 | import os 356 | 357 | filepath_lst = [] 358 | filepath_lst.append( 359 | os.path.abspath( 360 | r"./../../000_publication/COSMO_ORCA" 361 | r"/C2H6O_001_ethanol/COSMO_TZVPD" 362 | r"/C2H6O_001_ethanol_CnfS1_c000.orcacosmo" 363 | ) 364 | ) 365 | # qc_program_dct[filepath_lst[-1]] = 'orca' 366 | # plot_label_dct[filepath_lst[-1]] = 'ORCA' 367 | 368 | mol_orca = Molecule(filepath_lst, qc_program="orca") 369 | struct_orca = mol_orca.cosmo_struct_lst[0] 370 | print("ORCA ETOH", (struct_orca.seg_area * struct_orca.seg_sigma_raw).sum()) 371 | 372 | filepath_lst = [] 373 | filepath_lst.append( 374 | os.path.abspath( 375 | r"./../../000_publication/COSMO_TMOLE" 376 | r"/C2H6O_001_ethanol/COSMO_TZVP" 377 | r"/C2H6O_001_ethanol_CnfS1_c000.cosmo" 378 | ) 379 | ) 380 | mol_tmole = Molecule(filepath_lst, qc_program="turbomole") 381 | struct_tmole = mol_tmole.cosmo_struct_lst[0] 382 | print("TMOLE ETOH", (struct_tmole.seg_area * struct_tmole.seg_sigma_raw).sum()) 383 | -------------------------------------------------------------------------------- /src/opencosmorspy/parameterization.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Implementation of COSMO-RS parameterization class. 5 | 6 | @author: Thomas Gerlach, 2021 7 | """ 8 | 9 | import numpy as np 10 | 11 | 12 | class Parameterization(object): 13 | def __init__(self, name): 14 | 15 | if name == "default_turbomole": 16 | self._get_default_turbomole() 17 | if name == "default_orca": 18 | self._get_default_orca() 19 | self.name = name 20 | 21 | def _get_default_turbomole(self): 22 | 23 | self.qc_program = "turbomole" 24 | 25 | self.descriptor_lst = ["sigma", "sigma_orth", "elmnt_nr", "group", "mol_charge"] 26 | 27 | self.a_eff = 6.25 # Eckert and Klamt, 2002 28 | self.r_av = 0.5 # Klamt and Eckert, 2000 29 | self.sigma_min = -0.15 30 | self.sigma_max = 0.15 31 | self.sigma_step = 0.001 # Klamt, 1995? 32 | self.sigma_grid = np.arange( 33 | self.sigma_min, self.sigma_max + self.sigma_step, self.sigma_step 34 | ) 35 | self.sigma_orth_min = -0.15 36 | self.sigma_orth_max = 0.15 37 | self.sigma_orth_step = 0.001 38 | self.sigma_orth_grid = np.arange( 39 | self.sigma_orth_min, 40 | self.sigma_orth_max + self.sigma_orth_step, 41 | self.sigma_orth_step, 42 | ) 43 | 44 | self.mf_use_sigma_orth = True 45 | self.mf_alpha = 5950.0e3 # Eckert and Klamt, 2002 46 | self.mf_r_av_corr = 1.0 # Klamt et al., 1998 47 | self.mf_f_corr = 2.4 # Klamt et al., 1998 48 | 49 | self.hb_term = "default" 50 | self.hb_c = 36700.0e3 # Eckert and Klamt, 2002 51 | self.hb_c_T = 1.5 # Klamt and Eckert, 2000 52 | self.hb_sigma_thresh = 0.0085 # Eckert and Klamt, 2002 53 | self.hb_don_elmnt_nr_arr = np.array( 54 | [1] + [entry for entry in range(100, 151, 1)] 55 | ) 56 | self.hb_acc_elmnt_nr_arr = np.array([6, 7, 8, 9, 15, 16, 17, 35, 53]) 57 | self.hb_pref_arr = np.ones(201, dtype="float") 58 | 59 | self.comb_term = "staverman_guggenheim" 60 | self.comb_sg_z_coord = 10.0 61 | self.comb_sg_a_std = 79.53 # Lin and Sandler, 2002 62 | self.comb_sg_expsc_exponent = 0.75 63 | 64 | self.calculate_contact_statistics_molecule_properties = False 65 | 66 | self.cosmospace_max_iter = 1000 67 | self.cosmospace_conv_thresh = 1e-6 68 | 69 | def _get_default_orca(self): 70 | 71 | self.qc_program = "orca" 72 | 73 | self.descriptor_lst = ["sigma", "sigma_orth", "elmnt_nr", "group", "mol_charge"] 74 | 75 | self.a_eff = 6.226 76 | self.r_av = 0.5 # Klamt and Eckert, 2000 77 | self.sigma_min = -0.15 78 | self.sigma_max = 0.15 79 | self.sigma_step = 0.001 # Klamt, 1995? 80 | self.sigma_grid = np.arange( 81 | self.sigma_min, self.sigma_max + self.sigma_step, self.sigma_step 82 | ) 83 | self.sigma_orth_min = -0.15 84 | self.sigma_orth_max = 0.15 85 | self.sigma_orth_step = 0.001 86 | self.sigma_orth_grid = np.arange( 87 | self.sigma_orth_min, 88 | self.sigma_orth_max + self.sigma_orth_step, 89 | self.sigma_orth_step, 90 | ) 91 | 92 | self.mf_use_sigma_orth = True 93 | self.mf_alpha = 7.579075e6 94 | self.mf_r_av_corr = 1.0 # Klamt et al., 1998 95 | self.mf_f_corr = 2.4 # Klamt et al., 1998 96 | 97 | self.hb_term = "default" 98 | self.hb_c = 2.7488747e7 99 | self.hb_c_T = 1.5 # Klamt and Eckert, 2000 100 | self.hb_sigma_thresh = 7.686e-03 101 | self.hb_don_elmnt_nr_arr = np.array( 102 | [1] + [entry for entry in range(100, 151, 1)] 103 | ) 104 | self.hb_acc_elmnt_nr_arr = np.array([6, 7, 8, 9, 15, 16, 17, 35, 53]) 105 | self.hb_pref_arr = np.ones(201, dtype="float") 106 | 107 | self.comb_term = "staverman_guggenheim" 108 | self.comb_sg_z_coord = 10.0 109 | self.comb_sg_a_std = 47.999 110 | # self.comb_sg_expsc_exponent = 0.75 111 | 112 | self.calculate_contact_statistics_molecule_properties = False 113 | 114 | self.cosmospace_max_iter = 1000 115 | self.cosmospace_conv_thresh = 1e-6 116 | 117 | def check_parameterization(self): 118 | pass 119 | 120 | def __str__(self): 121 | attributes = vars(self) 122 | max_key_length = max(len(key) for key in attributes) 123 | formatted_attributes = "\n".join( 124 | f"{key.rjust(max_key_length)} : {value}" 125 | for key, value in attributes.items() 126 | ) 127 | return f"{self.name}:\n{formatted_attributes}" 128 | 129 | 130 | class openCOSMORS24a(Parameterization): 131 | def __init__(self): 132 | super().__init__("default_orca") 133 | self.name = "24a" 134 | 135 | self.hb_don_elmnt_nr_arr = np.array([1] + [entry for entry in range(1, 151, 1)]) 136 | self.hb_acc_elmnt_nr_arr = np.array([1] + [entry for entry in range(1, 151, 1)]) 137 | self.hb_pref_arr = np.ones(201, dtype="float") 138 | 139 | # parameters different then default_orca 140 | self.a_eff = 5.9248470 # Ų 141 | self.mf_alpha = 7.2847361e06 # J/mol Ų e² 142 | self.hb_c = 4.3311555e07 # J/mol Ų e² 143 | self.hb_sigma_thresh = 9.6112460e-03 # e/Ų 144 | 145 | self.comb_sg_a_std = 4.1623570e01 # Ų 146 | 147 | # the solvation energy parameters 148 | # in the original optimization were in kcal/mol 149 | # as all of the data was in kcal/mol 150 | # values in the paper were given in kJ/mol 151 | # for consistency purposes 152 | self.tau_1 = 2.933803e-02 # kcal/mol Ų 153 | self.tau_6 = 2.287904e-02 # kcal/mol Ų 154 | self.tau_7 = 7.007681e-04 # kcal/mol Ų 155 | self.tau_8 = 3.545052e-03 # kcal/mol Ų 156 | self.tau_9 = 5.608829e-03 # kcal/mol Ų 157 | self.tau_17 = 3.414282e-02 # kcal/mol Ų 158 | self.tau_35 = 4.085111e-02 # kcal/mol Ų 159 | self.tau_14 = 4.215503e-03 # kcal/mol Ų 160 | self.tau_15 = 3.607977e-03 # kcal/mol Ų 161 | self.tau_16 = 3.498700e-02 # kcal/mol Ų 162 | self.eta = -4.448499e+00 # kcal/mol 163 | self.omega_ring = 2.6302510E-01 # kcal/mol 164 | -------------------------------------------------------------------------------- /src/opencosmorspy/segtp_collection.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Created on Wed Feb 3 22:07:53 2021 5 | 6 | @author: lergos 7 | """ 8 | import numpy as np 9 | import pandas as pd 10 | 11 | 12 | from opencosmorspy.parameterization import Parameterization 13 | 14 | 15 | class SegtpCollection(object): 16 | def __init__(self, par): 17 | 18 | self.par = par 19 | self.segtp_lst = [] 20 | 21 | def __iter__(self): 22 | return iter(self.segtp_lst) 23 | 24 | def __len__(self): 25 | return self.segtp_lst.__len__() 26 | 27 | def __getitem__(self, key): 28 | return self.segtp_lst.__getitem__(key) 29 | 30 | def cluster_cosmo_struct(self, cosmo_struct, sigma_grid, sigma_orth_grid): 31 | 32 | seg_segtp_assignment_lst = [] 33 | 34 | for idx_seg, (sigma, sigma_orth, elmnt_nr, group) in enumerate( 35 | zip( 36 | cosmo_struct.seg_sigma, 37 | cosmo_struct.seg_sigma_orth, 38 | cosmo_struct.seg_elmnt_nr, 39 | cosmo_struct.seg_group, 40 | ) 41 | ): 42 | 43 | if sigma < 0 and elmnt_nr in self.par.hb_don_elmnt_nr_arr: 44 | hbd_sw = True 45 | else: 46 | hbd_sw = False 47 | 48 | if sigma >= 0 and elmnt_nr in self.par.hb_acc_elmnt_nr_arr: 49 | hba_sw = True 50 | else: 51 | hba_sw = False 52 | 53 | segment = { 54 | "sigma": sigma, 55 | "sigma_orth": sigma_orth, 56 | "elmnt_nr": elmnt_nr, 57 | "hbd_sw": hbd_sw, 58 | "hba_sw": hba_sw, 59 | "group": group, 60 | "mol_charge": round(-cosmo_struct.screen_charge), 61 | } 62 | 63 | segtp_lst_new, segtp_frac_lst = cluster_segment( 64 | segment, sigma_grid, sigma_orth_grid, self.par.descriptor_lst 65 | ) 66 | 67 | seg_segtp_assignment = {} 68 | 69 | for segtp, segtp_frac in zip(segtp_lst_new, segtp_frac_lst): 70 | try: 71 | idx_segtp = self.segtp_lst.index(segtp) 72 | except Exception: 73 | idx_segtp = len(self.segtp_lst) 74 | self.segtp_lst.append(segtp) 75 | 76 | seg_segtp_assignment[idx_segtp] = segtp_frac 77 | 78 | seg_segtp_assignment_lst.append(seg_segtp_assignment) 79 | 80 | cosmo_struct.associate_segtps(seg_segtp_assignment_lst) 81 | 82 | def get_segtps_as_array_dct(self): 83 | 84 | segtp_arr_dct = {} 85 | descriptors = self.segtp_lst[0].keys() 86 | for descriptor in descriptors: 87 | segtp_arr_dct[descriptor] = np.array( 88 | [segtp[descriptor] for segtp in self.segtp_lst] 89 | ) 90 | 91 | return segtp_arr_dct 92 | 93 | 94 | def cluster_segment(segment, sigma_grid, sigma_orth_grid, descriptor_lst): 95 | """ 96 | 97 | segment = { 98 | 'sigma': 0.003, 99 | 'sigma_orth': 0.004, 100 | 'elmnt_nr': 0.002, 101 | 'group': None, 102 | 'mol_charge': 0} 103 | """ 104 | 105 | handled_descriptors = ["sigma", "sigma_orth", "elmnt_nr", "group", "mol_charge"] 106 | 107 | unhandled_descriptors = list(set(descriptor_lst) - set(handled_descriptors)) 108 | 109 | if unhandled_descriptors: 110 | raise ValueError("Unhandled descriptors encountered") 111 | 112 | if "sigma" not in descriptor_lst: 113 | raise ValueError("Sigma must be included as descriptor") 114 | 115 | segtp_frac_lst = [1.0] 116 | segtp_lst = [segment] 117 | 118 | if "sigma" in descriptor_lst: 119 | segtp_lst, segtp_frac_lst = _cluster_float_var( 120 | "sigma", sigma_grid, segtp_lst, segtp_frac_lst 121 | ) 122 | 123 | if "sigma_orth" in descriptor_lst: 124 | segtp_lst, segtp_frac_lst = _cluster_float_var( 125 | "sigma_orth", sigma_orth_grid, segtp_lst, segtp_frac_lst 126 | ) 127 | 128 | # Delete unused descriptors 129 | unused_descriptors = list(set(descriptor_lst) - set(handled_descriptors)) 130 | for descriptor in unused_descriptors: 131 | for segtp in segtp_lst: 132 | del segtp[descriptor] 133 | 134 | return segtp_lst, segtp_frac_lst 135 | 136 | 137 | def _cluster_float_var(var_name, var_grid, segtp_lst, segtp_frac_lst): 138 | 139 | if var_name not in segtp_lst[0]: 140 | raise ValueError("Cannot cluster unknown variable {:s}".format(var_name)) 141 | 142 | gridstep = np.abs(var_grid[1] - var_grid[0]) 143 | 144 | segtp_lst_new = [] 145 | segtp_frac_lst_new = [] 146 | 147 | for segtp_frac, segtp in zip(segtp_frac_lst, segtp_lst): 148 | 149 | val = segtp[var_name] 150 | idx_right = np.searchsorted(var_grid, val, side="left") 151 | idx_left = idx_right - 1 152 | val_right = var_grid[idx_right] 153 | val_left = var_grid[idx_left] 154 | 155 | if idx_left < 0 or idx_right > len(var_grid) - 1: 156 | raise ValueError("Encountered {} outside of bins".format(var_name)) 157 | 158 | frac_left = (val_right - val) / gridstep 159 | segtp_frac_lst_new.append(segtp_frac * frac_left) 160 | segtp_lst_new.append(segtp.copy()) 161 | segtp_lst_new[-1][var_name] = val_left 162 | 163 | segtp_frac_lst_new.append(segtp_frac * (1 - frac_left)) 164 | segtp_lst_new.append(segtp.copy()) 165 | segtp_lst_new[-1][var_name] = val_right 166 | 167 | return segtp_lst_new, segtp_frac_lst_new 168 | 169 | 170 | if __name__ == "__main__": 171 | 172 | pass 173 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane/slurm-84643.out: -------------------------------------------------------------------------------- 1 | 2 | 3 | ********************************************************************** 4 | 5 | Available user defined functions: 6 | space # ouput the space of the subfolders 7 | mc # my connections shows the amount of connections to this login node 8 | csf # count subfolder files 9 | 10 | sq # show queue for current user 11 | ji ID # shows the job information on the job with ID 12 | 13 | ut # returns the usertemp path for the current user 14 | jut ID # cd into local usertemp of job ID on the calculating node 15 | 16 | ********************************************************************** 17 | 18 | 19 | Start time: 20 | Fri Apr 22 23:46:42 CEST 2022 21 | starting: C2H2Cl4_001_1112tetrachloroethane_CnfS1 22 | - settings were not given, using default 23 | - settings used: {'rdkconfgen_n_conf_generated': 50, 'rdkconfgen_rms_threshhold': 1.0} 24 | - init, n_confs: 1 25 | - rdkconfgen, n_confs: 6 26 | - orca_xtb2_alpb, n_confs: 6 27 | - sort_energy, n_confs: 6 28 | - filter_by_energy_window, n_confs: 6 29 | - filter_by_rms_window, n_confs: 6 30 | - orca_dft_cosmo_fast, n_confs: 6 31 | - filter, n_confs: 1 32 | - orca_dft_cosmo_final, n_confs: 1 33 | - final, n_confs: 1 34 | finished: C2H2Cl4_001_1112tetrachloroethane_CnfS1 35 | 36 | La fin 37 | 38 | End time: 39 | Fri Apr 22 23:56:59 CEST 2022 40 | 41 | SLURM_MEM_PER_CPU=2000 42 | SLURM_NODEID=0 43 | SLURM_TASK_PID=1817057 44 | SLURM_PRIO_PROCESS=0 45 | SLURM_SUBMIT_DIR=/work/vt2/csm1279/20220422_23_44_31/C2H2Cl4_001_1112tetrachloroethane_CnfS1 46 | SLURM_CPUS_PER_TASK=1 47 | SLURM_PROCID=0 48 | SLURM_JOB_GID=5900 49 | SLURMD_NODENAME=g192 50 | SLURM_TASKS_PER_NODE=2 51 | SLURM_NNODES=1 52 | SLURM_JOB_NODELIST=g192 53 | SLURM_CLUSTER_NAME=stuhh21 54 | SLURM_NODELIST=g192 55 | SLURM_NTASKS=2 56 | SLURM_JOB_CPUS_PER_NODE=2 57 | SLURM_TOPOLOGY_ADDR=g192 58 | SLURM_WORKING_CLUSTER=stuhh21:10.0.10.30:6817:9472:109 59 | SLURM_JOB_NAME=run_orca 60 | SLURM_JOBID=84643 61 | SLURM_CONF=/var/spool/slurm/conf-cache/slurm.conf 62 | SLURM_NODE_ALIASES=(null) 63 | SLURM_JOB_QOS=normal 64 | SLURM_TOPOLOGY_ADDR_PATTERN=node 65 | SLURM_CPUS_ON_NODE=2 66 | SLURM_JOB_NUM_NODES=1 67 | SLURM_JOB_UID=5930 68 | SLURM_JOB_PARTITION=mpp 69 | SLURM_JOB_USER=csm1279 70 | SLURM_NPROCS=2 71 | SLURM_SUBMIT_HOST=hummel 72 | SLURM_JOB_ACCOUNT=vt2 73 | SLURM_GTIDS=0 74 | SLURM_JOB_ID=84643 75 | SLURM_LOCALID=0 76 | 77 | JobId=84643 JobName=run_orca 78 | UserId=csm1279(5930) GroupId=vt2(5900) MCS_label=N/A 79 | Priority=2269 Nice=0 Account=vt2 QOS=normal 80 | JobState=RUNNING Reason=None Dependency=(null) 81 | Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0 82 | RunTime=00:10:18 TimeLimit=3-00:00:00 TimeMin=N/A 83 | SubmitTime=2022-04-22T23:46:15 EligibleTime=2022-04-22T23:46:15 84 | AccrueTime=2022-04-22T23:46:15 85 | StartTime=2022-04-22T23:46:41 EndTime=2022-04-25T23:46:41 Deadline=N/A 86 | SuspendTime=None SecsPreSuspend=0 LastSchedEval=2022-04-22T23:46:41 Scheduler=Backfill 87 | Partition=mpp AllocNode:Sid=hummel:1255877 88 | ReqNodeList=(null) ExcNodeList=(null) 89 | NodeList=g192 90 | BatchHost=g192 91 | NumNodes=1 NumCPUs=2 NumTasks=2 CPUs/Task=1 ReqB:S:C:T=0:0:*:* 92 | TRES=cpu=2,mem=4000M,node=1,billing=2 93 | Socks/Node=* NtasksPerN:B:S:C=0:0:*:* CoreSpec=* 94 | MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0 95 | Features=(null) DelayBoot=00:00:00 96 | OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null) 97 | Command=/work/vt2/csm1279/20220422_23_44_31/C2H2Cl4_001_1112tetrachloroethane_CnfS1/run_orca.slurm 98 | WorkDir=/work/vt2/csm1279/20220422_23_44_31/C2H2Cl4_001_1112tetrachloroethane_CnfS1 99 | StdErr=/work/vt2/csm1279/20220422_23_44_31/C2H2Cl4_001_1112tetrachloroethane_CnfS1/slurm-84643.out 100 | StdIn=/dev/null 101 | StdOut=/work/vt2/csm1279/20220422_23_44_31/C2H2Cl4_001_1112tetrachloroethane_CnfS1/slurm-84643.out 102 | Power= 103 | MailUser=simon.mueller@tuhh.de MailType=FAIL 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/C2H5NO_002_Acetamide/slurm-84661.out: -------------------------------------------------------------------------------- 1 | 2 | 3 | ********************************************************************** 4 | 5 | Available user defined functions: 6 | space # ouput the space of the subfolders 7 | mc # my connections shows the amount of connections to this login node 8 | csf # count subfolder files 9 | 10 | sq # show queue for current user 11 | ji ID # shows the job information on the job with ID 12 | 13 | ut # returns the usertemp path for the current user 14 | jut ID # cd into local usertemp of job ID on the calculating node 15 | 16 | ********************************************************************** 17 | 18 | 19 | Start time: 20 | Fri Apr 22 23:47:42 CEST 2022 21 | starting: C2H5NO_002_Acetamide_CnfS1 22 | - settings were not given, using default 23 | - settings used: {'rdkconfgen_n_conf_generated': 50, 'rdkconfgen_rms_threshhold': 1.0} 24 | - init, n_confs: 1 25 | - rdkconfgen, n_confs: 3 26 | - orca_xtb2_alpb, n_confs: 3 27 | - sort_energy, n_confs: 3 28 | - filter_by_energy_window, n_confs: 3 29 | - filter_by_rms_window, n_confs: 2 30 | - orca_dft_cosmo_fast, n_confs: 2 31 | - filter, n_confs: 1 32 | - orca_dft_cosmo_final, n_confs: 1 33 | - final, n_confs: 1 34 | finished: C2H5NO_002_Acetamide_CnfS1 35 | 36 | La fin 37 | 38 | End time: 39 | Fri Apr 22 23:51:08 CEST 2022 40 | 41 | SLURM_MEM_PER_CPU=2000 42 | SLURM_NODEID=0 43 | SLURM_TASK_PID=2245056 44 | SLURM_PRIO_PROCESS=0 45 | SLURM_SUBMIT_DIR=/work/vt2/csm1279/20220422_23_44_31/C2H5NO_002_Acetamide_CnfS1 46 | SLURM_CPUS_PER_TASK=1 47 | SLURM_PROCID=0 48 | SLURM_JOB_GID=5900 49 | SLURMD_NODENAME=g207 50 | SLURM_TASKS_PER_NODE=2 51 | SLURM_NNODES=1 52 | SLURM_JOB_NODELIST=g207 53 | SLURM_CLUSTER_NAME=stuhh21 54 | SLURM_NODELIST=g207 55 | SLURM_NTASKS=2 56 | SLURM_JOB_CPUS_PER_NODE=2 57 | SLURM_TOPOLOGY_ADDR=g207 58 | SLURM_WORKING_CLUSTER=stuhh21:10.0.10.30:6817:9472:109 59 | SLURM_JOB_NAME=run_orca 60 | SLURM_JOBID=84661 61 | SLURM_CONF=/var/spool/slurm/conf-cache/slurm.conf 62 | SLURM_NODE_ALIASES=(null) 63 | SLURM_JOB_QOS=normal 64 | SLURM_TOPOLOGY_ADDR_PATTERN=node 65 | SLURM_CPUS_ON_NODE=2 66 | SLURM_JOB_NUM_NODES=1 67 | SLURM_JOB_UID=5930 68 | SLURM_JOB_PARTITION=mpp 69 | SLURM_JOB_USER=csm1279 70 | SLURM_NPROCS=2 71 | SLURM_SUBMIT_HOST=hummel 72 | SLURM_JOB_ACCOUNT=vt2 73 | SLURM_GTIDS=0 74 | SLURM_JOB_ID=84661 75 | SLURM_LOCALID=0 76 | 77 | JobId=84661 JobName=run_orca 78 | UserId=csm1279(5930) GroupId=vt2(5900) MCS_label=N/A 79 | Priority=2269 Nice=0 Account=vt2 QOS=normal 80 | JobState=RUNNING Reason=None Dependency=(null) 81 | Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0 82 | RunTime=00:03:28 TimeLimit=3-00:00:00 TimeMin=N/A 83 | SubmitTime=2022-04-22T23:47:29 EligibleTime=2022-04-22T23:47:29 84 | AccrueTime=2022-04-22T23:47:29 85 | StartTime=2022-04-22T23:47:41 EndTime=2022-04-25T23:47:41 Deadline=N/A 86 | SuspendTime=None SecsPreSuspend=0 LastSchedEval=2022-04-22T23:47:41 Scheduler=Backfill 87 | Partition=mpp AllocNode:Sid=hummel:1259409 88 | ReqNodeList=(null) ExcNodeList=(null) 89 | NodeList=g207 90 | BatchHost=g207 91 | NumNodes=1 NumCPUs=2 NumTasks=2 CPUs/Task=1 ReqB:S:C:T=0:0:*:* 92 | TRES=cpu=2,mem=4000M,node=1,billing=2 93 | Socks/Node=* NtasksPerN:B:S:C=0:0:*:* CoreSpec=* 94 | MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0 95 | Features=(null) DelayBoot=00:00:00 96 | OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null) 97 | Command=/work/vt2/csm1279/20220422_23_44_31/C2H5NO_002_Acetamide_CnfS1/run_orca.slurm 98 | WorkDir=/work/vt2/csm1279/20220422_23_44_31/C2H5NO_002_Acetamide_CnfS1 99 | StdErr=/work/vt2/csm1279/20220422_23_44_31/C2H5NO_002_Acetamide_CnfS1/slurm-84661.out 100 | StdIn=/dev/null 101 | StdOut=/work/vt2/csm1279/20220422_23_44_31/C2H5NO_002_Acetamide_CnfS1/slurm-84661.out 102 | Power= 103 | MailUser=simon.mueller@tuhh.de MailType=FAIL 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/CH4O_001_methanol/slurm-84631.out: -------------------------------------------------------------------------------- 1 | 2 | 3 | ********************************************************************** 4 | 5 | Available user defined functions: 6 | space # ouput the space of the subfolders 7 | mc # my connections shows the amount of connections to this login node 8 | csf # count subfolder files 9 | 10 | sq # show queue for current user 11 | ji ID # shows the job information on the job with ID 12 | 13 | ut # returns the usertemp path for the current user 14 | jut ID # cd into local usertemp of job ID on the calculating node 15 | 16 | ********************************************************************** 17 | 18 | 19 | Start time: 20 | Fri Apr 22 23:45:42 CEST 2022 21 | starting: CH4O_001_methanol 22 | - settings were not given, using default 23 | - settings used: {'rdkconfgen_n_conf_generated': 50, 'rdkconfgen_rms_threshhold': 1.0} 24 | - init, n_confs: 1 25 | - rdkconfgen, n_confs: 2 26 | - orca_xtb2_alpb, n_confs: 2 27 | - sort_energy, n_confs: 2 28 | - filter_by_energy_window, n_confs: 2 29 | - filter_by_rms_window, n_confs: 2 30 | - orca_dft_cosmo_fast, n_confs: 2 31 | - filter, n_confs: 1 32 | - orca_dft_cosmo_final, n_confs: 1 33 | - final, n_confs: 1 34 | finished: CH4O_001_methanol 35 | 36 | La fin 37 | 38 | End time: 39 | Fri Apr 22 23:47:00 CEST 2022 40 | 41 | SLURM_MEM_PER_CPU=2000 42 | SLURM_NODEID=0 43 | SLURM_TASK_PID=2145962 44 | SLURM_PRIO_PROCESS=0 45 | SLURM_SUBMIT_DIR=/work/vt2/csm1279/20220422_23_44_31/CH4O_001_methanol 46 | SLURM_CPUS_PER_TASK=1 47 | SLURM_PROCID=0 48 | SLURM_JOB_GID=5900 49 | SLURMD_NODENAME=g215 50 | SLURM_TASKS_PER_NODE=2 51 | SLURM_NNODES=1 52 | SLURM_JOB_NODELIST=g215 53 | SLURM_CLUSTER_NAME=stuhh21 54 | SLURM_NODELIST=g215 55 | SLURM_NTASKS=2 56 | SLURM_JOB_CPUS_PER_NODE=2 57 | SLURM_TOPOLOGY_ADDR=g215 58 | SLURM_WORKING_CLUSTER=stuhh21:10.0.10.30:6817:9472:109 59 | SLURM_JOB_NAME=run_orca 60 | SLURM_JOBID=84631 61 | SLURM_CONF=/var/spool/slurm/conf-cache/slurm.conf 62 | SLURM_NODE_ALIASES=(null) 63 | SLURM_JOB_QOS=normal 64 | SLURM_TOPOLOGY_ADDR_PATTERN=node 65 | SLURM_CPUS_ON_NODE=2 66 | SLURM_JOB_NUM_NODES=1 67 | SLURM_JOB_UID=5930 68 | SLURM_JOB_PARTITION=mpp 69 | SLURM_JOB_USER=csm1279 70 | SLURM_NPROCS=2 71 | SLURM_SUBMIT_HOST=hummel 72 | SLURM_JOB_ACCOUNT=vt2 73 | SLURM_GTIDS=0 74 | SLURM_JOB_ID=84631 75 | SLURM_LOCALID=0 76 | 77 | JobId=84631 JobName=run_orca 78 | UserId=csm1279(5930) GroupId=vt2(5900) MCS_label=N/A 79 | Priority=2269 Nice=0 Account=vt2 QOS=normal 80 | JobState=RUNNING Reason=None Dependency=(null) 81 | Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0 82 | RunTime=00:01:20 TimeLimit=3-00:00:00 TimeMin=N/A 83 | SubmitTime=2022-04-22T23:45:24 EligibleTime=2022-04-22T23:45:24 84 | AccrueTime=2022-04-22T23:45:24 85 | StartTime=2022-04-22T23:45:40 EndTime=2022-04-25T23:45:40 Deadline=N/A 86 | SuspendTime=None SecsPreSuspend=0 LastSchedEval=2022-04-22T23:45:40 Scheduler=Backfill 87 | Partition=mpp AllocNode:Sid=hummel:1253183 88 | ReqNodeList=(null) ExcNodeList=(null) 89 | NodeList=g215 90 | BatchHost=g215 91 | NumNodes=1 NumCPUs=2 NumTasks=2 CPUs/Task=1 ReqB:S:C:T=0:0:*:* 92 | TRES=cpu=2,mem=4000M,node=1,billing=2 93 | Socks/Node=* NtasksPerN:B:S:C=0:0:*:* CoreSpec=* 94 | MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0 95 | Features=(null) DelayBoot=00:00:00 96 | OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null) 97 | Command=/work/vt2/csm1279/20220422_23_44_31/CH4O_001_methanol/run_orca.slurm 98 | WorkDir=/work/vt2/csm1279/20220422_23_44_31/CH4O_001_methanol 99 | StdErr=/work/vt2/csm1279/20220422_23_44_31/CH4O_001_methanol/slurm-84631.out 100 | StdIn=/dev/null 101 | StdOut=/work/vt2/csm1279/20220422_23_44_31/CH4O_001_methanol/slurm-84631.out 102 | Power= 103 | MailUser=simon.mueller@tuhh.de MailType=FAIL 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/H2O/slurm-84634.out: -------------------------------------------------------------------------------- 1 | 2 | 3 | ********************************************************************** 4 | 5 | Available user defined functions: 6 | space # ouput the space of the subfolders 7 | mc # my connections shows the amount of connections to this login node 8 | csf # count subfolder files 9 | 10 | sq # show queue for current user 11 | ji ID # shows the job information on the job with ID 12 | 13 | ut # returns the usertemp path for the current user 14 | jut ID # cd into local usertemp of job ID on the calculating node 15 | 16 | ********************************************************************** 17 | 18 | 19 | Start time: 20 | Fri Apr 22 23:45:42 CEST 2022 21 | starting: H2O 22 | - settings were not given, using default 23 | - settings used: {'rdkconfgen_n_conf_generated': 50, 'rdkconfgen_rms_threshhold': 1.0} 24 | - init, n_confs: 1 25 | - rdkconfgen, n_confs: 1 26 | - orca_xtb2_alpb, n_confs: 1 27 | - sort_energy, n_confs: 1 28 | - filter_by_energy_window, n_confs: 1 29 | - filter_by_rms_window, n_confs: 1 30 | - orca_dft_cosmo_fast, n_confs: 1 31 | - filter, n_confs: 1 32 | - orca_dft_cosmo_final, n_confs: 1 33 | - final, n_confs: 1 34 | finished: H2O 35 | 36 | La fin 37 | 38 | End time: 39 | Fri Apr 22 23:46:15 CEST 2022 40 | 41 | SLURM_MEM_PER_CPU=2000 42 | SLURM_NODEID=0 43 | SLURM_TASK_PID=2145947 44 | SLURM_PRIO_PROCESS=0 45 | SLURM_SUBMIT_DIR=/work/vt2/csm1279/20220422_23_44_31/H2O 46 | SLURM_CPUS_PER_TASK=1 47 | SLURM_PROCID=0 48 | SLURM_JOB_GID=5900 49 | SLURMD_NODENAME=g215 50 | SLURM_TASKS_PER_NODE=2 51 | SLURM_NNODES=1 52 | SLURM_JOB_NODELIST=g215 53 | SLURM_CLUSTER_NAME=stuhh21 54 | SLURM_NODELIST=g215 55 | SLURM_NTASKS=2 56 | SLURM_JOB_CPUS_PER_NODE=2 57 | SLURM_TOPOLOGY_ADDR=g215 58 | SLURM_WORKING_CLUSTER=stuhh21:10.0.10.30:6817:9472:109 59 | SLURM_JOB_NAME=run_orca 60 | SLURM_JOBID=84634 61 | SLURM_CONF=/var/spool/slurm/conf-cache/slurm.conf 62 | SLURM_NODE_ALIASES=(null) 63 | SLURM_JOB_QOS=normal 64 | SLURM_TOPOLOGY_ADDR_PATTERN=node 65 | SLURM_CPUS_ON_NODE=2 66 | SLURM_JOB_NUM_NODES=1 67 | SLURM_JOB_UID=5930 68 | SLURM_JOB_PARTITION=mpp 69 | SLURM_JOB_USER=csm1279 70 | SLURM_NPROCS=2 71 | SLURM_SUBMIT_HOST=hummel 72 | SLURM_JOB_ACCOUNT=vt2 73 | SLURM_GTIDS=0 74 | SLURM_JOB_ID=84634 75 | SLURM_LOCALID=0 76 | 77 | JobId=84634 JobName=run_orca 78 | UserId=csm1279(5930) GroupId=vt2(5900) MCS_label=N/A 79 | Priority=2269 Nice=0 Account=vt2 QOS=normal 80 | JobState=RUNNING Reason=None Dependency=(null) 81 | Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0 82 | RunTime=00:00:35 TimeLimit=3-00:00:00 TimeMin=N/A 83 | SubmitTime=2022-04-22T23:45:37 EligibleTime=2022-04-22T23:45:37 84 | AccrueTime=2022-04-22T23:45:37 85 | StartTime=2022-04-22T23:45:40 EndTime=2022-04-25T23:45:40 Deadline=N/A 86 | SuspendTime=None SecsPreSuspend=0 LastSchedEval=2022-04-22T23:45:40 Scheduler=Backfill 87 | Partition=mpp AllocNode:Sid=hummel:1253697 88 | ReqNodeList=(null) ExcNodeList=(null) 89 | NodeList=g215 90 | BatchHost=g215 91 | NumNodes=1 NumCPUs=2 NumTasks=2 CPUs/Task=1 ReqB:S:C:T=0:0:*:* 92 | TRES=cpu=2,mem=4000M,node=1,billing=2 93 | Socks/Node=* NtasksPerN:B:S:C=0:0:*:* CoreSpec=* 94 | MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0 95 | Features=(null) DelayBoot=00:00:00 96 | OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null) 97 | Command=/work/vt2/csm1279/20220422_23_44_31/H2O/run_orca.slurm 98 | WorkDir=/work/vt2/csm1279/20220422_23_44_31/H2O 99 | StdErr=/work/vt2/csm1279/20220422_23_44_31/H2O/slurm-84634.out 100 | StdIn=/dev/null 101 | StdOut=/work/vt2/csm1279/20220422_23_44_31/H2O/slurm-84634.out 102 | Power= 103 | MailUser=simon.mueller@tuhh.de MailType=FAIL 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/OLD_C2H5NO_002_Acetamide/COSMO_TZVPD/C2H5NO_002_Acetamide_CnfS1_c000.orcacosmo: -------------------------------------------------------------------------------- 1 | C2H5NO_002_Acetamide_CnfS1_c000 : DFT_COSMO_BP86_def2-TZVP+def2-TZVPD_SP 2 | 3 | ################################################## 4 | #ENERGY 5 | FINAL SINGLE POINT ENERGY -209.330184975578 6 | 7 | ################################################## 8 | #XYZ_FILE 9 | 9 10 | Coordinates from ORCA-job geo_opt_tzvp 11 | C 0.93846723695699 0.53629940784266 0.23970186870957 12 | C -0.03233821669808 -0.60709298456012 0.02705351660875 13 | O 0.30894198651811 -1.79232073970675 0.19401622323115 14 | N -1.28618573804373 -0.26514912361535 -0.34862898563163 15 | H 1.81131213236063 0.38581050881389 -0.41020049412521 16 | H 0.50027263759610 1.52041227634894 0.03369885228601 17 | H 1.29192354167143 0.51040360055936 1.27974512732285 18 | H -1.55335250367932 0.70116181383410 -0.49910442228345 19 | H -1.97904007668212 -0.98952475951672 -0.51628268611805 20 | 21 | ################################################## 22 | #COSMO 23 | 9 # Number of atoms 24 | 320 # Number of surface points 25 | 0 # Surface type 26 | 0 # Epsilon function type 27 | 1 # Print level 28 | 0 # FEps X flag 29 | 30 | 0.000000000 # FEps X parameter 31 | 32 | 525.265322699 # Volume 33 | 350.488371687 # Area 34 | 35 | -0.023101220 # CPCM dielectric energy 36 | -0.068064525 # One-electron operator energy 37 | 38 | #-------------------------------------------- 39 | # CARTESIAN COORDINATES (A.U.) + RADII (A.U.) 40 | #-------------------------------------------- 41 | 1.773446064 1.013459007 0.452970886 3.779452268 42 | -0.061110373 -1.147239479 0.051123737 3.779452268 43 | 0.583815746 -3.386995342 0.366637527 3.250328950 44 | -2.430538802 -0.501059228 -0.658813305 3.458198825 45 | 3.422883873 0.729076201 -0.775166594 2.456643974 46 | 0.945378277 2.873162813 0.063681602 2.456643974 47 | 2.441381680 0.964523023 2.418367812 2.456643974 48 | -2.935410821 1.325003804 -0.943170670 2.456643974 49 | -3.739843753 -1.869930798 -0.975632884 2.456643974 50 | 51 | #------------------------------------------------------------ 52 | # SURFACE POINTS (A.U.) (Hint - charge NOT scaled by FEps) 53 | #------------------------------------------------------------ 54 | X Y Z area potential charge atom 55 | 1.404901373 2.952526870 3.676082748 0.292157061 0.023841026 -0.000191031 0 56 | 0.408286519 1.927041250 3.856787324 1.858118906 0.020893114 -0.000821777 0 57 | 0.324812058 0.259700395 3.861426096 1.519216716 0.013124020 -0.001750696 0 58 | 1.381698499 -0.943066838 3.662768373 0.140235389 -0.003225982 -0.000481376 0 59 | 4.991986303 1.013459007 2.434197317 0.186980519 0.009603150 -0.000187400 0 60 | 2.407054991 3.617239693 3.118139793 2.197021097 0.021480585 -0.000065951 0 61 | -0.296963233 2.517699411 3.234144306 2.991688302 0.022364159 0.000551091 0 62 | -0.405467396 0.558102079 3.507352272 0.210353084 0.014924837 -0.000429413 0 63 | 2.557647172 -1.600596433 3.067545847 1.285491067 -0.027231635 0.000043447 0 64 | 3.915396642 3.516423990 2.305394557 2.687844959 0.017037664 0.000108922 0 65 | 0.096934185 3.629822241 2.604298566 2.243766227 0.028833431 0.000137346 0 66 | -0.754616664 0.892031534 3.259822085 0.128549107 0.017628011 -0.000340381 0 67 | 4.889555757 -0.292050117 2.147009183 2.115217120 -0.005127019 0.000373667 0 68 | 4.869035281 2.313391641 2.188413766 2.267138792 0.013026661 -0.000188393 0 69 | 1.583745983 4.154716943 2.546000245 2.465805593 0.024025478 0.000639954 0 70 | -1.162879502 1.910620022 2.656911386 1.788001212 0.026301486 -0.000788896 0 71 | 3.928991708 -1.507411381 2.264902151 2.524237005 -0.027794636 0.001172789 0 72 | 3.650832851 4.236803744 1.061022692 2.991688302 0.018798236 0.000515407 0 73 | -0.937886258 3.302156472 1.754815884 0.397333603 0.044190261 -0.000521187 0 74 | 5.376180071 0.160162360 1.212215212 2.524237005 -0.000894599 0.000735149 0 75 | 5.391575896 1.852456223 1.152599097 2.722903806 0.009292261 0.000637482 0 76 | 2.544728422 4.639846631 1.186929853 1.530902998 0.027325381 -0.000586084 0 77 | -1.212045492 2.887083806 1.817019906 0.303843343 0.042336614 -0.000331087 0 78 | 3.976607759 -1.970358978 1.179034399 1.636079540 -0.044997840 0.002343078 0 79 | 5.091039473 2.769637753 0.012891777 1.986668013 0.016630554 -0.000509608 0 80 | 2.740288453 4.599051559 -0.249169617 0.046745130 0.030775798 -0.000135785 0 81 | 4.287159117 -1.775191710 0.018306286 2.138589685 -0.030317357 0.000963274 0 82 | 4.258884658 3.795028247 -0.155080921 2.991688302 0.017566677 0.000429747 0 83 | 5.040958390 -0.884326156 0.530650481 0.712863228 -0.009301126 -0.000112545 0 84 | 4.589992333 2.869120283 -1.252270383 0.035058847 0.023839892 -0.000160465 0 85 | 2.443865883 4.036425419 -1.714163346 1.285491067 0.029242870 -0.000357189 0 86 | 3.496208136 -1.730541349 -1.493002478 0.806353488 -0.019692888 -0.000548871 0 87 | 3.428826063 3.795028247 -1.498143940 2.991688302 0.021261676 0.000840294 0 88 | -0.080005675 2.795369660 -2.317186244 0.140235389 0.049068200 -0.000418369 0 89 | 3.558258573 2.914041245 -2.283174378 1.437412739 0.022428006 -0.000186392 0 90 | 1.113495242 3.199127977 -2.558934742 1.729569800 0.033966619 -0.000518623 0 91 | 2.908940766 -1.027982035 -2.518128187 0.175294236 0.002539401 -0.000552970 0 92 | 2.599800426 1.951956648 -3.113626946 2.115217120 0.020617905 -0.000108070 0 93 | 1.358416766 2.290787843 -3.079795901 2.991688302 0.024345757 0.000664917 0 94 | 0.643681320 1.332653272 -3.139522133 1.717883517 0.024535484 -0.000940768 0 95 | 1.707231574 0.230041816 -3.243802382 0.876471182 0.014719020 -0.000675116 0 96 | 2.455370157 0.131313220 -3.158269592 1.542589281 0.014796497 -0.001378454 0 97 | 1.097076825 -1.466017012 3.634591715 1.776314929 -0.019639217 0.000210046 1 98 | 0.005104117 -0.363822288 3.747897005 0.876471182 0.004983129 -0.001012899 1 99 | -1.152601169 -0.378126412 3.586851721 2.944943173 0.003561784 -0.001870332 1 100 | -1.156086183 -1.896767542 3.589978793 2.898198043 -0.019585260 0.000480665 1 101 | 0.277933160 -2.118093454 3.687983851 1.752942365 -0.034149961 0.001941498 1 102 | 2.139224845 -1.934464884 3.021487441 0.350588473 -0.041488114 0.001119291 1 103 | -1.937059061 0.272659619 3.008988257 1.998354296 0.007966732 0.000328765 1 104 | -2.193196529 -2.599019523 2.813514508 2.781335219 -0.025145729 0.002360634 1 105 | -1.611463216 1.294361844 2.484074310 0.502510145 0.023590576 -0.000541321 1 106 | -2.776989625 -1.967695424 2.548144237 0.619372969 -0.011581087 0.000304218 1 107 | 2.556227561 -2.050403909 2.623689693 0.035058847 -0.050051966 0.000366451 1 108 | -2.572360180 -0.952189662 2.868895805 0.151921672 -0.005699243 0.000306710 1 109 | -2.391975011 -3.415311150 1.976527690 0.420706168 -0.036033133 0.000893568 1 110 | -2.882960774 -3.116893410 1.613776339 0.035058847 -0.013736294 0.000035516 1 111 | -2.726898497 -3.623575421 1.073666365 0.642745534 -0.021289809 0.000749491 1 112 | -2.425126662 -3.983625436 -0.755474757 0.081803977 -0.012051816 -0.000136840 1 113 | 3.415396810 -2.236224013 -0.954992524 0.210353084 -0.045921499 0.000790633 1 114 | 2.466952355 -1.025812006 -2.755727462 0.128549107 0.001138436 -0.000355159 1 115 | -1.846628608 -3.781788107 -1.987340784 0.537568992 -0.019822900 0.000280139 1 116 | 0.710389979 -3.377714891 -2.900829190 0.011686282 -0.047785117 0.000229478 1 117 | 2.926539900 -1.945223419 -2.121760733 1.752942365 -0.024801140 0.001012597 1 118 | 2.117803086 -0.691882551 -3.003257649 0.210353084 0.006380612 -0.000504566 1 119 | -0.138205117 1.087806868 -2.995658774 0.280470778 0.028109685 -0.000476652 1 120 | -0.835010876 -3.422084299 -2.866138421 1.811373777 -0.030912468 0.002371057 1 121 | 1.970516257 -2.473406359 -2.846812440 2.232079944 -0.031663876 0.001950161 1 122 | 1.026820521 -0.441943669 -3.498978182 2.757962654 0.008710401 -0.002152667 1 123 | -0.091827178 0.075478351 -3.524946317 1.706197235 0.012168824 0.000196151 1 124 | -0.600167928 -1.246496736 -3.688371468 0.455765015 -0.002240286 0.000358059 1 125 | -0.354371626 -2.421797254 -3.494826031 2.676158677 -0.014916440 0.001093740 1 126 | 1.025450434 -1.936672114 -3.481643050 2.991688302 -0.012201737 -0.000551362 1 127 | 1.738849942 -3.386995342 3.404816964 2.212652668 -0.074621565 0.009164105 2 128 | 1.099125448 -2.683407474 3.497780818 0.907533321 -0.057495333 0.003415430 2 129 | -0.301184282 -3.107599265 3.481657763 1.011251415 -0.056289723 0.003503167 2 130 | -0.350626548 -4.065907409 3.404816964 2.212652668 -0.071232403 0.008030039 2 131 | 0.940740942 -4.485498141 3.404816964 2.212652668 -0.082298059 0.009168103 2 132 | 2.784699049 -3.386995342 2.758446669 2.212652668 -0.081852144 0.010647885 2 133 | -1.364740277 -3.236138378 2.963753214 0.025929523 -0.050254320 0.000346271 2 134 | -1.196736250 -4.680642090 2.758446669 2.212652668 -0.074573769 0.009095009 2 135 | 1.263926089 -5.480159750 2.758446669 2.212652668 -0.090513135 0.009138373 2 136 | 2.203110997 -2.163219431 2.905317045 0.008643174 -0.051833145 0.000166009 2 137 | -2.064777648 -4.086634874 2.115950492 1.875568863 -0.057816875 0.007367045 2 138 | 0.329483795 -6.159071816 2.044596277 2.212652668 -0.091259961 0.009074520 2 139 | 3.141624245 -4.485498141 2.044596277 2.212652668 -0.094583837 0.011489646 2 140 | 3.140004802 -2.540923886 2.187268980 1.382907918 -0.068722126 0.006793688 2 141 | -1.581379887 -3.321341607 2.789911294 0.060502221 -0.049757384 0.000557229 2 142 | -0.839811054 -5.779144889 2.044596277 2.212652668 -0.086873812 0.010127512 2 143 | 2.418960286 -5.480159750 2.044596277 2.212652668 -0.095264998 0.009827670 2 144 | -2.331503971 -4.727705122 0.884369623 2.108934575 -0.060250544 0.010008918 2 145 | 0.907000894 -6.578662549 0.889562081 2.212652668 -0.093537543 0.008806573 2 146 | 3.719141343 -4.065907409 0.889562081 2.212652668 -0.092696873 0.011755675 2 147 | 3.755150646 -2.884112728 0.871000802 1.789137119 -0.076990337 0.009320456 2 148 | -1.553661445 -5.779144889 0.889562081 2.212652668 -0.084106884 0.011583808 2 149 | 2.198368383 -6.159071816 0.889562081 2.212652668 -0.095083171 0.008957294 2 150 | 3.691246016 -2.635380788 -0.219528800 0.743313006 -0.065583544 0.004240970 2 151 | -1.030736892 -6.159071816 -0.156287026 2.212652668 -0.088351855 0.011601161 2 152 | 2.721292937 -5.779144889 -0.156287026 2.212652668 -0.094147430 0.009438372 2 153 | -2.448844988 -4.431845269 -0.158620305 1.140899032 -0.039251170 0.004812230 2 154 | 0.260630598 -6.578662549 -0.156287026 2.212652668 -0.092627370 0.009757841 2 155 | 3.519401937 -4.680642090 -0.156287026 2.212652668 -0.092773161 0.010922471 2 156 | 3.338015577 -2.963696239 -1.306634550 1.676775850 -0.064406318 0.006780789 2 157 | -1.251328794 -5.480159750 -1.311321223 2.212652668 -0.076275714 0.011338086 2 158 | 2.007442545 -5.779144889 -1.311321223 2.212652668 -0.089157820 0.008974356 2 159 | -1.920881805 -4.598973479 -1.313314096 1.892855212 -0.048852248 0.007881450 2 160 | 0.838147696 -6.159071816 -1.311321223 2.212652668 -0.089173171 0.009425959 2 161 | 3.298810035 -4.001730024 -1.311321223 2.212652668 -0.080683505 0.009712778 2 162 | 2.574679743 -2.974122555 -2.169232125 0.216079362 -0.055278085 0.001397147 2 163 | -1.337533917 -4.135902311 -2.145770104 0.345726979 -0.044990590 0.001934337 2 164 | -0.096294598 -5.480159750 -2.025171614 2.212652668 -0.079895133 0.010083638 2 165 | 2.364367741 -4.680642090 -2.025171614 2.212652668 -0.080206313 0.008961399 2 166 | 1.929507975 -3.209018483 -2.586678396 0.501304120 -0.054143464 0.001911444 2 167 | -0.589519689 -3.983285234 -2.605291242 0.613665388 -0.050831528 0.002326556 2 168 | 0.226890550 -4.485498141 -2.671541909 2.212652668 -0.066165176 0.008423126 2 169 | 1.518258040 -4.065907409 -2.671541909 2.212652668 -0.066512953 0.007919182 2 170 | -2.526233025 0.867018332 2.515827701 1.027325020 0.012360039 0.001387805 3 171 | -3.428243532 0.223815688 2.572019520 2.494932191 0.003290377 0.005350982 3 172 | -3.462535094 -1.236403286 2.558855398 2.387307665 -0.005169010 0.004320831 3 173 | -2.955166545 -2.312264036 2.240055783 0.058704287 -0.010672548 0.000063401 3 174 | -2.327958549 1.672852525 2.028699317 0.772939777 0.030228419 0.000090110 3 175 | -4.324963309 0.875320742 1.885960374 2.504716239 0.021041912 0.003300748 3 176 | -4.296773493 -1.854824270 1.918710197 2.387307665 0.009257970 0.001538806 3 177 | -2.996372460 -2.521572196 2.090095339 0.009784048 -0.010429249 0.000021300 3 178 | -3.972799253 1.769401440 1.444892988 1.291494311 0.043200611 -0.000923959 3 179 | -5.315768802 -1.033444394 1.171802165 2.123138374 0.031655439 -0.000647453 3 180 | -3.063600411 -3.330932549 1.225381245 0.772939777 -0.005613835 -0.000969674 3 181 | -2.838384701 2.048001509 1.642292993 0.714235490 0.043353784 -0.000616208 3 182 | -5.319166447 0.152989880 1.126456760 2.504716239 0.031883244 0.001140605 3 183 | -3.690273805 -2.867176352 1.526065775 1.066461211 0.007852475 -0.001020460 3 184 | -4.957856185 1.517170353 0.565341636 0.205465004 0.058441354 -0.000729192 3 185 | -5.800347555 -0.832674857 0.043724352 0.127192622 0.057334702 -0.000818133 3 186 | -2.732630780 -3.858947354 0.110905399 0.048920239 -0.007473123 -0.000330241 3 187 | -5.572006845 0.797499534 -0.023153967 2.220978852 0.056540601 -0.003784993 3 188 | -5.773839771 0.189089025 -1.211238085 2.436227904 0.065738722 -0.005848034 3 189 | -5.872913373 -0.602512133 -0.973302953 0.391361912 0.069682335 -0.001916577 3 190 | -2.305495579 -3.859972338 -1.471959067 0.127192622 -0.004599015 -0.000547584 3 191 | -1.856367055 1.777758474 -3.195830412 0.166328813 0.051261708 -0.000457445 3 192 | -5.142371582 0.580503421 -2.512276098 2.220978852 0.065577517 -0.005213220 3 193 | -1.564344454 -2.712641355 -3.172326974 0.176112861 -0.006636441 0.000148404 3 194 | -1.285620882 1.752833376 -3.018531551 0.577258821 0.045974770 -0.000880752 3 195 | -4.313983207 1.080901326 -3.089693206 0.293521434 0.063747300 -0.001110142 3 196 | -5.462495883 -0.668681014 -2.313587704 0.048920239 0.069701636 -0.000552898 3 197 | -2.126012074 -3.292929067 -2.676699672 1.350198598 0.001638354 -0.001249868 3 198 | -0.873380422 1.038345651 -3.335495862 1.301278358 0.025346312 0.000580746 3 199 | -3.090909188 1.379604339 -3.484791829 0.958836685 0.052751907 -0.001912439 3 200 | -4.769904679 -0.466554377 -3.205441630 2.397091713 0.051933257 -0.003749141 3 201 | -2.835435831 -2.598265672 -3.378541718 1.291494311 0.019003760 -0.000920640 3 202 | -1.348273451 -2.234904888 -3.448368835 0.264169291 -0.006441009 0.000354685 3 203 | -1.472761971 0.241467890 -3.897710669 2.416659809 0.011714629 0.004172070 3 204 | -2.810290609 0.667696657 -3.891294915 2.504716239 0.029860116 0.001996956 3 205 | -3.659441465 -0.501059228 -3.891294915 2.504716239 0.028993406 0.001233357 3 206 | -2.810290609 -1.669815113 -3.891294915 2.504716239 0.013251515 0.002168067 3 207 | -1.518019417 -1.256195009 -3.907846613 2.289467187 -0.001131463 0.004141606 3 208 | 5.569718218 0.729076201 0.419070364 0.019749817 0.011274272 -0.000127336 4 209 | 5.333620403 2.164974776 -0.207380708 0.014812363 0.020311311 -0.000109323 4 210 | 5.505461451 -0.117944994 0.215048203 0.612244337 0.005833066 -0.000878482 4 211 | 5.572662799 1.495617051 0.133659744 0.296247260 0.016717579 -0.000557229 4 212 | 5.172453721 -0.803290720 0.016007586 0.212310536 -0.001778379 -0.000459542 4 213 | 5.241239861 2.336139237 -0.393028512 0.044437089 0.021384026 -0.000201142 4 214 | 4.106204854 -1.614800506 -1.047955956 0.049374543 -0.015185386 -0.000169680 4 215 | 5.792606709 0.215944988 -0.379932920 1.263988308 0.013043584 -0.001927002 4 216 | 5.792606709 1.242207414 -0.379932920 1.263988308 0.018585185 -0.001918056 4 217 | 4.775543484 -1.308439766 -0.542916128 0.780117784 -0.007890665 -0.001080719 4 218 | 5.641640878 1.706832464 -1.170400268 1.263988308 0.023528711 -0.002211365 4 219 | 5.038418959 -1.078943805 -1.170400268 1.263988308 0.002117563 -0.001916735 4 220 | 5.115564599 2.463442404 -1.177541360 1.066490135 0.024208446 -0.001738730 4 221 | 3.932060342 -1.619329795 -1.285880030 0.064186906 -0.014399488 -0.000180500 4 222 | 5.641640878 -0.248680062 -1.170400268 1.263988308 0.013651656 -0.002406881 4 223 | 5.474914441 1.193701251 -2.043391231 1.263988308 0.025052543 -0.002683097 4 224 | 3.860293220 2.493033696 -2.428111432 0.212310536 0.025565323 -0.000420323 4 225 | 4.498880873 -1.078943805 -2.043391231 1.263988308 0.004885006 -0.002084729 4 226 | 4.523602102 2.481876889 -2.098499033 1.125739587 0.025919773 -0.001734216 4 227 | 3.746119105 -1.329231360 -2.076699760 0.972678502 -0.002668123 -0.001550002 4 228 | 5.474914441 0.264451151 -2.043391231 1.263988308 0.020892373 -0.002789656 4 229 | 4.768649916 1.706832464 -2.582929317 1.263988308 0.026444618 -0.002306427 4 230 | 3.592127400 2.211163704 -2.727056160 0.113561450 0.025302487 -0.000308857 4 231 | 3.290104013 -0.825100361 -2.673061306 0.483870524 0.007314951 -0.001075847 4 232 | 4.768649916 -0.248680062 -2.582929317 1.263988308 0.017322139 -0.002626971 4 233 | 4.129148398 1.242207414 -3.071465006 1.263988308 0.024813027 -0.002114781 4 234 | 3.387858458 1.516192884 -3.102035770 0.785055238 0.024123535 -0.001215807 4 235 | 3.029648931 0.701004846 -3.199971307 0.256747625 0.020868309 -0.000606823 4 236 | 3.297942068 -0.089547434 -3.088031593 1.002303228 0.016100595 -0.001640407 4 237 | 4.129148398 0.215944988 -3.071465006 1.263988308 0.020160835 -0.002309068 4 238 | 0.578439977 4.246664178 2.067166041 0.014812363 0.035754849 -0.000088757 5 239 | 0.413372399 4.161726087 2.086470284 0.029624726 0.036293158 -0.000138314 5 240 | 1.258886892 4.655212328 1.725340860 0.567807248 0.035132537 -0.000825322 5 241 | -0.376615742 4.040366832 1.773964095 0.824554873 0.043256499 -0.001223614 5 242 | 1.952364198 4.801345008 1.205256125 0.212310536 0.033845965 -0.000428481 5 243 | -0.130618722 4.681182819 1.331906238 1.263988308 0.046317260 -0.001978467 5 244 | 0.753150640 4.968336892 1.331906238 1.263988308 0.041147785 -0.001850750 5 245 | -1.049829723 3.651282788 1.267331865 0.518432704 0.053535467 -0.001135519 5 246 | 2.062574603 5.029003274 0.436942761 1.051677772 0.036229562 -0.001522809 5 247 | -0.670156809 4.681182819 0.458915276 1.263988308 0.056405296 -0.002439251 5 248 | 1.189646122 5.285469422 0.458915276 1.263988308 0.042728922 -0.002149657 5 249 | -1.216914458 3.974028967 0.447977652 1.022053046 0.064653452 -0.002322677 5 250 | 0.701110433 5.285469422 -0.331552072 1.263988308 0.048326239 -0.002563425 5 251 | -1.260745700 3.864473724 -0.366921801 0.320934531 0.074462892 -0.001292940 5 252 | 2.340325588 4.844797032 -0.385629118 0.676431243 0.035257001 -0.001118996 5 253 | -0.274923135 4.968336892 -0.331552072 1.263988308 0.056163251 -0.002738194 5 254 | 1.137605914 4.968336892 -1.204543035 1.263988308 0.045096353 -0.002192325 5 255 | -0.911327053 3.849440848 -1.214843380 0.918366505 0.070384526 -0.002587425 5 256 | 1.979660784 4.703736253 -1.206893148 1.180051584 0.037676841 -0.001577584 5 257 | -0.441649572 4.455205679 -1.204543035 1.263988308 0.060188310 -0.002465035 5 258 | 1.903947286 4.177276864 -1.784434091 0.301184714 0.035836943 -0.000455585 5 259 | 0.431341390 4.455205679 -1.744081121 1.263988308 0.049919450 -0.002134571 5 260 | -0.488380230 3.411962911 -1.857029364 0.217247990 0.062136083 -0.000725877 5 261 | 1.464342250 3.907809797 -2.103178253 0.241935262 0.037802162 -0.000435098 5 262 | 0.640812447 3.793524570 -2.193589650 1.061552680 0.045053158 -0.001440189 5 263 | -0.058262004 3.320187942 -2.133583593 0.360434166 0.053176240 -0.000845015 5 264 | 3.314372642 0.964523023 4.714666223 1.263988308 0.022908584 -0.002807230 6 265 | 2.711150723 1.794786766 4.714666223 1.263988308 0.026353330 -0.002589489 6 266 | 1.735117155 1.477654236 4.714666223 1.263988308 0.024457110 -0.002228949 6 267 | 1.735117155 0.451391810 4.714666223 1.263988308 0.018585590 -0.002285619 6 268 | 2.711150723 0.134259279 4.714666223 1.263988308 0.016815049 -0.002630315 6 269 | 4.104839991 0.964523023 4.226130535 1.263988308 0.020650742 -0.002566558 6 270 | 2.955418567 2.546565889 4.226130535 1.263988308 0.026734550 -0.002128813 6 271 | 1.169204503 1.900276339 4.300130437 1.041802863 0.024559654 -0.001487796 6 272 | 1.155663881 0.021704002 4.287357285 1.086239952 0.013327529 -0.001867589 6 273 | 2.955418567 -0.617519843 4.226130535 1.263988308 0.006196949 -0.002152604 6 274 | 3.828409530 2.546565889 3.686592448 1.263988308 0.024550881 -0.002001114 6 275 | 1.594787566 2.618780849 4.025168691 0.419683618 0.025901685 -0.000758620 6 276 | 0.729648793 0.720587041 4.163522641 0.177748356 0.018930177 -0.000453982 6 277 | 2.335683038 -1.051856095 3.817704321 0.938116322 -0.004452585 -0.001458686 6 278 | 4.374609034 0.134259279 3.686592448 1.263988308 0.011689517 -0.002046159 6 279 | 4.374609034 1.794786766 3.686592448 1.263988308 0.021832457 -0.002117780 6 280 | 2.351835211 2.955985564 3.854041170 0.834429781 0.026171272 -0.001241137 6 281 | 0.729648793 1.208459005 4.163522641 0.177748356 0.021597410 -0.000482053 6 282 | 1.564536583 -0.707394644 3.990288169 0.493745433 0.002828263 -0.001099977 6 283 | 3.828409530 -0.617519843 3.686592448 1.263988308 0.003344394 -0.001884001 6 284 | 3.733022375 2.914760025 3.168927314 0.370309075 0.023626417 -0.000715061 6 285 | 2.960278588 -1.261000348 3.319972681 0.133311267 -0.012261515 -0.000349011 6 286 | 4.766149102 0.397519790 2.974302503 0.918366505 0.009520475 -0.001280785 6 287 | 4.765411229 1.515825723 2.992868989 0.868991962 0.016930472 -0.001303199 6 288 | 3.005754382 3.152169280 3.383140803 0.064186906 0.025109901 -0.000259127 6 289 | 3.740851496 -0.997557120 3.123150987 0.498682887 -0.007016802 -0.000790468 6 290 | 4.449109243 2.329953487 2.792171631 0.014812363 0.020010656 -0.000114938 6 291 | 4.368916982 -0.515864093 2.776363985 0.019749817 -0.001303209 -0.000109152 6 292 | 4.381847747 2.414332041 2.827934495 0.004937454 0.020506906 -0.000058001 6 293 | 4.471305506 -0.377079921 2.756909411 0.029624726 0.000409736 -0.000138486 6 294 | -2.995962742 2.501231980 1.212732936 0.315997077 0.061533029 -0.001398613 7 295 | -3.577722872 2.323502395 1.207535123 0.301184714 0.059018009 -0.001136648 7 296 | -2.683406279 3.004968785 0.831459146 0.691243606 0.072444979 -0.002800885 7 297 | -4.258252229 2.387837567 0.833223041 1.105989769 0.065261726 -0.003584372 7 298 | -2.186931538 3.379139692 0.177277512 0.009874909 0.083030597 -0.000289605 7 299 | -4.011407821 3.133023810 0.325053966 1.263988308 0.077328240 -0.004930406 7 300 | -3.127638458 3.420177883 0.325053966 1.263988308 0.079979249 -0.005146263 7 301 | -5.007622356 1.929015056 0.229948837 0.873929416 0.068672907 -0.003270650 7 302 | -2.038376345 3.600625668 -0.715192828 0.404871255 0.088243150 -0.002137114 7 303 | -4.550945908 3.133023810 -0.547936996 1.263988308 0.082742953 -0.005542503 7 304 | -2.691142977 3.737310413 -0.547936996 1.263988308 0.087012440 -0.005687291 7 305 | -5.154167827 2.302760067 -0.547936996 1.263988308 0.077826166 -0.004992101 7 306 | -3.179678666 3.737310413 -1.338404345 1.263988308 0.087759757 -0.005907620 7 307 | -5.305133657 1.838135017 -1.338404345 1.263988308 0.079289331 -0.005300352 7 308 | -1.836682223 3.462901404 -1.450407236 0.182685810 0.086378940 -0.001661943 7 309 | -4.155712233 3.420177883 -1.338404345 1.263988308 0.086493258 -0.005895803 7 310 | -5.323793273 1.261575580 -1.514752459 0.148123630 0.078710226 -0.001255579 7 311 | -2.743183184 3.420177883 -2.211395307 1.263988308 0.083631318 -0.005391671 7 312 | -4.868638176 2.155267547 -2.211395307 1.263988308 0.080209262 -0.004988008 7 313 | -1.940194357 3.166409376 -2.229199179 1.091177406 0.079757283 -0.004599856 7 314 | -4.322438671 2.907046670 -2.211395307 1.263988308 0.083444781 -0.005527756 7 315 | -5.115638934 1.222228355 -2.070620093 0.019749817 0.078090160 -0.000396467 7 316 | -1.791713826 2.455726619 -2.800190518 0.706055969 0.067174405 -0.002774359 7 317 | -3.449447709 2.907046670 -2.750933394 1.263988308 0.079491949 -0.005145831 7 318 | -4.626611685 1.558895730 -2.709589030 0.789992692 0.074649103 -0.003225001 7 319 | -2.348934214 2.111235520 -3.195499353 0.641869063 0.062372414 -0.002133217 7 320 | -3.212879522 2.178964655 -3.229841088 1.219551219 0.068698837 -0.003778308 7 321 | -3.878491242 1.662880368 -3.186279754 0.557932339 0.067985791 -0.002257136 7 322 | -5.189343403 -1.837588001 1.007547471 0.004937454 0.040909243 -0.000112435 8 323 | -4.614526282 -2.611985705 1.196781580 0.528307613 0.032118057 -0.001727358 8 324 | -3.989917107 -3.127944960 1.119591042 0.118498904 0.022663094 -0.000767589 8 325 | -5.256415854 -1.728300540 0.951813496 0.019749817 0.042276066 -0.000264401 8 326 | -5.085609796 -2.847687061 0.832129839 1.263988308 0.042503195 -0.004111924 8 327 | -3.497130321 -3.617321125 0.733991884 0.562869793 0.013424939 -0.002098171 8 328 | -5.791874320 -2.334555848 0.292591752 1.263988308 0.055212457 -0.004545727 8 329 | -3.932071390 -3.965104877 0.292591752 1.263988308 0.024980462 -0.004290820 8 330 | -5.830400840 -1.526007769 0.267905467 0.987490865 0.055978024 -0.003575320 8 331 | -4.815840753 -3.677950805 0.292591752 1.263988308 0.042353186 -0.004916973 8 332 | -2.901453077 -3.879885124 0.161153946 0.054311998 -0.001678275 -0.000450583 8 333 | -5.958600758 -2.847687061 -0.580399210 1.263988308 0.062366974 -0.005482153 8 334 | -3.495575909 -4.282237408 -0.580399210 1.263988308 0.019078216 -0.004325415 8 335 | -6.039277522 -1.088057127 -0.606339610 0.785055238 0.066126966 -0.003142405 8 336 | -5.355378839 -3.677950805 -0.580399210 1.263988308 0.055138641 -0.005616183 8 337 | -2.757716846 -4.097892087 -0.648960493 0.696181060 -0.001622971 -0.002411127 8 338 | -6.112696475 -1.370362273 -1.369461354 1.244238490 0.069517436 -0.004867592 8 339 | -4.960145165 -3.965104877 -1.370866559 1.263988308 0.053165517 -0.005677894 8 340 | -2.582600420 -3.985697271 -1.444055467 0.261685079 0.003409562 -0.001303022 8 341 | -6.109566588 -2.383062011 -1.370866559 1.263988308 0.067472988 -0.005470838 8 342 | -3.984111597 -4.282237408 -1.370866559 1.263988308 0.036197947 -0.005059068 8 343 | -5.695462879 -1.108584377 -2.252740976 1.076365043 0.069534139 -0.004745170 8 344 | -5.126871603 -3.451973664 -2.243857521 1.263988308 0.058695759 -0.005581826 8 345 | -2.813730168 -3.755920958 -2.248603568 0.908491596 0.018686039 -0.003046316 8 346 | -5.673071107 -2.700194542 -2.243857521 1.263988308 0.065301907 -0.005501423 8 347 | -3.547616116 -3.965104877 -2.243857521 1.263988308 0.033368696 -0.004407307 8 348 | -5.404504858 -1.873235004 -2.782285066 1.259050853 0.064090425 -0.004859186 8 349 | -4.253880640 -3.451973664 -2.783395608 1.263988308 0.047991414 -0.004814570 8 350 | -2.966207523 -3.192199428 -2.896099565 0.138248721 0.026571218 -0.000794266 8 351 | -4.653979988 -1.929407401 -3.255088322 1.086239952 0.054625211 -0.004069744 8 352 | -4.015526014 -2.716064548 -3.265426889 1.234363582 0.045006703 -0.004063913 8 353 | -3.269813967 -2.848975285 -3.179185359 0.261685079 0.032597519 -0.001030247 8 354 | -2.047381565 2.132743899 1.659744683 0.033918498 0.043998224 -0.000134393 3 355 | -2.224378579 2.429460697 1.415803930 0.329493979 0.052799778 -0.000996972 3 356 | -2.107344711 3.062781273 0.869423480 0.717133953 0.067341791 -0.002056058 7 357 | -1.756145822 3.381102772 0.526270299 0.305266480 0.070660134 -0.001077904 5 358 | -2.055151019 3.445877991 0.037004654 0.014536499 0.083159852 -0.000292506 7 359 | -1.596144260 3.576556515 -0.007104811 0.174437989 0.077194639 -0.000940678 5 360 | -1.582866903 3.594246877 -0.760044860 0.770434450 0.082550214 -0.003183392 7 361 | -2.001629514 3.497369211 -0.158775017 0.029072998 0.085006322 -0.000452184 7 362 | -1.190738452 3.234415370 -1.784906894 0.688060955 0.073224435 -0.002313010 7 363 | -1.243831776 2.795924004 -2.279390901 0.334339478 0.068248531 -0.001257196 7 364 | -0.815862933 2.045587669 -2.683946995 0.169592489 0.048899970 -0.000310309 3 365 | -1.109492072 2.295959986 -2.608716597 0.358566977 0.057653743 -0.001062876 3 366 | -1.594900881 1.723775549 2.108860756 0.057932236 0.032508003 -0.000219762 0 367 | -1.725611655 2.257652586 1.821999309 0.643047824 0.040695331 -0.000804191 0 368 | -1.513069596 3.114274235 1.205441174 0.666220718 0.055793462 -0.001228518 0 369 | -1.479060729 3.503911390 0.384796807 0.052139013 0.071784096 -0.000366589 5 370 | -1.409659311 3.580651844 0.140789170 0.005793224 0.075152689 -0.000116719 5 371 | -0.854601758 3.376383235 -1.561128832 0.046345789 0.071576911 -0.000383938 5 372 | -0.572117123 2.943676949 -2.139861564 0.544563022 0.058469712 -0.001133823 0 373 | -0.161923658 1.532218200 -2.807158090 0.092691578 0.034895173 -0.000271805 0 374 | -0.408613017 2.049537380 -2.686512306 0.735739402 0.042954907 -0.000913127 0 375 | 376 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/OLD_CH4O_001_methanol/COSMO_TZVPD/CH4O_001_methanol_c000.orcacosmo: -------------------------------------------------------------------------------- 1 | CH4O_001_methanol_c000 : DFT_COSMO_BP86_def2-TZVP+def2-TZVPD_SP 2 | 3 | ################################################## 4 | #ENERGY 5 | FINAL SINGLE POINT ENERGY -115.783784130182 6 | 7 | ################################################## 8 | #XYZ_FILE 9 | 6 10 | Coordinates from ORCA-job geo_opt_tzvp 11 | C -0.36687097665456 -0.00937331309947 0.00606401383346 12 | O 0.96577874294987 -0.08448184337891 0.53859917679980 13 | H -0.54375125621708 -0.77784646952065 -0.76502101373020 14 | H -0.58156325434079 0.98327183902320 -0.42395822285062 15 | H -1.05551168912395 -0.18545095602576 0.84224707313841 16 | H 1.58191743338652 0.07388174300161 -0.19793102719086 17 | 18 | ################################################## 19 | #COSMO 20 | 6 # Number of atoms 21 | 202 # Number of surface points 22 | 0 # Surface type 23 | 0 # Epsilon function type 24 | 1 # Print level 25 | 0 # FEps X flag 26 | 27 | 0.000000000 # FEps X parameter 28 | 29 | 327.555823685 # Volume 30 | 243.730059976 # Area 31 | 32 | -0.009425649 # CPCM dielectric energy 33 | -0.015305241 # One-electron operator energy 34 | 35 | #-------------------------------------------- 36 | # CARTESIAN COORDINATES (A.U.) + RADII (A.U.) 37 | #-------------------------------------------- 38 | -0.693285672 -0.017712995 0.011459325 3.779452268 39 | 1.825057330 -0.159647547 1.017804940 3.250328950 40 | -1.027540959 -1.469916802 -1.445680203 2.456643974 41 | -1.098995280 1.858114491 -0.801164933 2.456643974 42 | -1.994628024 -0.350451518 1.591616305 2.456643974 43 | 2.989390716 0.139616261 -0.374035435 2.456643974 44 | 45 | #------------------------------------------------------------ 46 | # SURFACE POINTS (A.U.) (Hint - charge NOT scaled by FEps) 47 | #------------------------------------------------------------ 48 | X Y Z area potential charge atom 49 | -0.193471007 -0.017712995 3.757716757 0.420706168 -0.025653234 0.000423291 0 50 | -0.499518529 1.260337106 3.562980363 2.372315333 -0.019899200 0.001050103 0 51 | -1.350097744 1.222769275 3.520598976 0.969961442 -0.004065018 -0.000693526 0 52 | -0.840441032 -0.180574406 3.784532464 0.070117695 -0.008737884 -0.000171108 0 53 | -0.479043847 -1.252428494 3.577106184 1.799687494 -0.017510472 -0.000470868 0 54 | -0.101687827 2.530568076 2.739193737 2.325570204 -0.022494969 0.002200303 0 55 | -2.541436872 1.952414234 2.654789666 1.250432220 0.004808988 -0.000337276 0 56 | -0.218029999 -2.593823797 2.735802297 1.893177754 -0.024423146 0.001271509 0 57 | 0.741671188 2.963450417 1.838430306 0.373961038 -0.027452432 0.001477984 0 58 | -2.350064823 2.760161814 1.966645720 2.980002020 0.001157454 0.001475072 0 59 | -4.376202301 -0.121507776 0.853843557 0.035058847 0.018664657 -0.000175820 0 60 | -0.987368723 -3.243974668 1.957997334 2.980002020 -0.010666608 0.001026957 0 61 | -0.979790513 3.199272539 1.974410801 2.956629455 -0.005260061 0.000859990 0 62 | -3.965090412 1.159879451 1.492279782 0.549255274 0.015542766 -0.000651886 0 63 | -2.177333808 -3.060682923 1.691398191 1.601020693 0.001067963 0.000180055 0 64 | 0.532943292 -3.122912239 1.783000921 0.081803977 -0.036488459 0.000663622 0 65 | 0.944499702 3.336278429 0.605311192 1.986668013 -0.006442339 0.001678494 0 66 | -3.275837202 2.660115976 0.677731829 2.454119310 0.009617794 0.000633178 0 67 | -4.140724225 -1.523761128 0.373738073 2.126903402 0.013441044 -0.000501953 0 68 | -0.317488989 -3.728953932 0.619511132 2.991688302 -0.010257390 0.001601446 0 69 | -0.141428319 3.589386669 0.995606123 1.449099021 0.000234925 -0.000038363 0 70 | -4.106757988 1.486527410 0.619511132 2.991688302 0.011766590 0.000223342 0 71 | -3.154077446 -2.835105146 0.550963504 2.769648936 0.005827579 0.001306509 0 72 | 0.790895958 -3.465975522 0.448437446 1.460785304 -0.024053231 0.002435428 0 73 | -4.339013111 0.771719641 -0.596592481 2.991688302 0.014550892 -0.000846022 0 74 | -2.707188997 -3.200741187 -0.299642545 1.869805189 0.008226123 0.000407551 0 75 | 1.365770985 -3.058444374 -0.882127718 1.180314526 -0.005386553 0.001235385 0 76 | 1.560645502 2.897817936 -0.827428686 1.612706975 0.019200042 -0.000827250 0 77 | -3.551905585 2.365016994 -0.648199253 0.070117695 0.018142704 -0.000157063 0 78 | -4.339013111 -0.807145630 -0.596592481 2.991688302 0.014076131 -0.000576772 0 79 | -0.997992220 -3.779312506 -0.192948308 1.519216716 0.003351377 -0.000199722 0 80 | 1.886858207 0.348240754 -2.725910737 0.292157061 0.055076268 -0.001568334 0 81 | -3.667481602 1.259615841 -1.939655500 2.991688302 0.017358521 -0.000878716 0 82 | -3.453177781 -2.315505405 -1.166422261 0.373961038 0.015260518 -0.000141285 0 83 | 1.261379621 -2.790581170 -1.654297295 1.589334411 0.012237982 -0.000635521 0 84 | 1.204412476 2.566268226 -1.990050663 1.811373777 0.031757252 -0.001692867 0 85 | -3.784156804 -1.233775377 -1.791861882 2.407374181 0.016746878 -0.000742517 0 86 | 0.309246444 -3.535220626 -0.940553732 0.105176542 0.005905374 -0.000128178 0 87 | 2.001587048 -0.783987574 -2.525220342 0.537568992 0.051753851 -0.002672176 0 88 | 1.371438343 1.484640044 -2.774955850 2.968315737 0.038402774 -0.003288592 0 89 | -2.254516540 1.602573343 -3.025231276 0.175294236 0.021635546 -0.000162779 0 90 | -3.277456702 0.052211693 -2.745609784 2.804707783 0.016942891 -0.000158826 0 91 | 1.534525979 -1.402824154 -2.709309273 2.430746746 0.034319548 -0.002073306 0 92 | 0.393275134 0.771719641 -3.521307462 2.991688302 0.025514951 0.000472592 0 93 | -1.120501455 1.221052801 -3.533566122 2.839766631 0.019404234 0.000899884 0 94 | -1.988165890 0.177948021 -3.533856095 2.419060463 0.017976719 0.000606490 0 95 | -0.838289330 -0.384215713 -3.747384798 0.257098213 0.023292243 -0.000098789 0 96 | 0.504471025 -0.527952290 -3.536680215 2.103530838 0.027912607 -0.000615633 0 97 | 2.980091526 -0.159647547 4.055984377 2.212652668 -0.066149182 0.009850995 1 98 | 2.181982526 0.938855252 4.055984377 2.212652668 -0.065061494 0.010130410 1 99 | 0.914102828 0.531384702 4.060381909 2.160793621 -0.052008200 0.007266599 1 100 | 0.906595098 -0.847447594 4.058856815 2.178079970 -0.051295203 0.006872142 1 101 | 2.181982526 -1.258150346 4.055984377 2.212652668 -0.065189483 0.009473366 1 102 | 4.025940634 -0.159647547 3.409614082 2.212652668 -0.055956580 0.008109088 1 103 | 2.505167674 1.933516860 3.409614082 2.212652668 -0.062543890 0.010918409 1 104 | 0.479207463 1.270107023 3.608003444 0.821101576 -0.043207974 0.002830097 1 105 | 0.420418252 -1.585914779 3.578544898 0.985321891 -0.041399727 0.002824437 1 106 | 2.505167674 -2.252811955 3.409614082 2.212652668 -0.065986031 0.010320046 1 107 | 3.660201870 1.933516860 2.695763690 2.212652668 -0.049983684 0.009065711 1 108 | 0.773001659 2.174312583 3.020415053 0.821101576 -0.044920698 0.003362681 1 109 | 1.570725380 -2.931724021 2.695763690 2.212652668 -0.058473714 0.009651637 1 110 | 4.382865830 -1.258150346 2.695763690 2.212652668 -0.047237886 0.006829479 1 111 | 4.382865830 0.938855252 2.695763690 2.212652668 -0.041560432 0.006391260 1 112 | 1.579080596 2.607186794 2.705632379 2.186723145 -0.051571263 0.009793404 1 113 | 0.669980720 -2.601623699 2.825341603 1.305119347 -0.045602857 0.004121821 1 114 | 3.660201870 -2.252811955 2.695763690 2.212652668 -0.058869452 0.009516695 1 115 | 3.439609967 2.612428927 1.540729494 2.212652668 -0.030978389 0.007259882 1 116 | 2.148242478 -3.351314754 1.540729494 2.212652668 -0.055053402 0.010574012 1 117 | 4.943298930 -0.870659182 1.597175346 2.074361877 -0.016245146 0.001709678 1 118 | 4.933725327 0.560955636 1.635504397 1.970643783 -0.009427826 0.000443492 1 119 | 2.162093775 3.030770662 1.539606021 2.186723145 -0.036955820 0.008681136 1 120 | 0.761554272 -3.170491225 1.624780954 0.008643174 -0.040402940 0.000174495 1 121 | 3.439609967 -2.931724021 1.540729494 2.212652668 -0.051310012 0.009907268 1 122 | 4.642107253 1.456596422 1.146736899 0.440801899 0.002066354 -0.000164373 1 123 | 1.895310426 3.057857728 0.562434109 1.063110462 -0.015030334 0.002710446 1 124 | 0.777343956 -3.199520688 1.493311260 0.025929523 -0.039452034 0.000387709 1 125 | 3.957445591 -2.559304181 0.508681547 2.178079970 -0.024335500 0.005567699 1 126 | 3.869479845 2.354227794 0.762059683 1.296476173 -0.001774717 0.000442407 1 127 | 1.650728263 -3.377482466 0.593793032 1.685419025 -0.039892595 0.006742805 1 128 | 4.700109494 -1.653745973 0.760155504 1.261903475 -0.006205626 0.000434882 1 129 | 2.306357421 2.755967598 -0.335774326 0.976678717 0.012451272 0.000172890 1 130 | 3.171896169 -2.623584657 -0.619167065 1.875568863 -0.006093827 0.002839197 1 131 | 2.994273244 2.694884996 -0.006507703 0.311154281 0.009797237 0.000140285 1 132 | 2.222737270 -2.923207601 -0.646293848 1.823709816 -0.015054038 0.004797217 1 133 | 2.133485530 -2.165191227 -1.521349423 0.129647617 0.017947561 -0.000145701 1 134 | 2.577895752 -2.003126109 -1.551136357 0.025929523 0.026678195 -0.000154014 1 135 | 2.241839520 -1.880915451 -1.707661570 0.103718094 0.029518633 -0.000480521 1 136 | 2.455035068 -1.913862597 -1.644993568 0.025929523 0.029766003 -0.000162307 1 137 | -1.467872691 -3.753664626 -0.654666008 0.232060353 0.010880051 -0.000286276 2 138 | -1.972938608 -3.601627614 -0.672937094 0.202435627 0.011960447 -0.000255552 2 139 | -3.153382268 -2.700952146 -1.424459302 0.385121438 0.017912299 -0.000485831 2 140 | -0.812675812 -3.893573275 -1.106826421 1.145489404 0.013111440 -0.001208201 2 141 | -2.610581731 -3.325121395 -1.150218790 1.036865409 0.015990436 -0.000906158 2 142 | 0.043399221 -3.675739268 -1.295566937 0.627056700 0.012142259 -0.000835860 2 143 | -3.278351636 -1.397287019 -2.427350119 0.034562180 0.022103553 -0.000162853 2 144 | -2.247842371 -3.565090881 -1.840913877 1.263988308 0.020364969 -0.001535337 2 145 | 0.518597186 -3.312781887 -1.944082378 1.036865409 0.017835163 -0.001300779 2 146 | -3.318267278 -2.143176015 -2.023948808 0.755430512 0.020778937 -0.000881891 2 147 | -1.271808803 -3.882223411 -1.840913877 1.263988308 0.019790535 -0.001683075 2 148 | 0.947118446 -2.689725181 -2.250594711 0.207373082 0.022524555 -0.000470392 2 149 | 0.583703280 -1.416877131 -3.299373384 0.029624726 0.031052837 -0.000144800 2 150 | -2.945018313 -1.031351827 -2.917427795 0.227122899 0.022859052 -0.000423964 2 151 | -2.414568809 -3.051959668 -2.713904839 1.263988308 0.024703390 -0.001886237 2 152 | 0.048456040 -3.277936808 -2.713904839 1.263988308 0.024444513 -0.001827285 2 153 | -2.960768313 -2.300180545 -2.713904839 1.263988308 0.023642694 -0.001524215 2 154 | -0.835313322 -3.565090881 -2.713904839 1.263988308 0.024899459 -0.002071643 2 155 | 0.847751521 -2.098934848 -2.902633882 0.607306882 0.029129413 -0.000936311 2 156 | 0.423463645 -1.261133398 -3.416998225 0.049374543 0.030518375 -0.000182365 2 157 | -2.690999270 -1.469916802 -3.253442926 1.263988308 0.024252502 -0.001467167 2 158 | -1.541577847 -3.051959668 -3.253442926 1.263988308 0.027293357 -0.002151979 2 159 | 0.318225084 -2.447673065 -3.253442926 1.263988308 0.028179177 -0.001649032 2 160 | -0.318734099 -1.134444353 -3.773801910 0.908491596 0.027770679 -0.000976646 2 161 | -1.380675569 -0.831566345 -3.791507191 0.789992692 0.024894797 -0.000811831 2 162 | -1.900531922 -1.469916802 -3.741978614 1.263988308 0.025949324 -0.001500344 2 163 | -1.297310003 -2.300180545 -3.741978614 1.263988308 0.028160119 -0.001946585 2 164 | -0.321276435 -1.983048015 -3.741978614 1.263988308 0.028728908 -0.001638272 2 165 | -0.575693659 3.787026717 0.627314206 0.217247990 0.009793064 -0.000381246 3 166 | -2.739710394 3.159160300 0.483526988 0.049374543 0.013747652 -0.000118111 3 167 | 0.005510853 3.768349520 0.278727631 0.256747625 0.010650754 -0.000457624 3 168 | -2.206861530 3.693073112 0.399109555 1.125739587 0.015043967 -0.001122088 3 169 | -1.277250909 3.985926260 0.413636129 1.160301767 0.014303760 -0.001309214 3 170 | -2.951540081 3.028712649 0.309185160 0.029624726 0.014727484 -0.000101279 3 171 | 0.093588778 3.970080682 -0.410727119 1.214613764 0.017713855 -0.001593518 3 172 | -2.714530367 3.666134497 -0.405931259 1.263988308 0.020063752 -0.001406924 3 173 | -0.854727436 4.270421100 -0.405931259 1.263988308 0.020212657 -0.001735019 3 174 | -3.253430105 2.990099036 -0.466319907 0.923303959 0.018862582 -0.000996754 3 175 | 0.867565545 3.140559631 -1.524402513 0.197498173 0.027413416 -0.000433352 3 176 | -1.343263124 4.270421100 -1.196398608 1.263988308 0.025162600 -0.002084149 3 177 | -3.394404669 2.576148291 -1.301787362 0.760367966 0.021495243 -0.001019170 3 178 | 0.498012426 3.676118826 -1.224870302 1.209676310 0.023744302 -0.001631984 3 179 | -2.319296692 3.953288570 -1.196398608 1.263988308 0.024545505 -0.001941323 3 180 | 0.757525395 2.880907411 -2.043068810 0.133311267 0.030578349 -0.000260632 3 181 | -0.906767643 3.953288570 -2.069389570 1.263988308 0.027958938 -0.002069846 3 182 | -3.030750110 2.691302430 -2.069715584 1.259050853 0.023886963 -0.001458435 3 183 | -0.022998281 3.666134497 -2.069389570 1.263988308 0.027962775 -0.001727087 3 184 | -2.486023130 3.440157357 -2.069389570 1.263988308 0.026139046 -0.001859519 3 185 | 0.209269722 2.928473893 -2.583823916 1.086239952 0.029557811 -0.001353762 3 186 | -1.613032168 3.440157357 -2.608927657 1.263988308 0.027840133 -0.001904414 3 187 | -2.737626736 2.122211903 -2.612307977 0.715930877 0.023513471 -0.000903487 3 188 | -0.491106795 2.483195949 -3.097867869 0.967741048 0.027492042 -0.001118717 3 189 | -1.368764324 2.688378234 -3.097463345 1.263988308 0.026555310 -0.001378106 3 190 | -1.949612520 2.093729659 -3.093769439 0.785055238 0.024144137 -0.000819735 3 191 | -1.235437051 -0.409822815 3.927254062 0.943053776 -0.002018220 -0.001400156 4 192 | -1.782224185 0.470910584 3.897120268 1.170176675 0.003800912 -0.001631750 4 193 | -2.700892548 0.162679695 3.887914717 1.263988308 0.012623667 -0.002089851 4 194 | -2.700892548 -0.863582731 3.887914717 1.263988308 0.013442655 -0.002289200 4 195 | -1.728474635 -1.180280055 3.888493879 1.259050853 0.004355742 -0.001860000 4 196 | -1.881092227 1.135005489 3.544979231 0.390058892 0.003597152 -0.000541257 4 197 | -3.340394067 0.627304745 3.399379029 1.263988308 0.015690206 -0.001984984 4 198 | -3.340394067 -1.328207781 3.399379029 1.263988308 0.017193388 -0.002359679 4 199 | -1.552932267 -1.912984080 3.435117449 1.066490135 0.001578603 -0.001603981 4 200 | -3.095980233 1.391330486 2.928896521 1.096114861 0.011879119 -0.001246069 4 201 | -4.046658591 -0.815076568 2.859840942 1.263988308 0.020219909 -0.002335887 4 202 | -2.219346279 -2.438654010 2.865983472 1.204738856 0.006957159 -0.001597955 4 203 | -2.366622402 1.462831771 3.206770635 0.340684349 0.006962193 -0.000519179 4 204 | -4.046658591 0.114173532 2.859840942 1.263988308 0.019562712 -0.002161623 4 205 | -3.070625023 -2.158471524 2.859840942 1.263988308 0.013772465 -0.001871723 4 206 | -3.702058239 1.314064011 2.182522160 0.651743971 0.014667617 -0.000784000 4 207 | -4.213385029 -1.328207781 1.986849980 1.263988308 0.019218534 -0.001871441 4 208 | -2.349803209 -2.711870630 2.168374470 0.138248721 0.006536123 -0.000300710 4 209 | -4.216884877 0.604350924 2.021763244 1.199801401 0.018414896 -0.001563826 4 210 | -3.610163110 -2.158471524 1.986849980 1.263988308 0.015186490 -0.001546180 4 211 | -4.408216233 0.066612687 1.402542189 0.755430512 0.019413140 -0.001293996 4 212 | -3.354042076 -2.394087269 1.488437008 0.464120707 0.012400754 -0.000550066 4 213 | -4.370515324 -0.898526378 1.291827879 1.056615226 0.019209107 -0.001583064 4 214 | -2.670489822 -2.692231755 1.898822699 0.039499635 0.008387491 -0.000136547 4 215 | -3.891674539 -1.812129802 1.044066554 0.014812363 0.015772466 -0.000086885 4 216 | -4.010923770 -1.612972656 0.978679558 0.044437089 0.016653071 -0.000169751 4 217 | 5.103843024 0.151375574 0.876585520 0.049374543 0.018313203 -0.000537267 5 218 | 4.623816620 1.725744826 0.546805350 0.434495981 0.020720980 -0.001494006 5 219 | 5.108068540 -0.657602170 0.580295046 0.469058161 0.020204213 -0.001847067 5 220 | 5.045467114 0.978084961 0.676973461 0.770242875 0.023607303 -0.002666064 5 221 | 4.831017899 -1.341422646 0.296809323 0.078999269 0.016306243 -0.000593591 5 222 | 4.239173295 2.226038941 -0.027649061 1.160301767 0.028701205 -0.003146675 5 223 | 3.699232040 -2.184617084 -0.733429746 0.014812363 0.014413447 -0.000144013 5 224 | 5.359113551 -0.373514952 0.021198240 1.263988308 0.035635670 -0.004655980 5 225 | 5.359113551 0.652747474 0.021198240 1.263988308 0.039345703 -0.004837848 5 226 | 3.470406517 2.546969296 -0.282521616 0.498682887 0.025751997 -0.001401426 5 227 | 4.424438433 -1.847853138 -0.213713720 0.449308344 0.016189128 -0.001116325 5 228 | 5.208147721 1.117372524 -0.769269109 1.263988308 0.051447910 -0.005545210 5 229 | 2.859915902 2.532206154 -0.916114295 0.913429050 0.036106476 -0.002727914 5 230 | 4.604925802 -1.668403746 -0.769269109 1.263988308 0.032255943 -0.003875397 5 231 | 4.604925802 1.947636267 -0.769269109 1.263988308 0.047055036 -0.004904593 5 232 | 2.181219001 2.298847590 -1.222373906 0.108623995 0.041278780 -0.000941093 5 233 | 3.512900999 -2.200022598 -0.909877396 0.039499635 0.016422784 -0.000281416 5 234 | 5.208147721 -0.838140002 -0.769269109 1.263988308 0.044590537 -0.005144163 5 235 | 5.041421283 0.604241310 -1.642260071 1.263988308 0.061146731 -0.006100866 5 236 | 3.181618353 2.234790340 -1.642260071 1.263988308 0.051919963 -0.004611161 5 237 | 4.065387715 -1.668403746 -1.642260071 1.263988308 0.042950012 -0.004390473 5 238 | 4.065387715 1.947636267 -1.642260071 1.263988308 0.056830313 -0.005430627 5 239 | 2.117399068 2.070077206 -1.618242298 0.098749087 0.049087162 -0.001037054 5 240 | 3.238487127 -1.938074068 -1.660990559 1.140551950 0.034365430 -0.003175427 5 241 | 5.041421283 -0.325008789 -1.642260071 1.263988308 0.058193396 -0.005918184 5 242 | 4.335156759 1.117372524 -2.181798158 1.263988308 0.064625725 -0.006077376 5 243 | 2.524793577 1.750097563 -2.170030727 1.165239221 0.057694958 -0.005481452 5 244 | 2.603531693 -1.452269923 -2.204912495 0.967741048 0.046154861 -0.003685525 5 245 | 4.335156759 -0.838140002 -2.181798158 1.263988308 0.058278988 -0.005645627 5 246 | 3.695655240 0.652747474 -2.670333846 1.263988308 0.066343627 -0.005956552 5 247 | 2.742871206 0.967451849 -2.673821509 1.229426127 0.063655542 -0.005817506 5 248 | 2.325826410 0.154773270 -2.739316030 0.730743240 0.061760635 -0.003929389 5 249 | 2.758001494 -0.686959092 -2.675845990 1.204738856 0.058306479 -0.004909485 5 250 | 3.695655240 -0.373514952 -2.670333846 1.263988308 0.063121851 -0.005717237 5 251 | 252 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/OLD_H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo: -------------------------------------------------------------------------------- 1 | H2O_c000 : DFT_COSMO_BP86_def2-TZVP+def2-TZVPD_SP 2 | 3 | ################################################## 4 | #ENERGY 5 | FINAL SINGLE POINT ENERGY -76.479119979357 6 | 7 | ################################################## 8 | #XYZ_FILE 9 | 3 10 | Coordinates from ORCA-job geo_opt_tzvp 11 | O 0.00100490900361 0.40166232427269 0.00000000000000 12 | H -0.76525033690098 -0.19892141728077 0.00000000000000 13 | H 0.76424642789738 -0.20274090699193 0.00000000000000 14 | 15 | ################################################## 16 | #COSMO 17 | 3 # Number of atoms 18 | 128 # Number of surface points 19 | 0 # Surface type 20 | 0 # Epsilon function type 21 | 1 # Print level 22 | 0 # FEps X flag 23 | 24 | 0.000000000 # FEps X parameter 25 | 26 | 172.882921522 # Volume 27 | 154.203684692 # Area 28 | 29 | -0.012583327 # CPCM dielectric energy 30 | -0.015495566 # One-electron operator energy 31 | 32 | #-------------------------------------------- 33 | # CARTESIAN COORDINATES (A.U.) + RADII (A.U.) 34 | #-------------------------------------------- 35 | 0.001899003 0.759031791 0.000000000 3.250328950 36 | -1.446113561 -0.375907001 0.000000000 2.456643974 37 | 1.444216448 -0.383124790 0.000000000 2.456643974 38 | 39 | #------------------------------------------------------------ 40 | # SURFACE POINTS (A.U.) (Hint - charge NOT scaled by FEps) 41 | #------------------------------------------------------------ 42 | X Y Z area potential charge atom 43 | 1.156933199 0.759031791 3.038179437 2.212652668 -0.033740218 0.008582700 0 44 | 0.358824199 1.857534590 3.038179437 2.212652668 -0.055945775 0.011256834 0 45 | -0.932543291 1.437943858 3.038179437 2.212652668 -0.047097635 0.010135040 0 46 | -0.932543291 0.080119725 3.038179437 2.212652668 -0.022372352 0.007426881 0 47 | 0.358824199 -0.339471008 3.038179437 2.212652668 -0.017695272 0.007157835 0 48 | 2.150576317 0.793085704 2.438578360 1.987930132 -0.011872090 0.002918856 0 49 | 0.682009346 2.852196199 2.391809141 2.212652668 -0.061824725 0.010590686 0 50 | -1.778652992 2.052678539 2.391809141 2.212652668 -0.042216175 0.007866384 0 51 | -1.573505159 -0.373010351 2.607914991 1.184114905 0.005014158 0.000461339 0 52 | 0.590015102 -1.258189584 2.479833798 1.780493944 0.013962548 0.001269926 0 53 | 1.837043543 2.852196199 1.677958750 2.212652668 -0.048386894 0.007775735 0 54 | -1.421727797 3.151181338 1.677958750 2.212652668 -0.055957514 0.008825759 0 55 | -2.326502943 0.538291529 2.257090251 0.354370154 0.002247527 0.000222232 0 56 | -0.157376280 -1.924979271 1.826295236 1.564414582 0.038395210 -0.001726265 0 57 | 1.805392776 -0.348706050 2.466772258 0.060502221 0.012345939 -0.000045086 0 58 | 2.553978279 1.868520100 1.679453883 2.186723145 -0.021233138 0.003659457 0 59 | -0.252432948 3.531108265 1.677958750 2.212652668 -0.065753030 0.010257119 0 60 | -2.641018014 1.444816113 1.763328611 1.901498387 -0.009735395 0.001461341 0 61 | -0.873062824 -1.344838495 2.317932247 0.242008886 0.023230177 0.000014302 0 62 | 1.625566825 -0.578261083 2.477900090 0.051859047 0.014604576 -0.000055794 0 63 | 1.616451640 3.531108265 0.522924554 2.212652668 -0.054809544 0.007749674 0 64 | -2.135578188 3.151181338 0.522924554 2.212652668 -0.044197451 0.006193213 0 65 | 0.021256960 -2.429870553 0.628621823 0.535876818 0.066102793 -0.002612970 0 66 | 3.039010276 1.744958223 0.607076990 1.279189824 -0.001260717 -0.000588407 0 67 | 0.325084151 3.950698998 0.522924554 2.212652668 -0.065906647 0.009444759 0 68 | -2.902498035 2.123933930 0.515905305 2.048432353 -0.013308402 0.001360846 0 69 | 2.909312631 2.117211595 -0.516654529 2.065718702 -0.013565789 0.001407670 0 70 | -0.321286145 3.950698998 -0.522924554 2.212652668 -0.065865758 0.009438701 0 71 | -3.033226590 1.751406182 -0.606501435 1.261903475 -0.000940181 -0.000629636 0 72 | 2.139376194 3.151181338 -0.522924554 2.212652668 -0.044485482 0.006237959 0 73 | -1.612653635 3.531108265 -0.522924554 2.212652668 -0.054599830 0.007718751 0 74 | -0.034126703 -2.427989873 -0.637364372 0.553163167 0.065992920 -0.002649499 0 75 | 2.644816020 1.444816113 -1.763328611 1.901498387 -0.010146213 0.001515061 0 76 | 0.256230953 3.531108265 -1.677958750 2.212652668 -0.065784272 0.010261469 0 77 | -2.550180274 1.868520100 -1.679453883 2.186723145 -0.020861605 0.003600378 0 78 | -1.621768820 -0.578261083 -2.477900090 0.051859047 0.014676206 -0.000056077 0 79 | 0.876860830 -1.344838495 -2.317932247 0.242008886 0.023305556 0.000003856 0 80 | 1.425525802 3.151181338 -1.677958750 2.212652668 -0.056134713 0.008850382 0 81 | -1.833245537 2.852196199 -1.677958750 2.212652668 -0.048153885 0.007744705 0 82 | -1.771683050 -0.371921847 -2.477900090 0.051859047 0.012193067 -0.000033850 0 83 | 0.155366431 -1.921466537 -1.831942889 1.538485058 0.038227952 -0.001691450 0 84 | 2.339580649 0.541656087 -2.247805732 0.363013328 0.002203113 0.000223227 0 85 | 1.782450998 2.052678539 -2.391809141 2.212652668 -0.042430037 0.007892779 0 86 | -0.678211341 2.852196199 -2.391809141 2.212652668 -0.061746647 0.010580522 0 87 | -2.146778311 0.793085704 -2.438578360 1.987930132 -0.011604083 0.002873292 0 88 | -0.587601643 -1.260212086 -2.477858236 1.789137119 0.014023129 0.001283474 0 89 | 1.577303164 -0.373010351 -2.607914991 1.184114905 0.004920875 0.000466703 0 90 | 0.936341297 1.437943858 -3.038179437 2.212652668 -0.047190496 0.010146172 0 91 | -0.355026193 1.857534590 -3.038179437 2.212652668 -0.055910139 0.011252805 0 92 | -1.153135193 0.759031791 -3.038179437 2.212652668 -0.033637434 0.008573232 0 93 | -0.355026193 -0.339471008 -3.038179437 2.212652668 -0.017682600 0.007157813 0 94 | 0.936341297 0.080119725 -3.038179437 2.212652668 -0.022433751 0.007431155 0 95 | -2.445518010 -0.102709247 2.227476902 0.498682887 0.022576635 -0.001362558 1 96 | -2.186507975 -0.913835031 2.279813405 1.184989038 0.034097663 -0.003036819 1 97 | -1.460929543 -1.393645714 2.235864042 0.562869793 0.034409747 -0.001491838 1 98 | -2.952498464 0.454893627 1.753760090 0.829492327 0.024359722 -0.002497443 1 99 | -2.791879604 -1.353663264 1.807762723 1.263988308 0.051730703 -0.004905435 1 100 | -1.073657614 -2.047343206 1.761441795 0.943053776 0.048074961 -0.002705615 1 101 | -3.077519382 1.043557268 1.165648254 0.069124361 0.018780865 -0.000585111 1 102 | -3.498144128 -0.840532051 1.268224637 1.263988308 0.054598014 -0.005580371 1 103 | -1.638341198 -2.471081080 1.268224637 1.263988308 0.059917325 -0.004593703 1 104 | -3.498144128 0.088718049 1.268224637 1.263988308 0.041695527 -0.004782874 1 105 | -2.522110560 -2.183927007 1.268224637 1.263988308 0.062094385 -0.005454873 1 106 | -0.516587003 -2.310295616 1.195500179 0.157998538 0.057833936 -0.001055560 1 107 | -3.304693286 1.194767638 0.337286523 0.528307613 0.022865329 -0.002114956 1 108 | -3.664870566 -1.353663264 0.395233674 1.263988308 0.063868808 -0.006217320 1 109 | -1.201845716 -2.788213610 0.395233674 1.263988308 0.065346780 -0.004571268 1 110 | -3.664870566 0.601849262 0.395233674 1.263988308 0.038419254 -0.004789515 1 111 | -3.061648647 -2.183927007 0.395233674 1.263988308 0.067823889 -0.006136582 1 112 | -0.460186409 -2.597880469 0.354797374 0.720868332 0.066730724 -0.002917671 1 113 | -3.815836396 0.137224212 -0.395233674 1.263988308 0.047145973 -0.005449032 1 114 | -2.666414973 -2.471081080 -0.395233674 1.263988308 0.068057348 -0.005943722 1 115 | -0.358450169 -2.533402528 -0.444185788 0.177748356 0.067120654 -0.001069248 1 116 | -3.245720292 1.234457561 -0.450822812 0.078999269 0.020876935 -0.000674969 1 117 | -3.815836396 -0.889038214 -0.395233674 1.263988308 0.060056520 -0.006098541 1 118 | -1.690381405 -2.788213610 -0.395233674 1.263988308 0.066330455 -0.005208800 1 119 | -3.379340915 0.454356743 -1.268224637 1.263988308 0.034170009 -0.004383308 1 120 | -2.833141410 -1.957949867 -1.268224637 1.263988308 0.061909789 -0.005658581 1 121 | -0.603500885 -2.323790361 -1.237276812 0.627056700 0.057097056 -0.002326512 1 122 | -3.097454339 0.991464630 -1.199361527 0.424621072 0.019996247 -0.001466492 1 123 | -3.379340915 -1.206170744 -1.268224637 1.263988308 0.057916358 -0.005732227 1 124 | -1.253885924 -2.471081080 -1.268224637 1.263988308 0.058439898 -0.004160194 1 125 | -2.614974654 0.549039908 -1.952776632 0.004937454 0.014210113 -0.000095022 1 126 | -3.109571872 -0.375907001 -1.807762723 1.263988308 0.041076092 -0.004559669 1 127 | -1.960150448 -1.957949867 -1.807762723 1.263988308 0.052241046 -0.004426277 1 128 | -0.832882597 -1.759414440 -1.935188509 0.029624726 0.040106318 -0.000283367 1 129 | -2.536600406 0.466367683 -2.033841541 0.019749817 0.013666204 -0.000219992 1 130 | -2.393288794 -0.404140058 -2.266530738 1.086239952 0.027498778 -0.002744611 1 131 | -1.747885502 -1.261790185 -2.271396992 1.130677041 0.034871351 -0.002790273 1 132 | -0.986409791 -1.573065742 -2.095371806 0.064186906 0.035196901 -0.000404587 1 133 | 2.391391681 -0.411357848 2.266530738 1.086239952 0.027412108 -0.002731968 2 134 | 2.534703293 0.459149894 2.033841541 0.019749817 0.013458775 -0.000218810 2 135 | 0.984512677 -1.580283532 2.095371806 0.064186906 0.035292356 -0.000404458 2 136 | 1.745988389 -1.269007974 2.271396992 1.130677041 0.034903659 -0.002796024 2 137 | 3.107674758 -0.383124790 1.807762723 1.263988308 0.040949554 -0.004552235 2 138 | 2.613077540 0.541822119 1.952776632 0.004937454 0.013987929 -0.000094544 2 139 | 0.830985484 -1.766632230 1.935188509 0.029624726 0.040196429 -0.000282232 2 140 | 1.958253335 -1.965167657 1.807762723 1.263988308 0.052275839 -0.004433040 2 141 | 3.097864405 0.981710232 1.199071896 0.414746163 0.019805303 -0.001431563 2 142 | 1.251988811 -2.478298870 1.268224637 1.263988308 0.058484980 -0.004167503 2 143 | 3.377443802 -1.213388534 1.268224637 1.263988308 0.057844442 -0.005730487 2 144 | 3.377443802 0.447138953 1.268224637 1.263988308 0.033949199 -0.004372334 2 145 | 0.595461662 -2.327588456 1.238457097 0.646806517 0.057082221 -0.002391996 2 146 | 2.831244297 -1.965167657 1.268224637 1.263988308 0.061899771 -0.005662416 2 147 | 3.243823179 1.227239771 0.450822812 0.078999269 0.020566748 -0.000674107 2 148 | 1.688484292 -2.795431400 0.395233674 1.263988308 0.066364011 -0.005219323 2 149 | 3.813939283 -0.896256003 0.395233674 1.263988308 0.059948781 -0.006094376 2 150 | 3.813939283 0.130006423 0.395233674 1.263988308 0.046954752 -0.005438480 2 151 | 0.356553056 -2.540620317 0.444185788 0.177748356 0.067020656 -0.001076734 2 152 | 2.664517860 -2.478298870 0.395233674 1.263988308 0.068067688 -0.005950144 2 153 | 3.662973453 0.594631473 -0.395233674 1.263988308 0.038182625 -0.004786561 2 154 | 0.451183494 -2.601803027 -0.355600970 0.740618149 0.066701275 -0.002979268 2 155 | 3.059751534 -2.191144797 -0.395233674 1.263988308 0.067811438 -0.006140458 2 156 | 3.307954113 1.183165446 -0.329114608 0.508557796 0.022743742 -0.002055385 2 157 | 1.199948603 -2.795431400 -0.395233674 1.263988308 0.065368224 -0.004579336 2 158 | 3.662973453 -1.360881053 -0.395233674 1.263988308 0.063795095 -0.006215911 2 159 | 3.496247015 0.081500260 -1.268224637 1.263988308 0.041512038 -0.004778316 2 160 | 0.508219157 -2.317974110 -1.189691892 0.162935993 0.057933873 -0.001071551 2 161 | 2.520213447 -2.191144797 -1.268224637 1.263988308 0.062104744 -0.005461355 2 162 | 3.077570332 1.027861176 -1.173189374 0.064186906 0.018653267 -0.000563479 2 163 | 1.636444084 -2.478298870 -1.268224637 1.263988308 0.059960524 -0.004604667 2 164 | 3.496247015 -0.847749840 -1.268224637 1.263988308 0.054496219 -0.005575530 2 165 | 2.950578445 0.440994144 -1.756929461 0.819617418 0.024250479 -0.002467775 2 166 | 1.067203360 -2.053266899 -1.761699771 0.952928685 0.048101121 -0.002736053 2 167 | 2.789982491 -1.360881053 -1.807762723 1.263988308 0.051694220 -0.004906164 2 168 | 2.443620897 -0.109927037 -2.227476902 0.498682887 0.022450815 -0.001353361 2 169 | 1.459032430 -1.400863503 -2.235864042 0.562869793 0.034469854 -0.001495006 2 170 | 2.184610862 -0.921052820 -2.279813405 1.184989038 0.034071453 -0.003037337 2 171 | 172 | -------------------------------------------------------------------------------- /tests/COSMO_ORCA/ethanol.xyz: -------------------------------------------------------------------------------- 1 | 9 2 | energy: -155.1065184553600034 3 | C 0.9811201274478100 0.2687379705464200 -0.1965068584171300 4 | C -0.3789029207927900 -0.3894798023976600 -0.0560643822081000 5 | O -1.3661204485421099 0.6501460981392100 0.0285700105131400 6 | H 1.0191343325423099 0.8879860574709000 -1.1036234271986500 7 | H 1.1896417595586199 0.9127236110323000 0.6693015751927800 8 | H 1.7716153569052799 -0.4927883867772800 -0.2617973749787500 9 | H -0.5761316990432300 -1.0438703666882800 -0.9266095401968200 10 | H -0.4022978562577100 -1.0234151827733899 0.8509137140603600 11 | H -2.2380586518182199 0.2299600014477900 0.1161190312802900 12 | -------------------------------------------------------------------------------- /tests/test_cosmors.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pytest 3 | 4 | import scipy.constants as spcon 5 | 6 | from opencosmorspy.cosmors import COSMORS 7 | from opencosmorspy.parameterization import Parameterization 8 | 9 | @pytest.fixture 10 | def parameterization_orca(): 11 | 12 | par_dct = {} 13 | par_dct['qc_program'] = 'orca' 14 | 15 | par_dct['descriptor_lst'] = ['sigma', 'sigma_orth', 'elmnt_nr', 'group', 16 | 'mol_charge'] 17 | 18 | par_dct['a_eff'] = 6.226 19 | par_dct['r_av'] = 0.5 # Klamt and Eckert, 2000 20 | par_dct['sigma_min'] = -0.15 21 | par_dct['sigma_max'] = 0.15 22 | par_dct['sigma_step'] = 0.001 # Klamt, 1995? 23 | par_dct['sigma_grid'] = (np.arange(par_dct['sigma_min'], 24 | par_dct['sigma_max']+par_dct['sigma_step'], 25 | par_dct['sigma_step'])) 26 | par_dct['sigma_orth_min'] = -0.15 27 | par_dct['sigma_orth_max'] = 0.15 28 | par_dct['sigma_orth_step'] = 0.001 29 | par_dct['sigma_orth_grid'] = ( 30 | np.arange(par_dct['sigma_orth_min'], 31 | par_dct['sigma_orth_max']+par_dct['sigma_orth_step'], 32 | par_dct['sigma_orth_step'])) 33 | 34 | par_dct['mf_use_sigma_orth'] = True 35 | par_dct['mf_alpha'] = 7.579075e6 36 | par_dct['mf_r_av_corr'] = 1.0 # Klamt et al., 1998 37 | par_dct['mf_f_corr'] = 2.4 # Klamt et al., 1998 38 | 39 | par_dct['hb_term'] = 'default' 40 | par_dct['hb_c'] = 2.7488747e7 41 | par_dct['hb_c_T'] = 1.5 # Klamt and Eckert, 2000 42 | par_dct['hb_sigma_thresh'] = 7.686e-03 43 | par_dct['hb_don_elmnt_nr_arr'] = np.array( 44 | [1]+[entry for entry in range(100, 151, 1)]) 45 | par_dct['hb_acc_elmnt_nr_arr'] = np.array([6, 7, 8, 9, 46 | 15, 16, 17, 47 | 35, 53]) 48 | par_dct['hb_pref_arr'] = np.ones(201, dtype='float') 49 | 50 | par_dct['comb_term'] = 'staverman_guggenheim' 51 | par_dct['comb_sg_z_coord'] = 10.0 52 | par_dct['comb_sg_a_std'] = 47.999 53 | # par_dct['comb_sg_expsc_exponent'] = 0.75 54 | 55 | par_dct['calculate_contact_statistics_molecule_properties'] = False 56 | 57 | par_dct['cosmospace_max_iter'] = 1000 58 | par_dct['cosmospace_conv_thresh'] = 1e-6 59 | 60 | par = Parameterization('default_orca') 61 | 62 | for key, value in par_dct.items(): 63 | par.key = value 64 | 65 | return par 66 | 67 | 68 | 69 | def test_cosmors_refstate_conversion(parameterization_orca): 70 | 71 | par = parameterization_orca 72 | par.calculate_contact_statistics_molecule_properties = True 73 | 74 | crs = COSMORS(par) 75 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 76 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 77 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 78 | r'/CH4O_001_methanol_c000.orcacosmo']) 79 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 80 | 81 | x = np.array([0.2, 0.5, 0.3]) 82 | T = 298.15 83 | crs.clear_jobs() 84 | crs.add_job(x, T, refst='cosmo') 85 | results_cosmo_mix = crs.calculate() 86 | 87 | x = np.array([0.0, 1.0, 0.0]) 88 | T = 298.15 89 | crs.clear_jobs() 90 | crs.add_job(x, T, refst='cosmo') 91 | results_cosmo_ref = crs.calculate() 92 | 93 | x = np.array([0.2, 0.5, 0.3]) 94 | T = 298.15 95 | crs.clear_jobs() 96 | crs.add_job(x, T, refst='pure_component') 97 | results_pure_comp = crs.calculate() 98 | 99 | x = np.array([0.2, 0.5, 0.3]) 100 | T = 298.15 101 | crs.clear_jobs() 102 | crs.add_job(x, T, refst='reference_mixture', 103 | x_refst=np.array([0, 1.0, 0.])) 104 | results_refmix = crs.calculate() 105 | 106 | 107 | print('COSMO reference state - MIXTURE') 108 | print('Partial molar - pm_A_int ', 109 | results_cosmo_mix['enth']['pm_A_int']) 110 | print('Average interaction mol - aim_A_int ', 111 | results_cosmo_mix['enth']['aim_A_int']) 112 | print('') 113 | 114 | print('COSMO reference state - PURE METHANOL') 115 | print('Partial molar - pm_A_int ', 116 | results_cosmo_ref['enth']['pm_A_int']) 117 | print('Average interaction mol - aim_A_int ', 118 | results_cosmo_ref['enth']['aim_A_int']) 119 | print('') 120 | 121 | print('PURE COMPONENT reference state') 122 | print('Partial molar - pm_A_int ', 123 | results_pure_comp['enth']['pm_A_int']) 124 | print('Average interaction mol - aim_A_int ', 125 | results_pure_comp['enth']['aim_A_int']) 126 | # print('Manual comparison for component 2') 127 | # print('Partial molar - pm_A_int ', 128 | # pm_A_int_mix[0, 1]-pm_A_int_ref[0, 1]) 129 | # print('Average interaction mol - aim_A_int ', 130 | # aim_A_int_mix[0, 1]-aim_A_int_ref[0, 1]) 131 | # print('') 132 | 133 | print('REFERENCE MIXTURE reference state - PURE METHANOL') 134 | print('Partial molar - pm_A_int ', 135 | results_refmix['enth']['pm_A_int']) 136 | print('Average interaction mol - aim_A_int ', 137 | results_refmix['enth']['aim_A_int']) 138 | # print('Manual comparison for component 2') 139 | # print('Partial molar - pm_A_int ', 140 | # pm_A_int_mix[0, 1]-pm_A_int_ref[0, 1]) 141 | # print('Average interaction mol - aim_A_int ', 142 | # aim_A_int_mix[0, 1]-aim_A_int_ref[0, 1]) 143 | # print('') 144 | 145 | # Check identity of pure component ref 146 | prop_lst = ['lng', 'pm_A_int', 'pm_A_hb', 147 | 'pm_E_int'] 148 | for prop in prop_lst: 149 | assert(np.abs(results_cosmo_mix['enth'][prop][0, 1] - 150 | results_cosmo_ref['enth'][prop][0, 1] - 151 | results_pure_comp['enth'][prop][0, 1]) < 1e-10) 152 | 153 | assert (np.abs(results_cosmo_mix['tot']['lng'][0, 1] - 154 | results_cosmo_ref['tot']['lng'][0, 1] - 155 | results_pure_comp['tot']['lng'][0, 1]) < 1e-10) 156 | 157 | # Check identity of reference mixture ref 158 | prop_lst = ['lng', 'pm_A_int', 'pm_A_hb', 159 | 'pm_E_int'] 160 | for prop in prop_lst: 161 | assert(np.abs(results_cosmo_mix['enth'][prop][0, 1] - 162 | results_cosmo_ref['enth'][prop][0, 1] - 163 | results_refmix['enth'][prop][0, 1]) < 1e-10) 164 | 165 | 166 | def test_pm_vs_aim(parameterization_orca): 167 | 168 | par = parameterization_orca 169 | par.calculate_contact_statistics_molecule_properties = True 170 | 171 | crs = COSMORS(par) 172 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 173 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 174 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 175 | r'/CH4O_001_methanol_c000.orcacosmo']) 176 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 177 | 178 | 179 | x = np.array([0.2, 0.5, 0.3]) 180 | T = 298.15 181 | 182 | crs.add_job(x, T, refst='cosmo') 183 | results = crs.calculate() 184 | 185 | pm_A_int_mix = results['enth']['pm_A_int'] 186 | aim_A_int_mix = results['enth']['aim_A_int'] 187 | 188 | # Cross-validate pm vs aim energy (works in cosmo refst): 189 | print((x*aim_A_int_mix).sum()) 190 | print((x*pm_A_int_mix).sum()) 191 | assert (np.abs(((x*aim_A_int_mix).sum() - 192 | (x*pm_A_int_mix).sum()) / 193 | (x*pm_A_int_mix).sum()) < 1e-6) 194 | 195 | 196 | def test_pm_gibbs_helmholtz(parameterization_orca): 197 | 198 | par = parameterization_orca 199 | par.calculate_contact_statistics_molecule_properties = True 200 | 201 | crs = COSMORS(par) 202 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 203 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 204 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 205 | r'/CH4O_001_methanol_c000.orcacosmo']) 206 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 207 | 208 | 209 | x = np.array([0.2, 0.5, 0.3]) 210 | T = 298.15 211 | 212 | crs.add_job(x, T, refst='cosmo') 213 | results = crs.calculate() 214 | 215 | del_T = 0.001 216 | crs.clear_jobs() 217 | crs.add_job(x, T+del_T, refst='cosmo') 218 | results_T2 = crs.calculate() 219 | 220 | pm_E_int_mix = results['enth']['pm_E_int'] 221 | 222 | # Numerical Gibbs Helmholtz calculation of interaction energy 223 | pm_E_int_mix_GH = -spcon.R*T**2/del_T * (results_T2['tot']['lng'] - 224 | results['tot']['lng']) 225 | 226 | # Check partial molar interaction energy against gibbs.helmholtz 227 | assert np.all(np.abs((pm_E_int_mix-pm_E_int_mix_GH)/pm_E_int_mix) < 1e-4) 228 | 229 | 230 | 231 | 232 | # def test_misfit_array(): 233 | # test = False 234 | # if test: 235 | # n_seg = len(sigma_arr) 236 | # A_mf_test = np.nan*np.ones((n_seg, n_seg), dtype='float64') 237 | # for idx1 in range(n_seg): 238 | # for idx2 in range(n_seg): 239 | # A_mf_test[idx1, idx2] = ( 240 | # self.par.a_eff*self.par.mf_alpha*0.5 * 241 | # (sigma_arr[idx1]+sigma_arr[idx2]) * 242 | # ((sigma_arr[idx1]+sigma_arr[idx2])+ 243 | # self.par.mf_f_corr * 244 | # (sigma_orth_arr[idx1]+sigma_orth_arr[idx2]))) 245 | # print('Calculated A_mf with slow test method') 246 | # A_mf = A_mf_test 247 | 248 | 249 | # def test_hb_array(): 250 | 251 | # test = False 252 | # if test: 253 | # n_seg = len(sigma_arr) 254 | # A_hb_test = np.nan*np.ones((n_seg, n_seg), dtype='float64') 255 | # del_sigma_hb_don_mult_acc_test = np.nan*np.ones((n_seg, n_seg), 256 | # dtype='float64') 257 | # for idx1 in range(n_seg): 258 | # for idx2 in range(n_seg): 259 | 260 | # if sigma_arr[idx1] < sigma_arr[idx2]: 261 | # idxd = idx1 262 | # idxa = idx2 263 | # else: 264 | # idxd = idx2 265 | # idxa = idx1 266 | 267 | # ENd = elmnt_nr_arr[idxd] 268 | # ENa = elmnt_nr_arr[idxa] 269 | 270 | # if ENd in self.par.hb_don_elmnt_nr_arr: 271 | # fd = self.par.hb_pref_arr[ENd] 272 | # else: 273 | # fd = 0.0 274 | # if ENa in self.par.hb_acc_elmnt_nr_arr: 275 | # fa = self.par.hb_pref_arr[ENa] 276 | # else: 277 | # fa = 0.0 278 | 279 | 280 | # buffdb1 = 1.0 - self.par.hb_c_T + self.par.hb_c_T * (298.15 / (T)); 281 | # if buffdb1 > 0: 282 | # CHB_T = self.par.hb_c * buffdb1 283 | # else: 284 | # CHB_T = 0 285 | 286 | # buffdb1 = 0 287 | # buffdb2 = 0 288 | # if sigma_arr[idxa] - self.par.hb_sigma_thresh > 0: 289 | # buffdb1 = sigma_arr[idxa] - self.par.hb_sigma_thresh 290 | 291 | # if sigma_arr[idxd] + self.par.hb_sigma_thresh < 0: 292 | # buffdb2 = sigma_arr[idxd] + self.par.hb_sigma_thresh 293 | 294 | # del_sigma_hb_don_mult_acc_test[idx1, idx2] = fd*fa*buffdb1*buffdb2 295 | 296 | # A_hb_test[idx1, idx2] = fd*fa * CHB_T * self.par.a_eff * buffdb1 * buffdb2 297 | 298 | # print('Calculated A_hb with slow test method') 299 | # print('STOP') 300 | # A_hb = A_hb_test 301 | 302 | -------------------------------------------------------------------------------- /tests/test_cosmors_integration.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pytest 3 | 4 | import scipy.constants as spcon 5 | 6 | from opencosmorspy.cosmors import COSMORS 7 | from opencosmorspy.parameterization import Parameterization 8 | 9 | @pytest.fixture 10 | def parameterization_orca(): 11 | 12 | par_dct = {} 13 | par_dct['qc_program'] = 'orca' 14 | 15 | par_dct['descriptor_lst'] = ['sigma', 'sigma_orth', 'elmnt_nr', 'group', 16 | 'mol_charge'] 17 | 18 | par_dct['a_eff'] = 6.226 19 | par_dct['r_av'] = 0.5 # Klamt and Eckert, 2000 20 | par_dct['sigma_min'] = -0.15 21 | par_dct['sigma_max'] = 0.15 22 | par_dct['sigma_step'] = 0.001 # Klamt, 1995? 23 | par_dct['sigma_grid'] = (np.arange(par_dct['sigma_min'], 24 | par_dct['sigma_max']+par_dct['sigma_step'], 25 | par_dct['sigma_step'])) 26 | par_dct['sigma_orth_min'] = -0.15 27 | par_dct['sigma_orth_max'] = 0.15 28 | par_dct['sigma_orth_step'] = 0.001 29 | par_dct['sigma_orth_grid'] = ( 30 | np.arange(par_dct['sigma_orth_min'], 31 | par_dct['sigma_orth_max']+par_dct['sigma_orth_step'], 32 | par_dct['sigma_orth_step'])) 33 | 34 | par_dct['mf_use_sigma_orth'] = True 35 | par_dct['mf_alpha'] = 7.579075e6 36 | par_dct['mf_r_av_corr'] = 1.0 # Klamt et al., 1998 37 | par_dct['mf_f_corr'] = 2.4 # Klamt et al., 1998 38 | 39 | par_dct['hb_term'] = 'default' 40 | par_dct['hb_c'] = 2.7488747e7 41 | par_dct['hb_c_T'] = 1.5 # Klamt and Eckert, 2000 42 | par_dct['hb_sigma_thresh'] = 7.686e-03 43 | par_dct['hb_don_elmnt_nr_arr'] = np.array( 44 | [1]+[entry for entry in range(100, 151, 1)]) 45 | par_dct['hb_acc_elmnt_nr_arr'] = np.array([6, 7, 8, 9, 46 | 15, 16, 17, 47 | 35, 53]) 48 | par_dct['hb_pref_arr'] = np.ones(201, dtype='float') 49 | 50 | par_dct['comb_term'] = 'staverman_guggenheim' 51 | par_dct['comb_sg_z_coord'] = 10.0 52 | par_dct['comb_sg_a_std'] = 47.999 53 | # par_dct['comb_sg_expsc_exponent'] = 0.75 54 | 55 | par_dct['calculate_contact_statistics_molecule_properties'] = False 56 | 57 | par_dct['cosmospace_max_iter'] = 1000 58 | par_dct['cosmospace_conv_thresh'] = 1e-6 59 | 60 | par = Parameterization('default_orca') 61 | 62 | for key, value in par_dct.items(): 63 | par.key = value 64 | 65 | return par 66 | 67 | 68 | 69 | def test_cosmors_lng_1(parameterization_orca): 70 | print(type(parameterization_orca)) 71 | 72 | crs = COSMORS(par=parameterization_orca) 73 | crs.add_molecule(['./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 74 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 75 | crs.add_molecule(['./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 76 | 77 | x = np.array([0.0, 1.0]) 78 | T = 298.15 79 | 80 | crs.add_job(x, T, refst='pure_component') 81 | results = crs.calculate() 82 | 83 | lng_res_validated = np.array([[10.02243494, 0.]]) 84 | lng_comb_validated = np.array([[-0.7728501, 0. ]]) 85 | 86 | assert np.all(np.abs(results['enth']['lng']-lng_res_validated)<1e-8) 87 | assert np.all(np.abs(results['comb']['lng']-lng_comb_validated)<1e-8) 88 | assert np.all(np.abs(results['tot']['lng']- 89 | lng_res_validated-lng_comb_validated)<1e-8) 90 | 91 | def test_cosmors_refstate_conversion(parameterization_orca): 92 | 93 | par = parameterization_orca 94 | par.calculate_contact_statistics_molecule_properties = True 95 | 96 | crs = COSMORS(par) 97 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 98 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 99 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 100 | r'/CH4O_001_methanol_c000.orcacosmo']) 101 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 102 | 103 | x = np.array([0.2, 0.5, 0.3]) 104 | T = 298.15 105 | crs.clear_jobs() 106 | crs.add_job(x, T, refst='cosmo') 107 | results_cosmo_mix = crs.calculate() 108 | 109 | x = np.array([0.0, 1.0, 0.0]) 110 | T = 298.15 111 | crs.clear_jobs() 112 | crs.add_job(x, T, refst='cosmo') 113 | results_cosmo_ref = crs.calculate() 114 | 115 | x = np.array([0.2, 0.5, 0.3]) 116 | T = 298.15 117 | crs.clear_jobs() 118 | crs.add_job(x, T, refst='pure_component') 119 | results_pure_comp = crs.calculate() 120 | 121 | x = np.array([0.2, 0.5, 0.3]) 122 | T = 298.15 123 | crs.clear_jobs() 124 | crs.add_job(x, T, refst='reference_mixture', 125 | x_refst=np.array([0, 1.0, 0.])) 126 | results_refmix = crs.calculate() 127 | 128 | 129 | print('COSMO reference state - MIXTURE') 130 | print('Partial molar - pm_A_int ', 131 | results_cosmo_mix['enth']['pm_A_int']) 132 | print('Average interaction mol - aim_A_int ', 133 | results_cosmo_mix['enth']['aim_A_int']) 134 | print('') 135 | 136 | print('COSMO reference state - PURE METHANOL') 137 | print('Partial molar - pm_A_int ', 138 | results_cosmo_ref['enth']['pm_A_int']) 139 | print('Average interaction mol - aim_A_int ', 140 | results_cosmo_ref['enth']['aim_A_int']) 141 | print('') 142 | 143 | print('PURE COMPONENT reference state') 144 | print('Partial molar - pm_A_int ', 145 | results_pure_comp['enth']['pm_A_int']) 146 | print('Average interaction mol - aim_A_int ', 147 | results_pure_comp['enth']['aim_A_int']) 148 | # print('Manual comparison for component 2') 149 | # print('Partial molar - pm_A_int ', 150 | # pm_A_int_mix[0, 1]-pm_A_int_ref[0, 1]) 151 | # print('Average interaction mol - aim_A_int ', 152 | # aim_A_int_mix[0, 1]-aim_A_int_ref[0, 1]) 153 | # print('') 154 | 155 | print('REFERENCE MIXTURE reference state - PURE METHANOL') 156 | print('Partial molar - pm_A_int ', 157 | results_refmix['enth']['pm_A_int']) 158 | print('Average interaction mol - aim_A_int ', 159 | results_refmix['enth']['aim_A_int']) 160 | # print('Manual comparison for component 2') 161 | # print('Partial molar - pm_A_int ', 162 | # pm_A_int_mix[0, 1]-pm_A_int_ref[0, 1]) 163 | # print('Average interaction mol - aim_A_int ', 164 | # aim_A_int_mix[0, 1]-aim_A_int_ref[0, 1]) 165 | # print('') 166 | 167 | # Check identity of pure component ref 168 | prop_lst = ['lng', 'pm_A_int', 'pm_A_hb', 169 | 'pm_E_int'] 170 | for prop in prop_lst: 171 | assert(np.abs(results_cosmo_mix['enth'][prop][0, 1] - 172 | results_cosmo_ref['enth'][prop][0, 1] - 173 | results_pure_comp['enth'][prop][0, 1]) < 1e-10) 174 | 175 | assert (np.abs(results_cosmo_mix['tot']['lng'][0, 1] - 176 | results_cosmo_ref['tot']['lng'][0, 1] - 177 | results_pure_comp['tot']['lng'][0, 1]) < 1e-10) 178 | 179 | # Check identity of reference mixture ref 180 | prop_lst = ['lng', 'pm_A_int', 'pm_A_hb', 181 | 'pm_E_int'] 182 | for prop in prop_lst: 183 | assert(np.abs(results_cosmo_mix['enth'][prop][0, 1] - 184 | results_cosmo_ref['enth'][prop][0, 1] - 185 | results_refmix['enth'][prop][0, 1]) < 1e-10) 186 | 187 | 188 | def test_pm_vs_aim(parameterization_orca): 189 | 190 | par = parameterization_orca 191 | par.calculate_contact_statistics_molecule_properties = True 192 | 193 | crs = COSMORS(par) 194 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 195 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 196 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 197 | r'/CH4O_001_methanol_c000.orcacosmo']) 198 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 199 | 200 | 201 | x = np.array([0.2, 0.5, 0.3]) 202 | T = 298.15 203 | 204 | crs.add_job(x, T, refst='cosmo') 205 | results = crs.calculate() 206 | 207 | pm_A_int_mix = results['enth']['pm_A_int'] 208 | aim_A_int_mix = results['enth']['aim_A_int'] 209 | 210 | # Cross-validate pm vs aim energy (works in cosmo refst): 211 | print((x*aim_A_int_mix).sum()) 212 | print((x*pm_A_int_mix).sum()) 213 | assert (np.abs(((x*aim_A_int_mix).sum() - 214 | (x*pm_A_int_mix).sum()) / 215 | (x*pm_A_int_mix).sum()) < 1e-6) 216 | 217 | 218 | def test_pm_gibbs_helmholtz(parameterization_orca): 219 | 220 | par = parameterization_orca 221 | par.calculate_contact_statistics_molecule_properties = True 222 | 223 | crs = COSMORS(par) 224 | crs.add_molecule([r'./tests/COSMO_ORCA/C2H2Cl4_001_1112tetrachloroethane' 225 | r'/COSMO_TZVPD/C2H2Cl4_001_1112tetrachloroethane_CnfS1_c000.orcacosmo']) 226 | crs.add_molecule([r'./tests/COSMO_ORCA/CH4O_001_methanol/COSMO_TZVPD' 227 | r'/CH4O_001_methanol_c000.orcacosmo']) 228 | crs.add_molecule([r'./tests/COSMO_ORCA/H2O_001/COSMO_TZVPD/H2O_c000.orcacosmo']) 229 | 230 | 231 | x = np.array([0.2, 0.5, 0.3]) 232 | T = 298.15 233 | 234 | crs.add_job(x, T, refst='cosmo') 235 | results = crs.calculate() 236 | 237 | del_T = 0.001 238 | crs.clear_jobs() 239 | crs.add_job(x, T+del_T, refst='cosmo') 240 | results_T2 = crs.calculate() 241 | 242 | pm_E_int_mix = results['enth']['pm_E_int'] 243 | 244 | # Numerical Gibbs Helmholtz calculation of interaction energy 245 | pm_E_int_mix_GH = -spcon.R*T**2/del_T * (results_T2['tot']['lng'] - 246 | results['tot']['lng']) 247 | 248 | # Check partial molar interaction energy against gibbs.helmholtz 249 | assert np.all(np.abs((pm_E_int_mix-pm_E_int_mix_GH)/pm_E_int_mix) < 1e-4) 250 | 251 | 252 | 253 | 254 | 255 | # def test_misfit_array(): 256 | # test = False 257 | # if test: 258 | # n_seg = len(sigma_arr) 259 | # A_mf_test = np.nan*np.ones((n_seg, n_seg), dtype='float64') 260 | # for idx1 in range(n_seg): 261 | # for idx2 in range(n_seg): 262 | # A_mf_test[idx1, idx2] = ( 263 | # self.par.a_eff*self.par.mf_alpha*0.5 * 264 | # (sigma_arr[idx1]+sigma_arr[idx2]) * 265 | # ((sigma_arr[idx1]+sigma_arr[idx2])+ 266 | # self.par.mf_f_corr * 267 | # (sigma_orth_arr[idx1]+sigma_orth_arr[idx2]))) 268 | # print('Calculated A_mf with slow test method') 269 | # A_mf = A_mf_test 270 | 271 | 272 | # def test_hb_array(): 273 | 274 | # test = False 275 | # if test: 276 | # n_seg = len(sigma_arr) 277 | # A_hb_test = np.nan*np.ones((n_seg, n_seg), dtype='float64') 278 | # del_sigma_hb_don_mult_acc_test = np.nan*np.ones((n_seg, n_seg), 279 | # dtype='float64') 280 | # for idx1 in range(n_seg): 281 | # for idx2 in range(n_seg): 282 | 283 | # if sigma_arr[idx1] < sigma_arr[idx2]: 284 | # idxd = idx1 285 | # idxa = idx2 286 | # else: 287 | # idxd = idx2 288 | # idxa = idx1 289 | 290 | # ENd = elmnt_nr_arr[idxd] 291 | # ENa = elmnt_nr_arr[idxa] 292 | 293 | # if ENd in self.par.hb_don_elmnt_nr_arr: 294 | # fd = self.par.hb_pref_arr[ENd] 295 | # else: 296 | # fd = 0.0 297 | # if ENa in self.par.hb_acc_elmnt_nr_arr: 298 | # fa = self.par.hb_pref_arr[ENa] 299 | # else: 300 | # fa = 0.0 301 | 302 | 303 | # buffdb1 = 1.0 - self.par.hb_c_T + self.par.hb_c_T * (298.15 / (T)); 304 | # if buffdb1 > 0: 305 | # CHB_T = self.par.hb_c * buffdb1 306 | # else: 307 | # CHB_T = 0 308 | 309 | # buffdb1 = 0 310 | # buffdb2 = 0 311 | # if sigma_arr[idxa] - self.par.hb_sigma_thresh > 0: 312 | # buffdb1 = sigma_arr[idxa] - self.par.hb_sigma_thresh 313 | 314 | # if sigma_arr[idxd] + self.par.hb_sigma_thresh < 0: 315 | # buffdb2 = sigma_arr[idxd] + self.par.hb_sigma_thresh 316 | 317 | # del_sigma_hb_don_mult_acc_test[idx1, idx2] = fd*fa*buffdb1*buffdb2 318 | 319 | # A_hb_test[idx1, idx2] = fd*fa * CHB_T * self.par.a_eff * buffdb1 * buffdb2 320 | 321 | # print('Calculated A_hb with slow test method') 322 | # print('STOP') 323 | # A_hb = A_hb_test 324 | 325 | -------------------------------------------------------------------------------- /tests/test_input_parsers_orca.py: -------------------------------------------------------------------------------- 1 | 2 | import pytest 3 | from opencosmorspy.input_parsers import SigmaProfileParser 4 | 5 | 6 | bohr_per_angstrom = 0.52917721092 7 | 8 | hartree_per_kJdivmol = 2625.499639479 9 | elpotatmu_per_volt = 27.211386245988 10 | 11 | 12 | class TestOrca: 13 | 14 | @pytest.fixture(autouse=True) 15 | def sigma_profile_parser_instance(self): 16 | filepath = (r'tests/COSMO_ORCA/C2H5NO_002_Acetamide' 17 | r'/COSMO_TZVPD' 18 | r'/C2H5NO_002_Acetamide_CnfS1_c000.orcacosmo') 19 | self.sigma_profile_parser = SigmaProfileParser(filepath, 'orca') 20 | 21 | def test_method(self): 22 | 23 | assert ((self.sigma_profile_parser['method'])=='DFT_COSMO_BP86_def2-TZVP+def2-TZVPD_SP') 24 | 25 | def test_area(self): 26 | 27 | assert abs(self.sigma_profile_parser['area']-346.719451230*bohr_per_angstrom**2) < 1e-12 28 | 29 | def test_volume(self): 30 | 31 | assert abs(self.sigma_profile_parser['volume']-512.628916151*bohr_per_angstrom**3) < 1e-12 32 | 33 | def test_energy_tot(self): 34 | 35 | assert abs(self.sigma_profile_parser['energy_tot'] - 36 | (-209.329723227055)*hartree_per_kJdivmol) < 1e-12 37 | 38 | def test_energy_dielectric(self): 39 | 40 | assert abs(self.sigma_profile_parser['energy_dielectric'] - 41 | (-0.022773896)*hartree_per_kJdivmol) < 1e-12 42 | 43 | def test_atm_nr(self): 44 | 45 | assert self.sigma_profile_parser['atm_nr'][-2] == 7 and len(info['atm_nr'])==9 46 | 47 | 48 | def test_atm_pos(self): 49 | 50 | assert abs(self.sigma_profile_parser['atm_pos'][-2, 0]-(-3.086454081)*bohr_per_angstrom) < 1e-6 51 | assert abs(self.sigma_profile_parser['atm_pos'][-2, 1]-1.235399813*bohr_per_angstrom) < 1e-6 52 | assert abs(self.sigma_profile_parser['atm_pos'][-2, 2]-(0.123316481)*bohr_per_angstrom) < 1e-6 53 | 54 | def test_atm_elmnt(self): 55 | 56 | assert len(self.sigma_profile_parser['atm_elmnt']) == 9 57 | assert self.sigma_profile_parser['atm_elmnt'][0] == 'C' 58 | assert self.sigma_profile_parser['atm_elmnt'][2] == 'O' 59 | assert self.sigma_profile_parser['atm_elmnt'][3] == 'N' 60 | assert self.sigma_profile_parser['atm_elmnt'][4] == 'H' 61 | 62 | 63 | def test_atm_rad(self): 64 | 65 | assert len(self.sigma_profile_parser['atm_rad']) == 9 66 | assert abs(self.sigma_profile_parser['atm_rad'][0]-3.779452268*bohr_per_angstrom) < 1e-6 67 | assert abs(self.sigma_profile_parser['atm_rad'][2]-3.250328950*bohr_per_angstrom) < 1e-6 68 | assert abs(self.sigma_profile_parser['atm_rad'][3]-3.458198825*bohr_per_angstrom) < 1e-6 69 | assert abs(self.sigma_profile_parser['atm_rad'][4]-2.456643974*bohr_per_angstrom) < 1e-6 70 | 71 | 72 | def test_seg_nr(self): 73 | 74 | assert len(self.sigma_profile_parser['seg_nr']) == 590 75 | assert self.sigma_profile_parser['seg_nr'][-1] == 589 76 | 77 | 78 | def test_seg_atm_nr(self): 79 | 80 | assert len(self.sigma_profile_parser['seg_atm_nr']) == 590 81 | assert self.sigma_profile_parser['seg_atm_nr'][-1] == 8 82 | assert self.sigma_profile_parser['seg_atm_nr'][-60] == 8 83 | assert self.sigma_profile_parser['seg_atm_nr'][-61] == 7 84 | 85 | def test_seg_pos(self): 86 | 87 | assert self.sigma_profile_parser['seg_pos'].shape == (590, 3) 88 | assert self.sigma_profile_parser['seg_pos'][-8, 0] == -4.952453963*bohr_per_angstrom 89 | assert self.sigma_profile_parser['seg_pos'][-8, 1] == -1.872670855*bohr_per_angstrom 90 | assert self.sigma_profile_parser['seg_pos'][-8, 2] == -2.883912107*bohr_per_angstrom 91 | 92 | 93 | def test_seg_charge(self): 94 | 95 | assert len(self.sigma_profile_parser['seg_charge']) == 590 96 | assert self.sigma_profile_parser['seg_charge'][-5] == -0.000157636 97 | 98 | 99 | def test_seg_area(self): 100 | 101 | assert len(self.sigma_profile_parser['seg_area']) == 590 102 | assert self.sigma_profile_parser['seg_area'][-5] == 0.086357755*bohr_per_angstrom**2 103 | 104 | 105 | def test_seg_sigma_raw(self): 106 | 107 | assert len(self.sigma_profile_parser['seg_sigma_raw']) == 590 108 | assert self.sigma_profile_parser['seg_sigma_raw'][-5] == ( 109 | -0.000157636/(0.086357755*bohr_per_angstrom**2)) 110 | 111 | 112 | # def test_seg_potential(self): 113 | 114 | # assert len(self.sigma_profile_parser['seg_potential']) == 320 115 | # assert self.sigma_profile_parser['seg_potential'][-2] == -0.000271805*elpotatmu_per_volt 116 | 117 | 118 | 119 | 120 | --------------------------------------------------------------------------------