Skip to content

[WIP] Tessellationless integration grid #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from

Conversation

robertodr
Copy link
Member

@robertodr robertodr commented Apr 2, 2017

Add the tessellationless integration grid for the PCM as described in Pomelli 2004

Description

The GePol algorithm is based on a partition of the spheres that involves the use of spherical polygons. The TsLess algorithm uses a different strategy for the partition of the spheres that makes away with the polygons altogether in favor of just points and weights.

How Has This Been Tested?

  • Comparison of the number of points, cavity surface and cavity volume with reference values. This is done for a single sphere, the HF and the NH3 molecules.
  • Comparison of the total surface charge calculated with CPCM and IEFPCM with the exact value from Gauss' theorem. . This is done for a single sphere and the NH3 molecules. TESTS CURRENTLY BROKEN
    • We can compare our Leopardi partitioning of the spheres with the original EQP code
  • Comparison of QM energies with those published in the original article.

Todos

  • Developer Interest
  • FCMangle.hpp header is used inside GePolCavity and TsLessCavity to handle name-mangling of Fortran backends.
  • Symmetry-handling in the TsLess Fortran backend.
  • Code duplication between the PEDRA and TsLess Fortran backends.
  • User-Facing for Release Notes
  • New cavity generator.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Questions

  • Should we make TsLess the new default algorithm for cavity generation?

Status

  • Ready to go

@MinazoBot
Copy link

606 Errors
🚫 Please rebase to get rid of the merge commits in this PR
🚫 Please limit commit subject line to 50 characters.
a310fc6
🚫 Please limit commit subject line to 50 characters.
c392bff
🚫 Please limit commit subject line to 50 characters.
dc9adcd
🚫 Please limit commit subject line to 50 characters.
671e758
🚫 Please limit commit subject line to 50 characters.
fb141c2
🚫 Please limit commit subject line to 50 characters.
491780e
🚫 Please limit commit subject line to 50 characters.
4b142ea
🚫 Please limit commit subject line to 50 characters.
8857799
🚫 Please limit commit subject line to 50 characters.
810ebb9
🚫 Please limit commit subject line to 50 characters.
cc7ddd0
🚫 Please limit commit subject line to 50 characters.
2b56ddf
🚫 Please limit commit subject line to 50 characters.
5d6b306
🚫 Please limit commit subject line to 50 characters.
c8907d2
🚫 Please limit commit subject line to 50 characters.
440fdc7
🚫 Please limit commit subject line to 50 characters.
0404ec1
🚫 Please limit commit subject line to 50 characters.
a127771
🚫 Please limit commit subject line to 50 characters.
6eed862
🚫 Please limit commit subject line to 50 characters.
f99a710
🚫 Please limit commit subject line to 50 characters.
1d53a58
🚫 Please limit commit subject line to 50 characters.
4fac5ac
🚫 Please limit commit subject line to 50 characters.
68b96af
🚫 Please limit commit subject line to 50 characters.
e529c4a
🚫 Please limit commit subject line to 50 characters.
28d83b5
🚫 Please limit commit subject line to 50 characters.
11dd160
🚫 Please limit commit subject line to 50 characters.
4fb2000
🚫 Please limit commit subject line to 50 characters.
e8b0291
🚫 Please limit commit subject line to 50 characters.
3f40314
🚫 Please limit commit subject line to 50 characters.
a416707
🚫 Please limit commit subject line to 50 characters.
c14a8d4
🚫 Please limit commit subject line to 50 characters.
fcf3802
🚫 Please limit commit subject line to 50 characters.
774b745
🚫 Please limit commit subject line to 50 characters.
f72a0f3
🚫 Please limit commit subject line to 50 characters.
3dacd53
🚫 Please limit commit subject line to 50 characters.
95ec237
🚫 Please limit commit subject line to 50 characters.
407b1bc
🚫 Please limit commit subject line to 50 characters.
788ae3f
🚫 Please limit commit subject line to 50 characters.
3b12bce
🚫 Please limit commit subject line to 50 characters.
852ae8c
🚫 Please limit commit subject line to 50 characters.
a569b1e
🚫 Please limit commit subject line to 50 characters.
fc98f62
🚫 Please limit commit subject line to 50 characters.
f64f788
🚫 Please limit commit subject line to 50 characters.
e6773d3
🚫 Please limit commit subject line to 50 characters.
51d2d45
🚫 Please limit commit subject line to 50 characters.
22c782b
🚫 Please limit commit subject line to 50 characters.
427559b
🚫 Please limit commit subject line to 50 characters.
57d29e4
🚫 Please limit commit subject line to 50 characters.
9bee8ec
🚫 Please limit commit subject line to 50 characters.
013377d
🚫 Please limit commit subject line to 50 characters.
630c657
🚫 Please limit commit subject line to 50 characters.
857ddd2
🚫 Please limit commit subject line to 50 characters.
f6c40ea
🚫 Please limit commit subject line to 50 characters.
d074e0e
🚫 Please limit commit subject line to 50 characters.
b513389
🚫 Please limit commit subject line to 50 characters.
790768e
🚫 Please limit commit subject line to 50 characters.
4e002b6
🚫 Please limit commit subject line to 50 characters.
cfb10e3
🚫 Please limit commit subject line to 50 characters.
98dadd9
🚫 Please limit commit subject line to 50 characters.
1cd88b9
🚫 Please limit commit subject line to 50 characters.
72aafcd
🚫 Please limit commit subject line to 50 characters.
aa94413
🚫 Please limit commit subject line to 50 characters.
1d66d91
🚫 Please limit commit subject line to 50 characters.
2bf99bc
🚫 Please limit commit subject line to 50 characters.
da30472
🚫 Please limit commit subject line to 50 characters.
e9aef84
🚫 Please limit commit subject line to 50 characters.
d08edf9
🚫 Please limit commit subject line to 50 characters.
ec7b9f2
🚫 Please limit commit subject line to 50 characters.
3bd92e8
🚫 Please limit commit subject line to 50 characters.
000d3a8
🚫 Please limit commit subject line to 50 characters.
05227de
🚫 Please limit commit subject line to 50 characters.
41b315d
🚫 Please limit commit subject line to 50 characters.
25eda6d
🚫 Please limit commit subject line to 50 characters.
414ff7b
🚫 Please limit commit subject line to 50 characters.
763ef19
🚫 Please limit commit subject line to 50 characters.
f67bfc7
🚫 Please limit commit subject line to 50 characters.
e648ec0
🚫 Please limit commit subject line to 50 characters.
030fd01
🚫 Please limit commit subject line to 50 characters.
047c67b
🚫 Please limit commit subject line to 50 characters.
cd53296
🚫 Please limit commit subject line to 50 characters.
eadf870
🚫 Please limit commit subject line to 50 characters.
b8db02b
🚫 Please limit commit subject line to 50 characters.
f30746b
🚫 Please limit commit subject line to 50 characters.
a58b320
🚫 Please limit commit subject line to 50 characters.
a0adc2c
🚫 Please limit commit subject line to 50 characters.
aef377c
🚫 Please limit commit subject line to 50 characters.
bb86887
🚫 Please limit commit subject line to 50 characters.
7f62b1a
🚫 Please limit commit subject line to 50 characters.
0bc2389
🚫 Please limit commit subject line to 50 characters.
e6220d8
🚫 Please limit commit subject line to 50 characters.
af506d1
🚫 Please limit commit subject line to 50 characters.
b354dd8
🚫 Please limit commit subject line to 50 characters.
0f3df4c
🚫 Please limit commit subject line to 50 characters.
aa27b96
🚫 Please limit commit subject line to 50 characters.
9a9261a
🚫 Please limit commit subject line to 50 characters.
9afbcef
🚫 Please limit commit subject line to 50 characters.
ae6381f
🚫 Please limit commit subject line to 50 characters.
db6840c
🚫 Please limit commit subject line to 50 characters.
5825a3f
🚫 Please limit commit subject line to 50 characters.
b0d0076
🚫 Please limit commit subject line to 50 characters.
dae9650
🚫 Please limit commit subject line to 50 characters.
f628841
🚫 Please limit commit subject line to 50 characters.
ade25f1
🚫 Please limit commit subject line to 50 characters.
076f092
🚫 Please limit commit subject line to 50 characters.
4c7112f
🚫 Please limit commit subject line to 50 characters.
46c86f2
🚫 Please limit commit subject line to 50 characters.
2c429e1
🚫 Please limit commit subject line to 50 characters.
bd85a55
🚫 Please limit commit subject line to 50 characters.
a555520
🚫 Please limit commit subject line to 50 characters.
784141b
🚫 Please limit commit subject line to 50 characters.
c060393
🚫 Please limit commit subject line to 50 characters.
e7a2103
🚫 Please limit commit subject line to 50 characters.
986be62
🚫 Please limit commit subject line to 50 characters.
c6b359b
🚫 Please limit commit subject line to 50 characters.
a6586ca
🚫 Please limit commit subject line to 50 characters.
dfe3b20
🚫 Please limit commit subject line to 50 characters.
802f8db
🚫 Please limit commit subject line to 50 characters.
775befa
🚫 Please limit commit subject line to 50 characters.
a8a5597
🚫 Please limit commit subject line to 50 characters.
54feb2c
🚫 Please limit commit subject line to 50 characters.
1cf2888
🚫 Please limit commit subject line to 50 characters.
b4f316a
🚫 Please limit commit subject line to 50 characters.
796d4bc
🚫 Please limit commit subject line to 50 characters.
3902181
🚫 Please limit commit subject line to 50 characters.
7942b06
🚫 Please limit commit subject line to 50 characters.
b596e86
🚫 Please limit commit subject line to 50 characters.
aa05e40
🚫 Please limit commit subject line to 50 characters.
62b6804
🚫 Please limit commit subject line to 50 characters.
039fb79
🚫 Please limit commit subject line to 50 characters.
e15a48a
🚫 Please limit commit subject line to 50 characters.
cfc3f69
🚫 Please limit commit subject line to 50 characters.
47eeaa7
🚫 Please limit commit subject line to 50 characters.
1c7790d
🚫 Please limit commit subject line to 50 characters.
74bbe79
🚫 Please limit commit subject line to 50 characters.
0f0462b
🚫 Please limit commit subject line to 50 characters.
89ced17
🚫 Please limit commit subject line to 50 characters.
a497714
🚫 Please limit commit subject line to 50 characters.
e4484e2
🚫 Please limit commit subject line to 50 characters.
1791f9a
🚫 Please limit commit subject line to 50 characters.
32eaebf
🚫 Please limit commit subject line to 50 characters.
7fd0c54
🚫 Please limit commit subject line to 50 characters.
f65bde9
🚫 Please limit commit subject line to 50 characters.
3a613ab
🚫 Please limit commit subject line to 50 characters.
24fd44a
🚫 Please limit commit subject line to 50 characters.
94f2663
🚫 Please limit commit subject line to 50 characters.
3d72d5b
🚫 Please limit commit subject line to 50 characters.
e81a560
🚫 Please limit commit subject line to 50 characters.
fc539a0
🚫 Please limit commit subject line to 50 characters.
08a29ad
🚫 Please limit commit subject line to 50 characters.
f477995
🚫 Please limit commit subject line to 50 characters.
dc45cdc
🚫 Please limit commit subject line to 50 characters.
74c77e7
🚫 Please limit commit subject line to 50 characters.
89f31b3
🚫 Please limit commit subject line to 50 characters.
4232f96
🚫 Please limit commit subject line to 50 characters.
599a9a3
🚫 Please separate subject from body with newline.
599a9a3
🚫 Please limit commit subject line to 50 characters.
752964a
🚫 Please limit commit subject line to 50 characters.
72892be
🚫 Please limit commit subject line to 50 characters.
dbea046
🚫 Please limit commit subject line to 50 characters.
39e0592
🚫 Please limit commit subject line to 50 characters.
80dc823
🚫 Please limit commit subject line to 50 characters.
308ecd7
🚫 Please limit commit subject line to 50 characters.
c6a770f
🚫 Please limit commit subject line to 50 characters.
aa77517
🚫 Please limit commit subject line to 50 characters.
05d0db3
🚫 Please limit commit subject line to 50 characters.
ccb42cc
🚫 Please limit commit subject line to 50 characters.
f769729
🚫 Please limit commit subject line to 50 characters.
6be8e59
🚫 Please limit commit subject line to 50 characters.
2af3aaf
🚫 Please limit commit subject line to 50 characters.
aa4c83b
🚫 Please limit commit subject line to 50 characters.
4a6997a
🚫 Please limit commit subject line to 50 characters.
065ce90
🚫 Please limit commit subject line to 50 characters.
c6a8d6b
🚫 Please limit commit subject line to 50 characters.
d686609
🚫 Please limit commit subject line to 50 characters.
9787c89
🚫 Please limit commit subject line to 50 characters.
6a101f7
🚫 Please limit commit subject line to 50 characters.
39d98e8
🚫 Please limit commit subject line to 50 characters.
e2e73db
🚫 Please limit commit subject line to 50 characters.
6261324
🚫 Please limit commit subject line to 50 characters.
c141af0
🚫 Please limit commit subject line to 50 characters.
004869a
🚫 Please limit commit subject line to 50 characters.
d0b5ef8
🚫 Please limit commit subject line to 50 characters.
45b8d71
🚫 Please limit commit subject line to 50 characters.
f2907a6
🚫 Please limit commit subject line to 50 characters.
bce7fe7
🚫 Please limit commit subject line to 50 characters.
d5996fd
🚫 Please limit commit subject line to 50 characters.
d5d29e9
🚫 Please limit commit subject line to 50 characters.
cdd916b
🚫 Please limit commit subject line to 50 characters.
d6bd668
🚫 Please limit commit subject line to 50 characters.
9f097bc
🚫 Please limit commit subject line to 50 characters.
7a9f118
🚫 Please limit commit subject line to 50 characters.
02be485
🚫 Please limit commit subject line to 50 characters.
ffb9034
🚫 Please limit commit subject line to 50 characters.
3b35a6c
🚫 Please limit commit subject line to 50 characters.
5e9b513
🚫 Please limit commit subject line to 50 characters.
ae68881
🚫 Please limit commit subject line to 50 characters.
709427a
🚫 Please limit commit subject line to 50 characters.
50ad926
🚫 Please limit commit subject line to 50 characters.
49bf6c9
🚫 Please limit commit subject line to 50 characters.
d6167f4
🚫 Please limit commit subject line to 50 characters.
2883080
🚫 Please limit commit subject line to 50 characters.
6ac157d
🚫 Please limit commit subject line to 50 characters.
f8dff4c
🚫 Please limit commit subject line to 50 characters.
e59b7c5
🚫 Please limit commit subject line to 50 characters.
bd0b05c
🚫 Please limit commit subject line to 50 characters.
58cbfec
🚫 Please limit commit subject line to 50 characters.
0036f21
🚫 Please limit commit subject line to 50 characters.
04d12ad
🚫 Please limit commit subject line to 50 characters.
88b1ab5
🚫 Please limit commit subject line to 50 characters.
10840b3
🚫 Please limit commit subject line to 50 characters.
24494f9
🚫 Please limit commit subject line to 50 characters.
75f4832
🚫 Please limit commit subject line to 50 characters.
c028f7a
🚫 Please limit commit subject line to 50 characters.
fbe639a
🚫 Please limit commit subject line to 50 characters.
8084e01
🚫 Please limit commit subject line to 50 characters.
7b4d2a5
🚫 Please limit commit subject line to 50 characters.
4d91e0b
🚫 Please limit commit subject line to 50 characters.
11b47da
🚫 Please limit commit subject line to 50 characters.
402e670
🚫 Please limit commit subject line to 50 characters.
8b8fc91
🚫 Please limit commit subject line to 50 characters.
f64d8f3
🚫 Please limit commit subject line to 50 characters.
3427c8a
🚫 Please limit commit subject line to 50 characters.
818c8fe
🚫 Please limit commit subject line to 50 characters.
70918e2
🚫 Please limit commit subject line to 50 characters.
b5b1a5f
🚫 Please limit commit subject line to 50 characters.
4c29e37
🚫 Please limit commit subject line to 50 characters.
4a3f7e3
🚫 Please limit commit subject line to 50 characters.
2d84386
🚫 Please limit commit subject line to 50 characters.
a1a4749
🚫 Please limit commit subject line to 50 characters.
9203e91
🚫 Please limit commit subject line to 50 characters.
41e1cd5
🚫 Please limit commit subject line to 50 characters.
a3bfb84
🚫 Please limit commit subject line to 50 characters.
0f3eba4
🚫 Please limit commit subject line to 50 characters.
c18ace9
🚫 Please limit commit subject line to 50 characters.
6243505
🚫 Please limit commit subject line to 50 characters.
9882e67
🚫 Please limit commit subject line to 50 characters.
e03b96a
🚫 Please limit commit subject line to 50 characters.
739121f
🚫 Please limit commit subject line to 50 characters.
9461432
🚫 Please limit commit subject line to 50 characters.
4d455a1
🚫 Please limit commit subject line to 50 characters.
7667780
🚫 Please limit commit subject line to 50 characters.
03a15df
🚫 Please limit commit subject line to 50 characters.
81cd5c3
🚫 Please limit commit subject line to 50 characters.
a57658b
🚫 Please limit commit subject line to 50 characters.
22ce782
🚫 Please limit commit subject line to 50 characters.
e35690f
🚫 Please limit commit subject line to 50 characters.
4129377
🚫 Please limit commit subject line to 50 characters.
0ea5f20
🚫 Please limit commit subject line to 50 characters.
083f176
🚫 Please limit commit subject line to 50 characters.
b0ba428
🚫 Please limit commit subject line to 50 characters.
3cf8ad3
🚫 Please limit commit subject line to 50 characters.
b93dce5
🚫 Please limit commit subject line to 50 characters.
2e04b00
🚫 Please limit commit subject line to 50 characters.
f25c3ac
🚫 Please limit commit subject line to 50 characters.
7902065
🚫 Please limit commit subject line to 50 characters.
b5a120f
🚫 Please limit commit subject line to 50 characters.
c07c1f4
🚫 Please limit commit subject line to 50 characters.
f11e96f
🚫 Please limit commit subject line to 50 characters.
3c7e916
🚫 Please limit commit subject line to 50 characters.
a12ad0b
🚫 Please limit commit subject line to 50 characters.
2f88467
🚫 Please limit commit subject line to 50 characters.
6177f34
🚫 Please limit commit subject line to 50 characters.
99f6065
🚫 Please limit commit subject line to 50 characters.
4685e0e
🚫 Please limit commit subject line to 50 characters.
d6e3916
🚫 Please limit commit subject line to 50 characters.
08b6259
🚫 Please limit commit subject line to 50 characters.
0a4f74a
🚫 Please limit commit subject line to 50 characters.
e55538e
🚫 Please limit commit subject line to 50 characters.
4ec4fec
🚫 Please limit commit subject line to 50 characters.
860360a
🚫 Please limit commit subject line to 50 characters.
7c4e6e1
🚫 Please limit commit subject line to 50 characters.
d6be8eb
🚫 Please limit commit subject line to 50 characters.
943f7b7
🚫 Please limit commit subject line to 50 characters.
bbeb199
🚫 Please limit commit subject line to 50 characters.
1f0f4a5
🚫 Please limit commit subject line to 50 characters.
65dd1d7
🚫 Please limit commit subject line to 50 characters.
282dbcb
🚫 Please limit commit subject line to 50 characters.
e301c8f
🚫 Please limit commit subject line to 50 characters.
1c904e9
🚫 Please limit commit subject line to 50 characters.
a7fd22a
🚫 Please limit commit subject line to 50 characters.
0e5ff86
🚫 Please limit commit subject line to 50 characters.
658266c
🚫 Please limit commit subject line to 50 characters.
96efb9d
🚫 Please limit commit subject line to 50 characters.
6afc2d0
🚫 Please limit commit subject line to 50 characters.
83fff2d
🚫 Please limit commit subject line to 50 characters.
6c897c0
🚫 Please limit commit subject line to 50 characters.
18c9130
🚫 Please limit commit subject line to 50 characters.
51c94ea
🚫 Please limit commit subject line to 50 characters.
8156e50
🚫 Please limit commit subject line to 50 characters.
9e0c8f6
🚫 Please limit commit subject line to 50 characters.
187fae3
🚫 Please limit commit subject line to 50 characters.
7dbf388
🚫 Please limit commit subject line to 50 characters.
aeb2194
🚫 Please limit commit subject line to 50 characters.
e23169d
🚫 Please limit commit subject line to 50 characters.
2de67f1
🚫 Please limit commit subject line to 50 characters.
0318ea5
🚫 Please limit commit subject line to 50 characters.
ed8fd4e
🚫 Please limit commit subject line to 50 characters.
7045ad8
🚫 Please limit commit subject line to 50 characters.
953749c
🚫 Please limit commit subject line to 50 characters.
724792d
🚫 Please limit commit subject line to 50 characters.
bbbfcd8
🚫 Please limit commit subject line to 50 characters.
fe43697
🚫 Please limit commit subject line to 50 characters.
0b7320e
🚫 Please limit commit subject line to 50 characters.
d705a6c
🚫 Please limit commit subject line to 50 characters.
063e95f
🚫 Please limit commit subject line to 50 characters.
3ba85cc
🚫 Please limit commit subject line to 50 characters.
3156f9e
🚫 Please limit commit subject line to 50 characters.
c32128d
🚫 Please limit commit subject line to 50 characters.
17c5c70
🚫 Please limit commit subject line to 50 characters.
205b840
🚫 Please limit commit subject line to 50 characters.
480b6ec
🚫 Please limit commit subject line to 50 characters.
07d9f2b
🚫 Please limit commit subject line to 50 characters.
e45e865
🚫 Please limit commit subject line to 50 characters.
2193d49
🚫 Please limit commit subject line to 50 characters.
414cc45
🚫 Please limit commit subject line to 50 characters.
0005b23
🚫 Please limit commit subject line to 50 characters.
a283b96
🚫 Please limit commit subject line to 50 characters.
cacd7c2
🚫 Please limit commit subject line to 50 characters.
05a5920
🚫 Please limit commit subject line to 50 characters.
90dd095
🚫 Please limit commit subject line to 50 characters.
79f938a
🚫 Please limit commit subject line to 50 characters.
424a8e8
🚫 Please limit commit subject line to 50 characters.
311a129
🚫 Please limit commit subject line to 50 characters.
1bbc209
🚫 Please limit commit subject line to 50 characters.
5cbc776
🚫 Please limit commit subject line to 50 characters.
882c1f7
🚫 Please use more than one word.
2327a06
🚫 Please limit commit subject line to 50 characters.
ff23705
🚫 Please limit commit subject line to 50 characters.
836bed0
🚫 Please limit commit subject line to 50 characters.
3f1995f
🚫 Please limit commit subject line to 50 characters.
26d1cf7
🚫 Please use more than one word.
e656a2b
🚫 Please limit commit subject line to 50 characters.
53473c6
🚫 Please limit commit subject line to 50 characters.
6c8a115
🚫 Please limit commit subject line to 50 characters.
bb000f7
🚫 Please limit commit subject line to 50 characters.
fbd7608
🚫 Please limit commit subject line to 50 characters.
3c11978
🚫 Please limit commit subject line to 50 characters.
521161e
🚫 Please limit commit subject line to 50 characters.
0bb5896
🚫 Please limit commit subject line to 50 characters.
863b942
⚠️ Danger found 606 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 339.
2 Warnings
⚠️ PR is classed as Work in Progress
⚠️ Consider adding supporting documentation to this change. Documentation sources can be found in the doc directory.

Code Style Check


Code style violations detected in the following files:

  • src/cavity/GePolCavity.cpp

  • src/cavity/TsLessCavity.cpp

  • src/cavity/TsLessCavity.hpp

  • tests/TestingMolecules.hpp

  • tests/cpcm/cpcm_tsless-NH3.cpp

  • tests/cpcm/cpcm_tsless-point.cpp

  • tests/iefpcm/iefpcm_tsless-NH3.cpp

  • tests/iefpcm/iefpcm_tsless-point.cpp

  • tests/tsless/tsless_HF.cpp

  • tests/tsless/tsless_NH3.cpp

  • tests/tsless/tsless_point.cpp

Execute one of the following actions and commit again:

  1. Run clang-format on the offending files
  2. Apply the suggested patches with git apply patch.

src/cavity/GePolCavity.cpp

--- src/cavity/GePolCavity.cpp
+++ src/cavity/GePolCavity.cpp
@@ -81,9 +81,12 @@
                         int maxsph,
                         int maxvert) {
 
-  // This is a wrapper for the generatecavity_cpp function defined in the Fortran code PEDRA.
-  // Here we allocate the necessary arrays to be passed to PEDRA, in particular we allow
-  // for the insertion of additional spheres as in the most general formulation of the
+  // This is a wrapper for the generatecavity_cpp function defined in the Fortran
+  // code PEDRA.
+  // Here we allocate the necessary arrays to be passed to PEDRA, in particular we
+  // allow
+  // for the insertion of additional spheres as in the most general formulation of
+  // the
   // GePol algorithm.
 
   double * xtscor = new double[maxts];
@@ -171,38 +174,38 @@
   // Go PEDRA, Go!
   TIMER_ON("GePolCavity::generatecavity_cpp");
   pedra_driver(&maxts,
-                     &maxsph,
-                     &maxvert,
-                     xtscor,
-                     ytscor,
-                     ztscor,
-                     ar,
-                     xsphcor,
-                     ysphcor,
-                     zsphcor,
-                     rsph,
-                     &nts,
-                     &ntsirr,
-                     &nSpheres_,
-                     &addedSpheres,
-                     xe,
-                     ye,
-                     ze,
-                     rin,
-                     mass,
-                     &averageArea,
-                     &probeRadius,
-                     &minimalRadius,
-                     &nr_gen,
-                     &gen1,
-                     &gen2,
-                     &gen3,
-                     nvert,
-                     vert,
-                     centr,
-                     isphe,
-                     pedra.str().c_str(),
-                     &len_f_pedra);
+               &maxsph,
+               &maxvert,
+               xtscor,
+               ytscor,
+               ztscor,
+               ar,
+               xsphcor,
+               ysphcor,
+               zsphcor,
+               rsph,
+               &nts,
+               &ntsirr,
+               &nSpheres_,
+               &addedSpheres,
+               xe,
+               ye,
+               ze,
+               rin,
+               mass,
+               &averageArea,
+               &probeRadius,
+               &minimalRadius,
+               &nr_gen,
+               &gen1,
+               &gen2,
+               &gen3,
+               nvert,
+               vert,
+               centr,
+               isphe,
+               pedra.str().c_str(),
+               &len_f_pedra);
   TIMER_OFF("GePolCavity::generatecavity_cpp");
 
   // The "intensive" part of updating the spheres related class data members will be
@@ -413,7 +416,7 @@
     os << boost::format("      %s") % "Du";
     os << boost::format("%9.4f") % (sphereRadius_(idx) * bohrToAngstrom());
     os << boost::format("   %1.2f   ") % 1.00;
-    os << boost::format("%10.6f  ")  % (sphereCenter_(0, idx) * bohrToAngstrom());
+    os << boost::format("%10.6f  ") % (sphereCenter_(0, idx) * bohrToAngstrom());
     os << boost::format(" %10.6f  ") % (sphereCenter_(1, idx) * bohrToAngstrom());
     os << boost::format(" %10.6f  ") % (sphereCenter_(2, idx) * bohrToAngstrom());
     os << std::endl;

src/cavity/TsLessCavity.cpp

--- src/cavity/TsLessCavity.cpp
+++ src/cavity/TsLessCavity.cpp
@@ -41,11 +41,11 @@
 namespace pcm {
 namespace cavity {
 TsLessCavity::TsLessCavity(const Molecule & molec,
-             double a,
-             double pr,
-             double minR,
-             double minD,
-             int der)
+                           double a,
+                           double pr,
+                           double minR,
+                           double minD,
+                           int der)
     : ICavity(molec),
       averageArea_(a),
       probeRadius_(pr),
@@ -58,11 +58,11 @@
 }
 
 TsLessCavity::TsLessCavity(const Sphere & sph,
-             double a,
-             double pr,
-             double minR,
-             double minD,
-             int der)
+                           double a,
+                           double pr,
+                           double minR,
+                           double minD,
+                           int der)
     : ICavity(sph),
       averageArea_(a),
       probeRadius_(pr),
@@ -75,11 +75,11 @@
 }
 
 TsLessCavity::TsLessCavity(const std::vector<Sphere> & sph,
-             double a,
-             double pr,
-             double minR,
-             double minD,
-             int der)
+                           double a,
+                           double pr,
+                           double minR,
+                           double minD,
+                           int der)
     : ICavity(sph),
       averageArea_(a),
       probeRadius_(pr),
@@ -91,183 +91,219 @@
   TIMER_OFF("TsLessCavity::build from list of spheres");
 }
 
-void TsLessCavity::build(int maxts, int maxsph, int maxvert)
-{
-    // This is a wrapper for the generatecavity_cpp_ function defined in the Fortran code TsLess.
-    // Here we allocate the necessary arrays to be passed to TsLess, in particular we allow
-    // for the insertion of additional spheres as in the most general formulation of the
-    // GePol algorithm.
-
-    int lwork = maxts*maxsph;
-    double * xtscor  = new double[maxts];
-    double * ytscor  = new double[maxts];
-    double * ztscor  = new double[maxts];
-    double * ar      = new double[maxts];
-    double * xsphcor = new double[maxts];
-    double * ysphcor = new double[maxts];
-    double * zsphcor = new double[maxts];
-    double * rsph    = new double[maxts];
-    double * work    = new double[lwork];
-
-    // Clean-up possible heap-crap
-    std::fill_n(xtscor, maxts, 0.0);
-    std::fill_n(ytscor, maxts, 0.0);
-    std::fill_n(ztscor, maxts, 0.0);
-    std::fill_n(ar, maxts, 0.0);
-    std::fill_n(xsphcor, maxts, 0.0);
-    std::fill_n(ysphcor, maxts, 0.0);
-    std::fill_n(zsphcor, maxts, 0.0);
-    std::fill_n(rsph, maxts, 0.0);
-    std::fill_n(work, lwork, 0.0);
-
-    int nts = 0;
-    int ntsirr = 0;
-
-    // If there's an overflow in the number of spheres TsLess will die.
-    // The maximum number of spheres in PEDRA is set to 200 (primitive+additional)
-    // so the integer here declared is just to have enough space C++ side to pass everything back.
-    int maxAddedSpheres = 200;
-
-    // maximum number of spheres we allow the algorithm to add to our original set.
-    // If this number is exceeded, then the algorithm crashes (should look into this...)
-    // After the cavity is generated we will update ALL the class data members, both related
-    // to spheres and finite elements so that the cavity is fully formed.
-
-    Eigen::VectorXd xv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
-    Eigen::VectorXd yv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
-    Eigen::VectorXd zv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
-    Eigen::VectorXd radii_scratch = Eigen::VectorXd::Zero(nSpheres_ +
-                                    maxAddedSpheres); // Not to be confused with the data member inherited from Cavity!!!
-
-    for ( int i = 0; i < nSpheres_; ++i ) {
-        for ( int j = 0; j < 3; ++j ) {
-            xv(i) = sphereCenter_(0, i);
-            yv(i) = sphereCenter_(1, i);
-            zv(i) = sphereCenter_(2, i);
-        }
-        radii_scratch(i) = sphereRadius_(i);
+void TsLessCavity::build(int maxts, int maxsph, int maxvert) {
+  // This is a wrapper for the generatecavity_cpp_ function defined in the Fortran
+  // code TsLess.
+  // Here we allocate the necessary arrays to be passed to TsLess, in particular we
+  // allow
+  // for the insertion of additional spheres as in the most general formulation of
+  // the
+  // GePol algorithm.
+
+  int lwork = maxts * maxsph;
+  double * xtscor = new double[maxts];
+  double * ytscor = new double[maxts];
+  double * ztscor = new double[maxts];
+  double * ar = new double[maxts];
+  double * xsphcor = new double[maxts];
+  double * ysphcor = new double[maxts];
+  double * zsphcor = new double[maxts];
+  double * rsph = new double[maxts];
+  double * work = new double[lwork];
+
+  // Clean-up possible heap-crap
+  std::fill_n(xtscor, maxts, 0.0);
+  std::fill_n(ytscor, maxts, 0.0);
+  std::fill_n(ztscor, maxts, 0.0);
+  std::fill_n(ar, maxts, 0.0);
+  std::fill_n(xsphcor, maxts, 0.0);
+  std::fill_n(ysphcor, maxts, 0.0);
+  std::fill_n(zsphcor, maxts, 0.0);
+  std::fill_n(rsph, maxts, 0.0);
+  std::fill_n(work, lwork, 0.0);
+
+  int nts = 0;
+  int ntsirr = 0;
+
+  // If there's an overflow in the number of spheres TsLess will die.
+  // The maximum number of spheres in PEDRA is set to 200 (primitive+additional)
+  // so the integer here declared is just to have enough space C++ side to pass
+  // everything back.
+  int maxAddedSpheres = 200;
+
+  // maximum number of spheres we allow the algorithm to add to our original set.
+  // If this number is exceeded, then the algorithm crashes (should look into
+  // this...)
+  // After the cavity is generated we will update ALL the class data members, both
+  // related
+  // to spheres and finite elements so that the cavity is fully formed.
+
+  Eigen::VectorXd xv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
+  Eigen::VectorXd yv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
+  Eigen::VectorXd zv = Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres);
+  Eigen::VectorXd radii_scratch =
+      Eigen::VectorXd::Zero(nSpheres_ + maxAddedSpheres); // Not to be confused with
+                                                          // the data member
+                                                          // inherited from Cavity!!!
+
+  for (int i = 0; i < nSpheres_; ++i) {
+    for (int j = 0; j < 3; ++j) {
+      xv(i) = sphereCenter_(0, i);
+      yv(i) = sphereCenter_(1, i);
+      zv(i) = sphereCenter_(2, i);
     }
+    radii_scratch(i) = sphereRadius_(i);
+  }
 
-    double * xe = xv.data();
-    double * ye = yv.data();
-    double * ze = zv.data();
-
-    double *rin = radii_scratch.data();
-    double * mass = new double[molecule_.nAtoms()];
-    for (size_t i = 0; i < molecule_.nAtoms(); ++i) {
-	    mass[i] = molecule_.masses(i);
-    }
+  double * xe = xv.data();
+  double * ye = yv.data();
+  double * ze = zv.data();
+
+  double * rin = radii_scratch.data();
+  double * mass = new double[molecule_.nAtoms()];
+  for (size_t i = 0; i < molecule_.nAtoms(); ++i) {
+    mass[i] = molecule_.masses(i);
+  }
 
-    addedSpheres = 0;
-    // Number of generators and generators of the point group
-    int nr_gen = molecule_.pointGroup().nrGenerators();
-    int gen1 = molecule_.pointGroup().generators(0);
-    int gen2 = molecule_.pointGroup().generators(1);
-    int gen3 = molecule_.pointGroup().generators(2);
-
-    int weightFunction = 1;
-    // Go TsLess, Go!
-    TIMER_ON("TsLessCavity::tsless_driver");
-    tsless_driver(&maxts, &maxsph, &maxvert, &nSpheres_, &nts, &ntsirr, &addedSpheres,
-                  xtscor, ytscor, ztscor, ar,
-                  xsphcor, ysphcor, zsphcor, rsph,
-                  xe, ye, ze, rin, mass,
-                  &nr_gen, &gen1, &gen2, &gen3,
-                  &averageArea_, &minDistance_, &derOrder_, &weightFunction, &probeRadius_, work);
-    TIMER_OFF("TsLessCavity::tsless_driver");
-
-    // The "intensive" part of updating the spheres related class data members will be of course
-    // executed iff addedSpheres != 0
-    if (addedSpheres != 0) {
-        // Save the number of original spheres
-        int orig = nSpheres_;
-        // Update the nSpheres
-        nSpheres_ += addedSpheres;
-        // Resize sphereRadius and sphereCenter...
-        sphereRadius_.resize(nSpheres_);
-        sphereCenter_.resize(Eigen::NoChange, nSpheres_);
-        // Transfer radii and centers.
-        // Eigen has no push_back function, so we need to traverse all the spheres...
-        sphereRadius_ = radii_scratch.head(nSpheres_);
-        for ( int i = 0; i < nSpheres_; ++i ) {
-            sphereCenter_(0, i) = xv(i);
-            sphereCenter_(1, i) = yv(i);
-            sphereCenter_(2, i) = zv(i);
-        }
-        // Now grow the vector<Sphere> containing the list of spheres
-        for ( int i = orig;  i < nSpheres_; ++i ) {
-            spheres_.push_back(Sphere(sphereCenter_.col(i), sphereRadius_(i)));
-        }
+  addedSpheres = 0;
+  // Number of generators and generators of the point group
+  int nr_gen = molecule_.pointGroup().nrGenerators();
+  int gen1 = molecule_.pointGroup().generators(0);
+  int gen2 = molecule_.pointGroup().generators(1);
+  int gen3 = molecule_.pointGroup().generators(2);
+
+  int weightFunction = 1;
+  // Go TsLess, Go!
+  TIMER_ON("TsLessCavity::tsless_driver");
+  tsless_driver(&maxts,
+                &maxsph,
+                &maxvert,
+                &nSpheres_,
+                &nts,
+                &ntsirr,
+                &addedSpheres,
+                xtscor,
+                ytscor,
+                ztscor,
+                ar,
+                xsphcor,
+                ysphcor,
+                zsphcor,
+                rsph,
+                xe,
+                ye,
+                ze,
+                rin,
+                mass,
+                &nr_gen,
+                &gen1,
+                &gen2,
+                &gen3,
+                &averageArea_,
+                &minDistance_,
+                &derOrder_,
+                &weightFunction,
+                &probeRadius_,
+                work);
+  TIMER_OFF("TsLessCavity::tsless_driver");
+
+  // The "intensive" part of updating the spheres related class data members will be
+  // of course
+  // executed iff addedSpheres != 0
+  if (addedSpheres != 0) {
+    // Save the number of original spheres
+    int orig = nSpheres_;
+    // Update the nSpheres
+    nSpheres_ += addedSpheres;
+    // Resize sphereRadius and sphereCenter...
+    sphereRadius_.resize(nSpheres_);
+    sphereCenter_.resize(Eigen::NoChange, nSpheres_);
+    // Transfer radii and centers.
+    // Eigen has no push_back function, so we need to traverse all the spheres...
+    sphereRadius_ = radii_scratch.head(nSpheres_);
+    for (int i = 0; i < nSpheres_; ++i) {
+      sphereCenter_(0, i) = xv(i);
+      sphereCenter_(1, i) = yv(i);
+      sphereCenter_(2, i) = zv(i);
     }
-
-    nElements_ = static_cast<int>(nts);
-    nIrrElements_ = static_cast<int>(ntsirr);
-    elementCenter_.resize(Eigen::NoChange, nElements_);
-    elementSphereCenter_.resize(Eigen::NoChange, nElements_);
-    elementNormal_.resize(Eigen::NoChange, nElements_);
-    elementArea_.resize(nElements_);
-    elementRadius_.resize(nElements_);
-    for( int i = 0; i < nElements_; ++i ) {
-        elementCenter_(0,i) = xtscor[i];
-        elementCenter_(1,i) = ytscor[i];
-        elementCenter_(2,i) = ztscor[i];
-        elementArea_(i) = ar[i];
-        elementSphereCenter_(0,i) = xsphcor[i];
-        elementSphereCenter_(1,i) = ysphcor[i];
-        elementSphereCenter_(2,i) = zsphcor[i];
-        elementRadius_(i) = rsph[i];
+    // Now grow the vector<Sphere> containing the list of spheres
+    for (int i = orig; i < nSpheres_; ++i) {
+      spheres_.push_back(Sphere(sphereCenter_.col(i), sphereRadius_(i)));
     }
+  }
 
-    elementNormal_ = elementCenter_ - elementSphereCenter_;
-    for( int i = 0; i < nElements_; ++i) {
-        elementNormal_.col(i) /= elementNormal_.col(i).norm();
-    }
+  nElements_ = static_cast<int>(nts);
+  nIrrElements_ = static_cast<int>(ntsirr);
+  elementCenter_.resize(Eigen::NoChange, nElements_);
+  elementSphereCenter_.resize(Eigen::NoChange, nElements_);
+  elementNormal_.resize(Eigen::NoChange, nElements_);
+  elementArea_.resize(nElements_);
+  elementRadius_.resize(nElements_);
+  for (int i = 0; i < nElements_; ++i) {
+    elementCenter_(0, i) = xtscor[i];
+    elementCenter_(1, i) = ytscor[i];
+    elementCenter_(2, i) = ztscor[i];
+    elementArea_(i) = ar[i];
+    elementSphereCenter_(0, i) = xsphcor[i];
+    elementSphereCenter_(1, i) = ysphcor[i];
+    elementSphereCenter_(2, i) = zsphcor[i];
+    elementRadius_(i) = rsph[i];
+  }
 
-    // Fill elements_ vector
-    for (int i = 0; i < nElements_; ++i) {
-        bool irr = false;
-        int nv = 1; // TsLess does not generate spherical polygons!!
-        // TsLess puts the irreducible tesserae first (? Check with Cris!)
-        if (i < nIrrElements_) irr = true;
-        Sphere sph(elementSphereCenter_.col(i), elementRadius_(i));
-        Eigen::Matrix3Xd vertices, arcs;
-        vertices.resize(Eigen::NoChange, nv);
-        arcs.resize(Eigen::NoChange, nv);
-        // FIXME index of the sphere the element belongs to
-        elements_.push_back(Element(nv, 0,
-                    elementArea_(i),
-                    elementCenter_.col(i),
-                    elementNormal_.col(i),
-                    irr, sph,
-                    vertices, arcs));
-    }
+  elementNormal_ = elementCenter_ - elementSphereCenter_;
+  for (int i = 0; i < nElements_; ++i) {
+    elementNormal_.col(i) /= elementNormal_.col(i).norm();
+  }
 
-    delete[] xtscor;
-    delete[] ytscor;
-    delete[] ztscor;
-    delete[] ar;
-    delete[] xsphcor;
-    delete[] ysphcor;
-    delete[] zsphcor;
-    delete[] rsph;
-    delete[] work;
-    delete[] mass;
+  // Fill elements_ vector
+  for (int i = 0; i < nElements_; ++i) {
+    bool irr = false;
+    int nv = 1; // TsLess does not generate spherical polygons!!
+    // TsLess puts the irreducible tesserae first (? Check with Cris!)
+    if (i < nIrrElements_)
+      irr = true;
+    Sphere sph(elementSphereCenter_.col(i), elementRadius_(i));
+    Eigen::Matrix3Xd vertices, arcs;
+    vertices.resize(Eigen::NoChange, nv);
+    arcs.resize(Eigen::NoChange, nv);
+    // FIXME index of the sphere the element belongs to
+    elements_.push_back(Element(nv,
+                                0,
+                                elementArea_(i),
+                                elementCenter_.col(i),
+                                elementNormal_.col(i),
+                                irr,
+                                sph,
+                                vertices,
+                                arcs));
+  }
 
-    built = true;
+  delete[] xtscor;
+  delete[] ytscor;
+  delete[] ztscor;
+  delete[] ar;
+  delete[] xsphcor;
+  delete[] ysphcor;
+  delete[] zsphcor;
+  delete[] rsph;
+  delete[] work;
+  delete[] mass;
 
+  built = true;
 }
 
-std::ostream & TsLessCavity::printCavity(std::ostream & os)
-{
-    os << "Cavity type: TsLess" << std::endl;
-    os << "Average point weight = " << averageArea_ << " AU^2" << std::endl;
-    os << "Minimal distance between sampling points = " << minDistance_ << " AU" << std::endl;
-    os << "Switch function is of class C^" << derOrder_ << std::endl;
-    os << "Addition of extra spheres enabled" << std::endl;
-    os << "Probe radius = " << probeRadius_ << " AU" << std::endl;
-    os << "Number of spheres = " << nSpheres_ << " [initial = " << nSpheres_ -
-       addedSpheres << "; added = " << addedSpheres << "]" << std::endl;
-    os << "Number of finite elements = " << nElements_;
+std::ostream & TsLessCavity::printCavity(std::ostream & os) {
+  os << "Cavity type: TsLess" << std::endl;
+  os << "Average point weight = " << averageArea_ << " AU^2" << std::endl;
+  os << "Minimal distance between sampling points = " << minDistance_ << " AU"
+     << std::endl;
+  os << "Switch function is of class C^" << derOrder_ << std::endl;
+  os << "Addition of extra spheres enabled" << std::endl;
+  os << "Probe radius = " << probeRadius_ << " AU" << std::endl;
+  os << "Number of spheres = " << nSpheres_
+     << " [initial = " << nSpheres_ - addedSpheres << "; added = " << addedSpheres
+     << "]" << std::endl;
+  os << "Number of finite elements = " << nElements_;
   os << "Number of irreducible finite elements = " << nIrrElements_ << std::endl;
   os << "============ Spheres list (in Angstrom)" << std::endl;
   os << " Sphere   on   Radius   Alpha       X            Y            Z     \n";
@@ -291,17 +327,21 @@
     os << boost::format("      %s") % "Du";
     os << boost::format("%9.4f") % (sphereRadius_(idx) * bohrToAngstrom());
     os << boost::format("   %1.2f   ") % 1.00;
-    os << boost::format("%10.6f  ")  % (sphereCenter_(0, idx) * bohrToAngstrom());
+    os << boost::format("%10.6f  ") % (sphereCenter_(0, idx) * bohrToAngstrom());
     os << boost::format(" %10.6f  ") % (sphereCenter_(1, idx) * bohrToAngstrom());
     os << boost::format(" %10.6f  ") % (sphereCenter_(2, idx) * bohrToAngstrom());
     os << std::endl;
   }
-    return os;
+  return os;
 }
 
 ICavity * createTsLessCavity(const CavityData & data) {
-  return new TsLessCavity(data.molecule, data.area, data.probeRadius, data.minimalRadius,
-                                data.minDistance, data.derOrder);
+  return new TsLessCavity(data.molecule,
+                          data.area,
+                          data.probeRadius,
+                          data.minimalRadius,
+                          data.minDistance,
+                          data.derOrder);
 }
 } // namespace cavity
 } // namespace pcm

src/cavity/TsLessCavity.hpp

--- src/cavity/TsLessCavity.hpp
+++ src/cavity/TsLessCavity.hpp
@@ -105,13 +105,20 @@
  *  \param[out] ytscor y-coordinate of tesserae centers (dimension maxts)
  *  \param[out] ztscor z-coordinate of tesserae centers (dimension maxts)
  *  \param[out] ar area of the tessera (dimension maxts)
- *  \param[out] xsphcor x-coordinate of the sphere center the tessera belongs to (dimension maxts)
- *  \param[out] ysphcor y-coordinate of the sphere center the tessera belongs to (dimension maxts)
- *  \param[out] zsphcor z-coordinate of the sphere center the tessera belongs to (dimension maxts)
- *  \param[out] rsph radii of the sphere the tessera belongs to, i.e. its curvature (dimension maxts)
- *  \param[out] xe x-coordinate of the sphere center (dimension nSpheres_ + maxAddedSpheres)
- *  \param[out] ye y-coordinate of the sphere center (dimension nSpheres_ + maxAddedSpheres)
- *  \param[out] ze z-coordinate of the sphere center (dimension nSpheres_ + maxAddedSpheres)
+ *  \param[out] xsphcor x-coordinate of the sphere center the tessera belongs to
+ * (dimension maxts)
+ *  \param[out] ysphcor y-coordinate of the sphere center the tessera belongs to
+ * (dimension maxts)
+ *  \param[out] zsphcor z-coordinate of the sphere center the tessera belongs to
+ * (dimension maxts)
+ *  \param[out] rsph radii of the sphere the tessera belongs to, i.e. its curvature
+ * (dimension maxts)
+ *  \param[out] xe x-coordinate of the sphere center (dimension nSpheres_ +
+ * maxAddedSpheres)
+ *  \param[out] ye y-coordinate of the sphere center (dimension nSpheres_ +
+ * maxAddedSpheres)
+ *  \param[out] ze z-coordinate of the sphere center (dimension nSpheres_ +
+ * maxAddedSpheres)
  *  \param[out] rin radius of the spheres (dimension nSpheres_ + maxAddedSpheres)
  *  \param[in] masses atomic masses (for inertia tensor formation in TSLESS)
  *  \param[in] nr_gen number of symmetry generators
@@ -121,20 +128,44 @@
  *  \param[in] avgArea average tesserae area
  *  \param[in] dmin mininal distance between sampling points
  *  \param[in] nord maximum order of continuous derivative of weight function
- *  \param[in] ifun whether to use the normalized or unnormalized form of the weight function
+ *  \param[in] ifun whether to use the normalized or unnormalized form of the weight
+ * function
  *  \param[in] rsolv solvent probe radius
  *  \param[in] work scratch space
  */
-#define tsless_driver \
-    FortranCInterface_MODULE_(tsless_cavity, tsless_driver, TSLESS_CAVITY, TSLESS_DRIVER)
-extern "C" void tsless_driver(int * maxts, int * maxsph, int * maxvert,
-        int * nesfp, int * nts, int * ntsirr, int * addsph,
-        double * xtscor, double * ytscor, double * ztscor, double * ar,
-        double * xsphcor, double * ysphcor, double * zsphcor, double * rsph,
-        double * xe, double * ye, double * ze, double * rin, double * masses,
-        int * nr_gen, int * gen1, int * gen2, int * gen3,
-        double * avgArea, double * dmin, int * nord, int * ifun, double * rsolv,
-        double * work);
+#define tsless_driver                                                               \
+  FortranCInterface_MODULE_(                                                        \
+      tsless_cavity, tsless_driver, TSLESS_CAVITY, TSLESS_DRIVER)
+extern "C" void tsless_driver(int * maxts,
+                              int * maxsph,
+                              int * maxvert,
+                              int * nesfp,
+                              int * nts,
+                              int * ntsirr,
+                              int * addsph,
+                              double * xtscor,
+                              double * ytscor,
+                              double * ztscor,
+                              double * ar,
+                              double * xsphcor,
+                              double * ysphcor,
+                              double * zsphcor,
+                              double * rsph,
+                              double * xe,
+                              double * ye,
+                              double * ze,
+                              double * rin,
+                              double * masses,
+                              int * nr_gen,
+                              int * gen1,
+                              int * gen2,
+                              int * gen3,
+                              double * avgArea,
+                              double * dmin,
+                              int * nord,
+                              int * ifun,
+                              double * rsolv,
+                              double * work);
 
 ICavity * createTsLessCavity(const CavityData & data);
 } // namespace cavity

tests/TestingMolecules.hpp

--- tests/TestingMolecules.hpp
+++ tests/TestingMolecules.hpp
@@ -127,34 +127,32 @@
   return dummy;
 };
 
-Molecule HF()
-{
-    int nAtoms = 2;
-
-    Eigen::Vector3d F(0.000000000, 0.00000000,  0.08729478);
-    Eigen::Vector3d H(0.000000000, 0.00000000, -1.64558444);
-
-    Eigen::MatrixXd geom(3, nAtoms);
-    geom.col(0) = F.transpose();
-    geom.col(1) = H.transpose();
-    Eigen::Vector2d charges, masses;
-    charges << 9.0, 1.0;
-    masses  << 18.9984030, 1.0078250;
-    std::vector<Atom> atoms;
-    atoms.push_back( Atom("Fluorine",     "F",   charges(0), masses(0), 2.777897403, F, 1.0) );
-    atoms.push_back( Atom("Hydrogen", "H", charges(1), masses(1), 2.267671349, H,
-                          1.0) );
-
-    std::vector<Sphere> spheres;
-    Sphere sph1(F, 2.777897403);
-    Sphere sph2(H, 2.267671349);
-    spheres.push_back(sph1);
-    spheres.push_back(sph2);
+Molecule HF() {
+  int nAtoms = 2;
 
-    // C1
-    Symmetry pGroup = buildGroup(0, 0, 0, 0);
+  Eigen::Vector3d F(0.000000000, 0.00000000, 0.08729478);
+  Eigen::Vector3d H(0.000000000, 0.00000000, -1.64558444);
 
-    return Molecule(nAtoms, charges, masses, geom, atoms, spheres, pGroup);
+  Eigen::MatrixXd geom(3, nAtoms);
+  geom.col(0) = F.transpose();
+  geom.col(1) = H.transpose();
+  Eigen::Vector2d charges, masses;
+  charges << 9.0, 1.0;
+  masses << 18.9984030, 1.0078250;
+  std::vector<Atom> atoms;
+  atoms.push_back(Atom("Fluorine", "F", charges(0), masses(0), 2.777897403, F, 1.0));
+  atoms.push_back(Atom("Hydrogen", "H", charges(1), masses(1), 2.267671349, H, 1.0));
+
+  std::vector<Sphere> spheres;
+  Sphere sph1(F, 2.777897403);
+  Sphere sph2(H, 2.267671349);
+  spheres.push_back(sph1);
+  spheres.push_back(sph2);
+
+  // C1
+  Symmetry pGroup = buildGroup(0, 0, 0, 0);
+
+  return Molecule(nAtoms, charges, masses, geom, atoms, spheres, pGroup);
 };
 
 Molecule NH3() {

tests/cpcm/cpcm_tsless-NH3.cpp

--- tests/cpcm/cpcm_tsless-NH3.cpp
+++ tests/cpcm/cpcm_tsless-NH3.cpp
@@ -27,15 +27,15 @@
 
 #include <Eigen/Core>
 
+#include "TestingMolecules.hpp"
 #include "bi_operators/Collocation.hpp"
-#include "green/DerivativeTypes.hpp"
 #include "cavity/TsLessCavity.hpp"
-#include "utils/Molecule.hpp"
-#include "green/Vacuum.hpp"
+#include "green/DerivativeTypes.hpp"
 #include "green/UniformDielectric.hpp"
+#include "green/Vacuum.hpp"
 #include "solver/CPCMSolver.hpp"
+#include "utils/Molecule.hpp"
 #include "utils/Symmetry.hpp"
-#include "TestingMolecules.hpp"
 
 using namespace pcm;
 using bi_operators::Collocation;
@@ -47,39 +47,40 @@
 /*! \class CPCMSolver
  *  \test \b NH3TsLess tests CPCMSolver using ammonia and a TsLess cavity
  */
-TEST_CASE("Test solver for the C-PCM with NH3 molecule and a TsLess cavity", "[solver][cpcm][cpcm_tsless-NH3]")
-{
-    Molecule molec = NH3();
-
-    double area = 0.08;
-    double minDistance = 0.1;
-    double probeRadius = 0.0;
-    int derOrder = 8;
-    double minRadius = 100.0;
-    TsLessCavity cavity = TsLessCavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
-
-    double permittivity = 78.39;
-    Vacuum<> gfInside;
-    UniformDielectric<> gfOutside(permittivity);
-    bool symm = true;
-    double correction = 0.0;
-
-    Collocation S;
-
-    CPCMSolver solver(symm, correction);
-    solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
-
-    double Ncharge = 7.0;
-    double Hcharge = 1.0;
-    size_t size = cavity.size();
-    Eigen::VectorXd fake_mep = computeMEP(molec, cavity.elements());
-    // The total ASC for a conductor is -Q
-    // for CPCM it will be -Q*[(epsilon-1)/epsilon + correction]
-    Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-    fake_asc = solver.computeCharge(fake_mep);
-    double totalASC = - (Ncharge + 3.0 * Hcharge) * (permittivity - 1) /
-                      (permittivity + correction);
-    double totalFakeASC = fake_asc.sum();
-    CAPTURE(totalASC - totalFakeASC);
-    REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+TEST_CASE("Test solver for the C-PCM with NH3 molecule and a TsLess cavity",
+          "[solver][cpcm][cpcm_tsless-NH3]") {
+  Molecule molec = NH3();
+
+  double area = 0.08;
+  double minDistance = 0.1;
+  double probeRadius = 0.0;
+  int derOrder = 8;
+  double minRadius = 100.0;
+  TsLessCavity cavity =
+      TsLessCavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
+
+  double permittivity = 78.39;
+  Vacuum<> gfInside;
+  UniformDielectric<> gfOutside(permittivity);
+  bool symm = true;
+  double correction = 0.0;
+
+  Collocation S;
+
+  CPCMSolver solver(symm, correction);
+  solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
+
+  double Ncharge = 7.0;
+  double Hcharge = 1.0;
+  size_t size = cavity.size();
+  Eigen::VectorXd fake_mep = computeMEP(molec, cavity.elements());
+  // The total ASC for a conductor is -Q
+  // for CPCM it will be -Q*[(epsilon-1)/epsilon + correction]
+  Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+  fake_asc = solver.computeCharge(fake_mep);
+  double totalASC =
+      -(Ncharge + 3.0 * Hcharge) * (permittivity - 1) / (permittivity + correction);
+  double totalFakeASC = fake_asc.sum();
+  CAPTURE(totalASC - totalFakeASC);
+  REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
 }

tests/cpcm/cpcm_tsless-point.cpp

--- tests/cpcm/cpcm_tsless-point.cpp
+++ tests/cpcm/cpcm_tsless-point.cpp
@@ -27,13 +27,13 @@
 
 #include <Eigen/Core>
 
+#include "TestingMolecules.hpp"
 #include "bi_operators/Collocation.hpp"
-#include "green/DerivativeTypes.hpp"
 #include "cavity/TsLessCavity.hpp"
-#include "green/Vacuum.hpp"
+#include "green/DerivativeTypes.hpp"
 #include "green/UniformDielectric.hpp"
+#include "green/Vacuum.hpp"
 #include "solver/CPCMSolver.hpp"
-#include "TestingMolecules.hpp"
 
 using namespace pcm;
 using bi_operators::Collocation;
@@ -42,101 +42,101 @@
 using green::UniformDielectric;
 using solver::CPCMSolver;
 
-SCENARIO("Test solver for the C-PCM for a point charge and a TsLess cavity", "[solver][cpcm][cpcm_tsless-point]")
-{
-    GIVEN("An isotropic environment modelled as a perfect conductor and a point charge")
-    {
-        double permittivity = 78.39;
-        Vacuum<> gfInside;
-        UniformDielectric<> gfOutside(permittivity);
-        bool symm = true;
-        double correction = 0.0;
-
-        Collocation S;
-
-        double charge = 8.0;
-        double totalASC = - charge * (permittivity - 1) / (permittivity + correction);
-
-        /*! \class CPCMSolver
-         *  \test \b pointChargeTsLess tests CPCMSolver using a point charge with a TsLess cavity
-         *  The point charge is at the origin.
-         */
-        WHEN("the point charge is located at the origin")
-        {
-            Molecule point = dummy<0>(2.929075493);
-            double area = 0.4;
-            double probeRadius = 0.0;
-            double minRadius = 100.0;
-            double minDistance = 0.1;
-            int derOrder = 4;
-            TsLessCavity cavity = TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
-            cavity.saveCavity("tsless_point.npz");
-
-            CPCMSolver solver(symm, correction);
-            solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
-
-            size_t size = cavity.size();
-            Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge);
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_mep(" << i << ") = " << fake_mep(i));
-            }
-
-            THEN("the apparent surface charge is")
-            {
-                Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-                fake_asc = solver.computeCharge(fake_mep);
-                double totalFakeASC = fake_asc.sum();
-
-                for (size_t i = 0; i < size; ++i) {
-                    INFO("fake_asc(" << i << ") = " << fake_asc(i));
-                }
-
-                CAPTURE(totalASC);
-                CAPTURE(totalFakeASC);
-                CAPTURE(totalASC - totalFakeASC);
-                REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
-            }
+SCENARIO("Test solver for the C-PCM for a point charge and a TsLess cavity",
+         "[solver][cpcm][cpcm_tsless-point]") {
+  GIVEN("An isotropic environment modelled as a perfect conductor and a point "
+        "charge") {
+    double permittivity = 78.39;
+    Vacuum<> gfInside;
+    UniformDielectric<> gfOutside(permittivity);
+    bool symm = true;
+    double correction = 0.0;
+
+    Collocation S;
+
+    double charge = 8.0;
+    double totalASC = -charge * (permittivity - 1) / (permittivity + correction);
+
+    /*! \class CPCMSolver
+     *  \test \b pointChargeTsLess tests CPCMSolver using a point charge with a
+     * TsLess cavity
+     *  The point charge is at the origin.
+     */
+    WHEN("the point charge is located at the origin") {
+      Molecule point = dummy<0>(2.929075493);
+      double area = 0.4;
+      double probeRadius = 0.0;
+      double minRadius = 100.0;
+      double minDistance = 0.1;
+      int derOrder = 4;
+      TsLessCavity cavity =
+          TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
+      cavity.saveCavity("tsless_point.npz");
+
+      CPCMSolver solver(symm, correction);
+      solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
+
+      size_t size = cavity.size();
+      Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge);
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_mep(" << i << ") = " << fake_mep(i));
+      }
+
+      THEN("the apparent surface charge is") {
+        Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+        fake_asc = solver.computeCharge(fake_mep);
+        double totalFakeASC = fake_asc.sum();
+
+        for (size_t i = 0; i < size; ++i) {
+          INFO("fake_asc(" << i << ") = " << fake_asc(i));
         }
 
-        /*! \class CPCMSolver
-         *  \test \b pointChargeShiftedTsLess tests CPCMSolver using a point charge with a TsLess cavity
-         *  The point charge is away from the origin.
-         */
-        AND_WHEN("the point charge is located away from the origin")
-        {
-            Eigen::Vector3d origin = 100 * Eigen::Vector3d::Random();
-            Molecule point = dummy<0>(2.929075493, origin);
-            double area = 0.4;
-            double probeRadius = 0.0;
-            double minRadius = 100.0;
-            double minDistance = 0.1;
-            int derOrder = 4;
-            TsLessCavity cavity = TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
-
-            CPCMSolver solver(symm, correction);
-            solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
-
-            size_t size = cavity.size();
-            Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, origin);
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_mep(" << i << ") = " << fake_mep(i));
-            }
-
-            THEN("the surface charge is")
-            {
-                Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-                fake_asc = solver.computeCharge(fake_mep);
-                double totalFakeASC = fake_asc.sum();
-
-                for (size_t i = 0; i < size; ++i) {
-                    INFO("fake_asc(" << i << ") = " << fake_asc(i));
-                }
-
-                CAPTURE(totalASC);
-                CAPTURE(totalFakeASC);
-                CAPTURE(totalASC - totalFakeASC);
-                REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
-            }
+        CAPTURE(totalASC);
+        CAPTURE(totalFakeASC);
+        CAPTURE(totalASC - totalFakeASC);
+        REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+      }
+    }
+
+    /*! \class CPCMSolver
+     *  \test \b pointChargeShiftedTsLess tests CPCMSolver using a point charge with
+     * a TsLess cavity
+     *  The point charge is away from the origin.
+     */
+    AND_WHEN("the point charge is located away from the origin") {
+      Eigen::Vector3d origin = 100 * Eigen::Vector3d::Random();
+      Molecule point = dummy<0>(2.929075493, origin);
+      double area = 0.4;
+      double probeRadius = 0.0;
+      double minRadius = 100.0;
+      double minDistance = 0.1;
+      int derOrder = 4;
+      TsLessCavity cavity =
+          TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
+
+      CPCMSolver solver(symm, correction);
+      solver.buildSystemMatrix(cavity, gfInside, gfOutside, S);
+
+      size_t size = cavity.size();
+      Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, origin);
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_mep(" << i << ") = " << fake_mep(i));
+      }
+
+      THEN("the surface charge is") {
+        Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+        fake_asc = solver.computeCharge(fake_mep);
+        double totalFakeASC = fake_asc.sum();
+
+        for (size_t i = 0; i < size; ++i) {
+          INFO("fake_asc(" << i << ") = " << fake_asc(i));
         }
+
+        CAPTURE(totalASC);
+        CAPTURE(totalFakeASC);
+        CAPTURE(totalASC - totalFakeASC);
+        REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+      }
     }
+  }
 }

tests/iefpcm/iefpcm_tsless-NH3.cpp

--- tests/iefpcm/iefpcm_tsless-NH3.cpp
+++ tests/iefpcm/iefpcm_tsless-NH3.cpp
@@ -27,14 +27,14 @@
 
 #include <Eigen/Core>
 
+#include "TestingMolecules.hpp"
 #include "bi_operators/Collocation.hpp"
-#include "green/DerivativeTypes.hpp"
 #include "cavity/TsLessCavity.hpp"
-#include "utils/Molecule.hpp"
-#include "green/Vacuum.hpp"
-#include "TestingMolecules.hpp"
+#include "green/DerivativeTypes.hpp"
 #include "green/UniformDielectric.hpp"
+#include "green/Vacuum.hpp"
 #include "solver/IEFSolver.hpp"
+#include "utils/Molecule.hpp"
 #include "utils/Symmetry.hpp"
 
 using namespace pcm;
@@ -47,36 +47,37 @@
 /*! \class IEFSolver
  *  \test \b NH3TsLess tests IEFSolver using ammonia and a TsLess cavity
  */
-TEST_CASE("Test solver for the IEFPCM with NH3 molecule and a TsLess cavity", "[solver][iefpcm][iefpcm_tsless-NH3]")
-{
-    Molecule molec = NH3();
-
-    double area = 0.08;
-    double minDistance = 0.1;
-    double probeRadius = 0.0;
-    int derOrder = 8;
-    double minRadius = 100.0;
-    TsLessCavity cavity = TsLessCavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
-
-    double permittivity = 78.39;
-    Vacuum<> gfInside;
-    UniformDielectric<> gfOutside(permittivity);
-
-    Collocation op;
-
-    bool symm = true;
-    IEFSolver solver(symm);
-    solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
-
-    double Ncharge = 7.0;
-    double Hcharge = 1.0;
-    size_t size = cavity.size();
-    Eigen::VectorXd fake_mep = computeMEP(molec, cavity.elements());
-    // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
-    Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-    fake_asc = solver.computeCharge(fake_mep);
-    double totalASC = - (Ncharge + 3.0 * Hcharge) * (permittivity - 1) / permittivity;
-    double totalFakeASC = fake_asc.sum();
-    CAPTURE(totalASC - totalFakeASC);
-    REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+TEST_CASE("Test solver for the IEFPCM with NH3 molecule and a TsLess cavity",
+          "[solver][iefpcm][iefpcm_tsless-NH3]") {
+  Molecule molec = NH3();
+
+  double area = 0.08;
+  double minDistance = 0.1;
+  double probeRadius = 0.0;
+  int derOrder = 8;
+  double minRadius = 100.0;
+  TsLessCavity cavity =
+      TsLessCavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
+
+  double permittivity = 78.39;
+  Vacuum<> gfInside;
+  UniformDielectric<> gfOutside(permittivity);
+
+  Collocation op;
+
+  bool symm = true;
+  IEFSolver solver(symm);
+  solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
+
+  double Ncharge = 7.0;
+  double Hcharge = 1.0;
+  size_t size = cavity.size();
+  Eigen::VectorXd fake_mep = computeMEP(molec, cavity.elements());
+  // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
+  Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+  fake_asc = solver.computeCharge(fake_mep);
+  double totalASC = -(Ncharge + 3.0 * Hcharge) * (permittivity - 1) / permittivity;
+  double totalFakeASC = fake_asc.sum();
+  CAPTURE(totalASC - totalFakeASC);
+  REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
 }

tests/iefpcm/iefpcm_tsless-point.cpp

--- tests/iefpcm/iefpcm_tsless-point.cpp
+++ tests/iefpcm/iefpcm_tsless-point.cpp
@@ -27,13 +27,13 @@
 
 #include <Eigen/Core>
 
+#include "TestingMolecules.hpp"
 #include "bi_operators/Collocation.hpp"
-#include "green/DerivativeTypes.hpp"
 #include "cavity/TsLessCavity.hpp"
-#include "green/Vacuum.hpp"
+#include "green/DerivativeTypes.hpp"
 #include "green/UniformDielectric.hpp"
+#include "green/Vacuum.hpp"
 #include "solver/IEFSolver.hpp"
-#include "TestingMolecules.hpp"
 
 using namespace pcm;
 using bi_operators::Collocation;
@@ -42,100 +42,99 @@
 using green::UniformDielectric;
 using solver::IEFSolver;
 
-SCENARIO("Test solver for the IEFPCM for a point charge and a TsLess cavity", "[solver][iefpcm][iefpcm_tsless-point]")
-{
-    GIVEN("An isotropic environment and a point charge")
-    {
-        double permittivity = 78.39;
-        Vacuum<> gfInside;
-        UniformDielectric<> gfOutside(permittivity);
-        bool symm = true;
-
-        Collocation op;
-
-        double charge = 8.0;
-        double totalASC = - charge * (permittivity - 1) / permittivity;
-
-        /*! \class IEFSolver
-         *  \test \b pointChargeTsLess tests IEFSolver using a point charge with a TsLess cavity
-         *  The point charge is at the origin.
-         */
-        WHEN("the point charge is located at the origin")
-        {
-            Molecule point = dummy<0>(2.929075493);
-            double area = 0.4;
-            double probeRadius = 0.0;
-            double minRadius = 100.0;
-            double minDistance = 0.1;
-            int derOrder = 4;
-            TsLessCavity cavity = TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
-            cavity.saveCavity("tsless_point.npz");
-
-            IEFSolver solver(symm);
-            solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
-
-            size_t size = cavity.size();
-            Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge);
-            // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
-            Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-            fake_asc = solver.computeCharge(fake_mep);
-
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_mep(" << i << ") = " << fake_mep(i));
-            }
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_asc(" << i << ") = " << fake_asc(i));
-            }
-
-            double totalFakeASC = fake_asc.sum();
-            THEN("the apparent surface charge is")
-            {
-                CAPTURE(totalASC);
-                CAPTURE(totalFakeASC);
-                CAPTURE(totalASC - totalFakeASC);
-                REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
-            }
-        }
-
-        /*! \class IEFSolver
-         *  \test \b pointChargeShiftedTsLess tests IEFSolver using a point charge with a TsLess cavity
-         *  The point charge is away from the origin.
-         */
-        AND_WHEN("the point charge is located away from the origin")
-        {
-            Eigen::Vector3d origin = 100 * Eigen::Vector3d::Random();
-            Molecule point = dummy<0>(2.929075493, origin);
-            double area = 0.4;
-            double probeRadius = 0.0;
-            double minRadius = 100.0;
-            double minDistance = 0.1;
-            int derOrder = 4;
-            TsLessCavity cavity = TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
-
-            IEFSolver solver(symm);
-            solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
-
-            size_t size = cavity.size();
-            Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, origin);
-            // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
-            Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
-            fake_asc = solver.computeCharge(fake_mep);
-
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_mep(" << i << ") = " << fake_mep(i));
-            }
-            for (size_t i = 0; i < size; ++i) {
-                INFO("fake_asc(" << i << ") = " << fake_asc(i));
-            }
-
-            double totalFakeASC = fake_asc.sum();
-            THEN("the surface charge is")
-            {
-                CAPTURE(totalASC);
-                CAPTURE(totalFakeASC);
-                CAPTURE(totalASC - totalFakeASC);
-                REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
-            }
-        }
+SCENARIO("Test solver for the IEFPCM for a point charge and a TsLess cavity",
+         "[solver][iefpcm][iefpcm_tsless-point]") {
+  GIVEN("An isotropic environment and a point charge") {
+    double permittivity = 78.39;
+    Vacuum<> gfInside;
+    UniformDielectric<> gfOutside(permittivity);
+    bool symm = true;
+
+    Collocation op;
+
+    double charge = 8.0;
+    double totalASC = -charge * (permittivity - 1) / permittivity;
+
+    /*! \class IEFSolver
+     *  \test \b pointChargeTsLess tests IEFSolver using a point charge with a TsLess
+     * cavity
+     *  The point charge is at the origin.
+     */
+    WHEN("the point charge is located at the origin") {
+      Molecule point = dummy<0>(2.929075493);
+      double area = 0.4;
+      double probeRadius = 0.0;
+      double minRadius = 100.0;
+      double minDistance = 0.1;
+      int derOrder = 4;
+      TsLessCavity cavity =
+          TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
+      cavity.saveCavity("tsless_point.npz");
+
+      IEFSolver solver(symm);
+      solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
+
+      size_t size = cavity.size();
+      Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge);
+      // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
+      Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+      fake_asc = solver.computeCharge(fake_mep);
+
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_mep(" << i << ") = " << fake_mep(i));
+      }
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_asc(" << i << ") = " << fake_asc(i));
+      }
+
+      double totalFakeASC = fake_asc.sum();
+      THEN("the apparent surface charge is") {
+        CAPTURE(totalASC);
+        CAPTURE(totalFakeASC);
+        CAPTURE(totalASC - totalFakeASC);
+        REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+      }
+    }
+
+    /*! \class IEFSolver
+     *  \test \b pointChargeShiftedTsLess tests IEFSolver using a point charge with a
+     * TsLess cavity
+     *  The point charge is away from the origin.
+     */
+    AND_WHEN("the point charge is located away from the origin") {
+      Eigen::Vector3d origin = 100 * Eigen::Vector3d::Random();
+      Molecule point = dummy<0>(2.929075493, origin);
+      double area = 0.4;
+      double probeRadius = 0.0;
+      double minRadius = 100.0;
+      double minDistance = 0.1;
+      int derOrder = 4;
+      TsLessCavity cavity =
+          TsLessCavity(point, area, probeRadius, minRadius, minDistance, derOrder);
+
+      IEFSolver solver(symm);
+      solver.buildSystemMatrix(cavity, gfInside, gfOutside, op);
+
+      size_t size = cavity.size();
+      Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, origin);
+      // The total ASC for a dielectric is -Q*[(epsilon-1)/epsilon]
+      Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size);
+      fake_asc = solver.computeCharge(fake_mep);
+
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_mep(" << i << ") = " << fake_mep(i));
+      }
+      for (size_t i = 0; i < size; ++i) {
+        INFO("fake_asc(" << i << ") = " << fake_asc(i));
+      }
+
+      double totalFakeASC = fake_asc.sum();
+      THEN("the surface charge is") {
+        CAPTURE(totalASC);
+        CAPTURE(totalFakeASC);
+        CAPTURE(totalASC - totalFakeASC);
+        REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03));
+      }
     }
+  }
 }

tests/tsless/tsless_HF.cpp

--- tests/tsless/tsless_HF.cpp
+++ tests/tsless/tsless_HF.cpp
@@ -2,55 +2,52 @@
 
 #include <Eigen/Core>
 
-#include "cavity/TsLessCavity.hpp"
 #include "TestingMolecules.hpp"
+#include "cavity/TsLessCavity.hpp"
 
 using namespace pcm;
 using cavity::TsLessCavity;
 
-TEST_CASE("TsLess cavity for an hydrogen fluoride molecule", "[tsless][tsless_HF]")
-{
-    Molecule molec = HF();
-    double area = 0.02 / bohr2ToAngstrom2();
-    double probeRadius = 0.0 / bohrToAngstrom();
-    double minRadius = 0.2 / bohrToAngstrom();
-    double minDistance = 0.01;
-    int derOrder = 4;
-    TsLessCavity cavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityHFTest_size tests TsLess cavity size for ammonia
-     */
-    SECTION("Test size")
-    {
-        size_t ref_size = 1498;
-        size_t size = cavity.size();
-        REQUIRE(size == ref_size);
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityHFTest_area tests TsLess cavity surface area for ammonia
-     */
-    SECTION("Test surface area")
-    {
-        double ref_area = 111.07794350824591;
-        double area = cavity.elementArea().sum();
-        REQUIRE(area == Approx(ref_area));
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityHFTest_volume tests TsLess cavity volume for ammonia
-     */
-    SECTION("Test volume")
-    {
-        double ref_volume = 106.59560252994531;
-        Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
-        Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
-        double volume = 0;
-        for ( size_t i = 0; i < cavity.size(); ++i ) {
-            volume += cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
-        }
-        volume /= 3;
-        REQUIRE(volume == Approx(ref_volume));
+TEST_CASE("TsLess cavity for an hydrogen fluoride molecule", "[tsless][tsless_HF]") {
+  Molecule molec = HF();
+  double area = 0.02 / bohr2ToAngstrom2();
+  double probeRadius = 0.0 / bohrToAngstrom();
+  double minRadius = 0.2 / bohrToAngstrom();
+  double minDistance = 0.01;
+  int derOrder = 4;
+  TsLessCavity cavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityHFTest_size tests TsLess cavity size for ammonia
+   */
+  SECTION("Test size") {
+    size_t ref_size = 1498;
+    size_t size = cavity.size();
+    REQUIRE(size == ref_size);
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityHFTest_area tests TsLess cavity surface area for ammonia
+   */
+  SECTION("Test surface area") {
+    double ref_area = 111.07794350824591;
+    double area = cavity.elementArea().sum();
+    REQUIRE(area == Approx(ref_area));
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityHFTest_volume tests TsLess cavity volume for ammonia
+   */
+  SECTION("Test volume") {
+    double ref_volume = 106.59560252994531;
+    Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
+    Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
+    double volume = 0;
+    for (size_t i = 0; i < cavity.size(); ++i) {
+      volume +=
+          cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
     }
+    volume /= 3;
+    REQUIRE(volume == Approx(ref_volume));
+  }
 }

tests/tsless/tsless_NH3.cpp

--- tests/tsless/tsless_NH3.cpp
+++ tests/tsless/tsless_NH3.cpp
@@ -2,56 +2,53 @@
 
 #include <Eigen/Core>
 
-#include "cavity/TsLessCavity.hpp"
 #include "TestingMolecules.hpp"
+#include "cavity/TsLessCavity.hpp"
 
 using namespace pcm;
 using cavity::TsLessCavity;
 
-TEST_CASE("TsLess cavity for an ammonia molecule", "[tsless][tsless_NH3]")
-{
-    Molecule molec = NH3();
-    double area = 0.02 / bohr2ToAngstrom2();
-    double probeRadius = 0.0 / bohrToAngstrom();
-    double minRadius = 0.2 / bohrToAngstrom();
-    double minDistance = 0.01;
-    int derOrder = 4;
-    TsLessCavity cavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
-    cavity.saveCavity("nh3.npz");
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityNH3Test_size tests TsLess cavity size for ammonia
-     */
-    SECTION("Test size")
-    {
-        size_t ref_size = 2042;
-        size_t size = cavity.size();
-        REQUIRE(size == ref_size);
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityNH3Test_area tests TsLess cavity surface area for ammonia
-     */
-    SECTION("Test surface area")
-    {
-        double ref_area = 147.59900736316496;
-        double area = cavity.elementArea().sum();
-        REQUIRE(area == Approx(ref_area));
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityNH3Test_volume tests TsLess cavity volume for ammonia
-     */
-    SECTION("Test volume")
-    {
-        double ref_volume = 153.7079082474709;
-        Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
-        Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
-        double volume = 0;
-        for ( size_t i = 0; i < cavity.size(); ++i ) {
-            volume += cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
-        }
-        volume /= 3;
-        REQUIRE(volume == Approx(ref_volume));
+TEST_CASE("TsLess cavity for an ammonia molecule", "[tsless][tsless_NH3]") {
+  Molecule molec = NH3();
+  double area = 0.02 / bohr2ToAngstrom2();
+  double probeRadius = 0.0 / bohrToAngstrom();
+  double minRadius = 0.2 / bohrToAngstrom();
+  double minDistance = 0.01;
+  int derOrder = 4;
+  TsLessCavity cavity(molec, area, probeRadius, minRadius, minDistance, derOrder);
+  cavity.saveCavity("nh3.npz");
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityNH3Test_size tests TsLess cavity size for ammonia
+   */
+  SECTION("Test size") {
+    size_t ref_size = 2042;
+    size_t size = cavity.size();
+    REQUIRE(size == ref_size);
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityNH3Test_area tests TsLess cavity surface area for ammonia
+   */
+  SECTION("Test surface area") {
+    double ref_area = 147.59900736316496;
+    double area = cavity.elementArea().sum();
+    REQUIRE(area == Approx(ref_area));
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityNH3Test_volume tests TsLess cavity volume for ammonia
+   */
+  SECTION("Test volume") {
+    double ref_volume = 153.7079082474709;
+    Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
+    Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
+    double volume = 0;
+    for (size_t i = 0; i < cavity.size(); ++i) {
+      volume +=
+          cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
     }
+    volume /= 3;
+    REQUIRE(volume == Approx(ref_volume));
+  }
 }

tests/tsless/tsless_point.cpp

--- tests/tsless/tsless_point.cpp
+++ tests/tsless/tsless_point.cpp
@@ -2,54 +2,52 @@
 
 #include <Eigen/Core>
 
-#include "cavity/TsLessCavity.hpp"
 #include "TestingMolecules.hpp"
+#include "cavity/TsLessCavity.hpp"
 
 using namespace pcm;
 using cavity::TsLessCavity;
 
-TEST_CASE("TsLess cavity for a single sphere", "[tsless][tsless_point]")
-{
-    Molecule point = dummy<0>();
-    double area = 0.4;
-    double minDistance = 0.1;
-    double probeRadius = 0.0;
-    int derOrder = 4;
-    TsLessCavity cavity(point, area, probeRadius, 100.0, minDistance, derOrder);
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityTest_size tests TsLess cavity size for a point charge
-     */
-    SECTION("Test size")
-    {
-        size_t ref_size = 32;
-        size_t size = cavity.size();
-        REQUIRE(ref_size == size);
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityTest_area tests TsLess cavity surface area for a point charge
-     */
-    SECTION("Test surface area")
-    {
-        double ref_area = 4.0 * M_PI * pow(1.0, 2);
-        double area = cavity.elementArea().sum();
-        REQUIRE(ref_area == Approx(area));
-    }
-
-    /*! \class TsLessCavity
-     *  \test \b TsLessCavityTest_volume tests TsLess cavity volume for a point charge
-     */
-    SECTION("Test volume")
-    {
-        double ref_volume = 4.0 * M_PI * pow(1.0, 3) / 3.0;
-        Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
-        Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
-        double volume = 0;
-        for ( size_t i = 0; i < cavity.size(); ++i ) {
-            volume += cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
-        }
-        volume /= 3;
-        REQUIRE(ref_volume == Approx(volume));
+TEST_CASE("TsLess cavity for a single sphere", "[tsless][tsless_point]") {
+  Molecule point = dummy<0>();
+  double area = 0.4;
+  double minDistance = 0.1;
+  double probeRadius = 0.0;
+  int derOrder = 4;
+  TsLessCavity cavity(point, area, probeRadius, 100.0, minDistance, derOrder);
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityTest_size tests TsLess cavity size for a point charge
+   */
+  SECTION("Test size") {
+    size_t ref_size = 32;
+    size_t size = cavity.size();
+    REQUIRE(ref_size == size);
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityTest_area tests TsLess cavity surface area for a point
+   * charge
+   */
+  SECTION("Test surface area") {
+    double ref_area = 4.0 * M_PI * pow(1.0, 2);
+    double area = cavity.elementArea().sum();
+    REQUIRE(ref_area == Approx(area));
+  }
+
+  /*! \class TsLessCavity
+   *  \test \b TsLessCavityTest_volume tests TsLess cavity volume for a point charge
+   */
+  SECTION("Test volume") {
+    double ref_volume = 4.0 * M_PI * pow(1.0, 3) / 3.0;
+    Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
+    Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
+    double volume = 0;
+    for (size_t i = 0; i < cavity.size(); ++i) {
+      volume +=
+          cavity.elementArea(i) * elementCenter.col(i).dot(elementNormal.col(i));
     }
+    volume /= 3;
+    REQUIRE(ref_volume == Approx(volume));
+  }
 }

Generated by 🚫 Danger

@robertodr robertodr mentioned this pull request Apr 5, 2018
10 tasks
@robertodr
Copy link
Member Author

Superseded by #140

@robertodr robertodr closed this Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants