Skip to content

Commit e40e812

Browse files
author
Roberto Di Remigio
committed
Fix radii print out + add two new solvents
1 parent 2d7f7a9 commit e40e812

File tree

10 files changed

+318
-272
lines changed

10 files changed

+318
-272
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@
161161

162162
## v1.0.0 (2014-09-30) [YANKED]
163163

164-
[Unreleased]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.1...HEAD
164+
[Unreleased]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.5...HEAD
165+
[v1.1.5]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.4...v1.1.5
166+
[v1.1.4]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.3...v1.1.4
167+
[v1.1.3]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.2...v1.1.3
168+
[v1.1.2]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.1...v1.1.3
165169
[v1.1.1]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.0...v1.1.1
166170
[v1.1.0]: https://github.com/PCMSolver/pcmsolver/releases/tag/v1.1.0

doc/users/input.rst

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ Available sections:
4747
+ Green, subsection of medium. Sets up the Green's function inside and
4848
outside the cavity.
4949

50+
.. warning::
51+
52+
Exactly matching results obtained from implementations of IEFPCM and/or
53+
CPCM (COSMO) given in other program packages requires careful selection of
54+
all the parameters involved.
55+
A partial checklist of parameters you should always keep in mind:
56+
57+
* solvent permittivities (static and optical)
58+
* atomic radii set
59+
* scaling of the atomic radii
60+
* cavity surface
61+
* cavity partition (tesselation)
62+
* PCM matrix formation algorithm
63+
* strategy used to solve the PCM linear equations system.
64+
5065
Top section keywords
5166
--------------------
5267

@@ -110,7 +125,7 @@ Cavity section keywords
110125
RadiiSet
111126
Select set of atomic radii to be used. Currently Bondi-Mantina
112127
:cite:`Bondi1964,Mantina2009`, UFF :cite:`Rappe1992` and Allinger's MM3
113-
:cite`Allinger1994-tx` sets available, see :ref:`available-radii`.
128+
:cite:`Allinger1994-tx` sets available, see :ref:`available-radii`.
114129

115130
* **Type**: string
116131
* **Valid values**: Bondi | UFF | Allinger
@@ -120,7 +135,7 @@ Cavity section keywords
120135
.. note::
121136

122137
Radii in Allinger's MM3 set are obtained by **dividing** the value in the original
123-
paper by 1.2, as done in the [ADF COSMO implementation](https://www.scm.com/doc/ADF/Input/COSMO.html)
138+
paper by 1.2, as done in the `ADF COSMO implementation <https://www.scm.com/doc/ADF/Input/COSMO.html>`_
124139
We advise to turn off scaling of the radii by 1.2 when using this set.
125140

126141
MinRadius
@@ -210,24 +225,26 @@ Medium section keywords
210225
* **Type**: string
211226
* **Valid values**:
212227

213-
+ Water , H2O;
214-
+ Methanol , CH3OH;
215-
+ Ethanol , CH3CH2OH;
216-
+ Chloroform , CHCL3;
217-
+ Methylenechloride , CH2CL2;
218-
+ 1,2-Dichloroethane , C2H4CL2;
219-
+ Carbon Tetrachloride, CCL4;
220-
+ Benzene , C6H6;
221-
+ Toluene , C6H5CH3;
222-
+ Chlorobenzene , C6H5CL;
223-
+ Nitromethane , CH3NO2;
224-
+ N-heptane , C7H16;
225-
+ Cyclohexane , C6H12;
226-
+ Aniline , C6H5NH2;
227-
+ Acetone , C2H6CO;
228-
+ Tetrahydrofurane , THF;
229-
+ Dimethylsulfoxide , DMSO;
230-
+ Acetonitrile , CH3CN;
228+
+ Water , H2O;
229+
+ Propylene Carbonate , C4H6O3;
230+
+ Dimethylsulfoxide , DMSO;
231+
+ Nitromethane , CH3NO2;
232+
+ Acetonitrile , CH3CN;
233+
+ Methanol , CH3OH;
234+
+ Ethanol , CH3CH2OH;
235+
+ Acetone , C2H6CO;
236+
+ 1,2-Dichloroethane , C2H4CL2;
237+
+ Methylenechloride , CH2CL2;
238+
+ Tetrahydrofurane , THF;
239+
+ Aniline , C6H5NH2;
240+
+ Chlorobenzene , C6H5CL;
241+
+ Chloroform , CHCL3;
242+
+ Toluene , C6H5CH3;
243+
+ 1,4-Dioxane , C4H8O2;
244+
+ Benzene , C6H6;
245+
+ Carbon Tetrachloride , CCL4;
246+
+ Cyclohexane , C6H12;
247+
+ N-heptane , C7H16;
231248
+ Explicit.
232249

233250
MatrixSymm
@@ -454,6 +471,7 @@ Solvents are ordered by decreasing static permittivity.
454471
Name Formula :math:`\varepsilon_s` :math:`\varepsilon_\infty` :math:`r_\mathrm{probe}`
455472
==================== ======== ===================== ========================== ========================
456473
Water H2O 78.39 1.776 1.385
474+
Propylene Carbonate C4H6O3 64.96 2.019 1.385
457475
Dimethylsulfoxide DMSO 46.7 2.179 2.455
458476
Nitromethane CH3NO2 38.20 1.904 2.155
459477
Acetonitrile CH3CN 36.64 1.806 2.155
@@ -467,6 +485,7 @@ Solvents are ordered by decreasing static permittivity.
467485
Chlorobenzene C6H5Cl 5.621 2.320 2.805
468486
Chloroform CHCl3 4.90 2.085 2.48
469487
Toluene C6H5CH3 2.379 2.232 2.82
488+
1,4-Dioxane C4H8O2 2.250 2.023 2.630
470489
Benzene C6H6 2.247 2.244 2.630
471490
Carbon tetrachloride CCl4 2.228 2.129 2.685
472491
Cyclohexane C6H12 2.023 2.028 2.815

src/bin/run_pcm.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/*
33
* PCMSolver, an API for the Polarizable Continuum Model
44
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
5+
*
66
* This file is part of PCMSolver.
7-
*
7+
*
88
* PCMSolver is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
12-
*
12+
*
1313
* PCMSolver is distributed in the hope that it will be useful,
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU Lesser General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU Lesser General Public License
1919
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
20+
*
2121
* For information on the complete list of contributors to the
2222
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2323
*/
@@ -105,6 +105,7 @@ int main(int argc, char * argv[])
105105
out_stream << "Using CODATA " << parsed.CODATAyear() << " set of constants." << std::endl;
106106
out_stream << "Input parsing done " << parsed.providedBy() << std::endl;
107107
out_stream << "========== Cavity " << std::endl;
108+
out_stream << "Atomic radii set: " << parsed.radiiSetName() << std::endl;
108109
out_stream << *cavity << std::endl;
109110
out_stream << "========== Solver " << std::endl;
110111
out_stream << *solver << std::endl;

src/interface/Input.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/*
33
* PCMSolver, an API for the Polarizable Continuum Model
44
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
5+
*
66
* This file is part of PCMSolver.
7-
*
7+
*
88
* PCMSolver is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
12-
*
12+
*
1313
* PCMSolver is distributed in the hope that it will be useful,
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU Lesser General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU Lesser General Public License
1919
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
20+
*
2121
* For information on the complete list of contributors to the
2222
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2323
*/
@@ -274,23 +274,30 @@ void Input::initMolecule()
274274
}
275275
// 3. list of atoms and list of spheres
276276
double factor = angstromToBohr();
277-
std::vector<Atom> radiiSet, atoms;
277+
std::vector<Atom> radiiSet;
278+
std::vector<Atom> atoms;
278279
if ( radiiSet_ == "UFF" ) {
279280
radiiSet = initUFF();
280-
} else {
281+
radiiSetName_ = "UFF";
282+
} else if ( radiiSet_ == "BONDI" ) {
281283
radiiSet = initBondi();
284+
radiiSetName_ = "Bondi-Mantina";
285+
} else {
286+
radiiSet = initAllinger();
287+
radiiSetName_ = "Allinger's MM3";
282288
}
283289
for (int i = 0; i < charges.size(); ++i) {
284290
int index = int(charges(i)) - 1;
285291
atoms.push_back(radiiSet[index]);
292+
if (scaling_) atoms[index].radiusScaling = 1.2;
286293
}
287294
// Based on the creation mode (Implicit or Atoms)
288295
// the spheres list might need postprocessing
289296
if ( mode_ == "IMPLICIT" || mode_ == "ATOMS") {
290297
for (int i = 0; i < charges.size(); ++i) {
291298
int index = int(charges(i)) - 1;
292299
double radius = radiiSet[index].radius * factor;
293-
if (scaling_) radius *= radiiSet[index].radiusScaling;
300+
if (scaling_) radius *= 1.2;
294301
spheres_.push_back(Sphere(centers.col(i), radius));
295302
}
296303
if (mode_ == "ATOMS") {

src/interface/Input.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/*
33
* PCMSolver, an API for the Polarizable Continuum Model
44
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
5+
*
66
* This file is part of PCMSolver.
7-
*
7+
*
88
* PCMSolver is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
12-
*
12+
*
1313
* PCMSolver is distributed in the hope that it will be useful,
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU Lesser General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU Lesser General Public License
1919
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
20+
*
2121
* For information on the complete list of contributors to the
2222
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2323
*/
@@ -78,6 +78,7 @@ class Input
7878
std::string cavityType() const { return type_; }
7979
bool scaling() const { return scaling_; }
8080
std::string radiiSet() const { return radiiSet_; }
81+
std::string radiiSetName() const { return radiiSetName_; }
8182
std::string mode() const { return mode_; }
8283
std::vector<int> atoms() const { return atoms_; }
8384
int atoms(size_t i) const { return atoms_[i]; }
@@ -165,6 +166,8 @@ class Input
165166
bool scaling_;
166167
/// The set of radii to be used
167168
std::string radiiSet_;
169+
/// Collects info on atomic radii set
170+
std::string radiiSetName_;
168171
/// Minimal radius of an added sphere
169172
double minimalRadius_;
170173
/// How the API should get the coordinates of the sphere centers

src/interface/Meddle.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/*
33
* PCMSolver, an API for the Polarizable Continuum Model
44
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
5+
*
66
* This file is part of PCMSolver.
7-
*
7+
*
88
* PCMSolver is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
12-
*
12+
*
1313
* PCMSolver is distributed in the hope that it will be useful,
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU Lesser General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU Lesser General Public License
1919
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
20+
*
2121
* For information on the complete list of contributors to the
2222
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2323
*/
@@ -178,6 +178,7 @@ namespace pcm {
178178
{
179179
TIMER_ON("Meddle::initInput");
180180
initInput(input_reading, nr_nuclei, charges, coordinates, symmetry_info, host_input);
181+
radiiSetName_ = input_.radiiSetName();
181182
TIMER_OFF("Meddle::initInput");
182183

183184
TIMER_ON("Meddle::initCavity");
@@ -378,6 +379,7 @@ namespace pcm {
378379
cavity_->saveCavity();
379380

380381
infoStream_ << "========== Cavity " << std::endl;
382+
infoStream_ << "Atomic radii set: " << radiiSetName_ << std::endl;
381383
infoStream_ << *cavity_;
382384
}
383385

@@ -458,20 +460,22 @@ namespace pcm {
458460
bool scaling = inp.scaling();
459461
std::string set = inp.radiiSet();
460462
double factor = angstromToBohr();
461-
std::vector<Atom> radiiSet, atoms;
463+
std::vector<Atom> radiiSet;
464+
std::vector<Atom> atoms;
462465
if ( set == "UFF" ) {
463466
radiiSet = initUFF();
464-
} else {
467+
} else if ( set == "BONDI" ) {
465468
radiiSet = initBondi();
469+
} else {
470+
radiiSet = initAllinger();
466471
}
467472
std::vector<Sphere> spheres;
468473
for (int i = 0; i < charges.size(); ++i) {
469474
int index = int(charges(i)) - 1;
470475
atoms.push_back(radiiSet[index]);
476+
if (scaling) atoms[index].radiusScaling = 1.2;
471477
double radius = radiiSet[index].radius * factor;
472-
if (scaling) {
473-
radius *= radiiSet[index].radiusScaling;
474-
}
478+
if (scaling) radius *= 1.2;
475479
spheres.push_back(Sphere(centers.col(i), radius));
476480
}
477481
Eigen::VectorXd masses = Eigen::VectorXd::Zero(nuclei);

src/interface/Meddle.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/*
33
* PCMSolver, an API for the Polarizable Continuum Model
44
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
5+
*
66
* This file is part of PCMSolver.
7-
*
7+
*
88
* PCMSolver is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
12-
*
12+
*
1313
* PCMSolver is distributed in the hope that it will be useful,
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU Lesser General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU Lesser General Public License
1919
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
20+
*
2121
* For information on the complete list of contributors to the
2222
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2323
*/
@@ -174,6 +174,8 @@ namespace pcm {
174174
bool hasDynamic_;
175175
/*! SurfaceFunction map */
176176
mutable SurfaceFunctionMap functions_;
177+
/*! Collects info on atomic radii set */
178+
std::string radiiSetName_;
177179
/*! Initialize input_ */
178180
void initInput(pcmsolver_reader_t input_reading, int nr_nuclei, double charges[], double coordinates[], int symmetry_info[], const PCMInput & host_input);
179181
/*! Initialize cavity_ */

0 commit comments

Comments
 (0)