Skip to content

Commit 340dd65

Browse files
committed
Re-enable license maintainer pre-commit hook
1 parent 227711e commit 340dd65

File tree

145 files changed

+8508
-10511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+8508
-10511
lines changed

.gitattributes

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,70 @@
11
# API files
2-
/api/*.h licensefile=.githooks/license-maintainer/LICENSE-C
3-
/api/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
2+
api/*.h licensefile=.githooks/license-maintainer/LICENSE-C
3+
api/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
44

55
# include directory
6-
/include/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
7-
/include/Config.hpp.in licensefile=.githooks/license-maintainer/LICENSE-C++
6+
include/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
7+
include/STLUtils.hpp !licensefile
8+
include/Config.hpp.in licensefile=.githooks/license-maintainer/LICENSE-C++
89

910
# bin
10-
/src/bin/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
11+
src/bin/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
1112

1213
# bi_operators
13-
/src/bi_operators/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
14+
src/bi_operators/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
15+
src/bi_operators/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
1416

1517
# cavity
16-
/src/cavity/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
17-
/src/cavity/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
18+
src/cavity/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
19+
src/cavity/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
1820

1921
# green
20-
/src/green/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
21-
/src/green/dielectric_profile/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
22+
src/green/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
23+
src/green/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
24+
src/green/dielectric_profile/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
2225

2326
# interface
24-
/src/interface/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
25-
/src/interface/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
27+
src/interface/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
28+
src/interface/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
2629

2730
# metal
28-
/src/metal/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
31+
src/metal/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
2932

3033
# pedra
31-
/src/pedra/*.inc licensefile=.githooks/license-maintainer/LICENSE-Fortran
32-
pedra/pedra_cavity.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
33-
pedra/pedra_cavity_derivatives.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
34-
pedra/pedra_cavity_interface.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
35-
pedra/pedra_dblas.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
36-
pedra/pedra_precision.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
37-
pedra/pedra_print.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
38-
pedra/pedra_symmetry.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
39-
pedra/pedra_utils.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
34+
src/pedra/*.inc licensefile=.githooks/license-maintainer/LICENSE-Fortran
35+
src/pedra/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
36+
src/pedra/pedra_dlapack.F90 !licensefile
4037

4138
# solver
42-
/src/solver/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
43-
/src/solver/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
39+
src/solver/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
40+
src/solver/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
4441

4542
# utils
46-
/src/utils/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
47-
/src/utils/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
43+
src/utils/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
44+
src/utils/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
45+
src/utils/cnpy.hpp !licensefile
46+
src/utils/cnpy.cpp !licensefile
47+
src/utils/legendre.h !licensefile
48+
src/utils/Interpolation.* !licensefile
49+
src/utils/Vector* !licensefile
4850

4951
# tests
50-
/tests/unit_tests.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
51-
/tests/TestingMolecules.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
52-
/tests/Fortran_host/*.F90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
52+
tests/unit_tests.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
53+
tests/TestingMolecules.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
54+
tests/Fortran_host/*.f90 licensefile=.githooks/license-maintainer/LICENSE-Fortran
5355
/tests/C_host/*.h licensefile=.githooks/license-maintainer/LICENSE-C
5456
/tests/C_host/*.c licensefile=.githooks/license-maintainer/LICENSE-C
55-
/tests/bi_operators/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
56-
/tests/cpcm/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
57-
/tests/dielectric_profile/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
58-
/tests/gepol/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
59-
/tests/green/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
60-
/tests/green/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
61-
/tests/iefpcm/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
62-
/tests/input/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
63-
/tests/numerical_quadrature/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
57+
tests/bi_operators/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
58+
tests/cpcm/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
59+
tests/dielectric_profile/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
60+
tests/gepol/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
61+
tests/green/*.hpp licensefile=.githooks/license-maintainer/LICENSE-C++
62+
tests/green/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
63+
tests/iefpcm/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
64+
tests/input/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
65+
tests/numerical_quadrature/*.cpp licensefile=.githooks/license-maintainer/LICENSE-C++
6466

6567
# tools
66-
/src/make_cmake_files.py licensefile=.githooks/license-maintainer/LICENSE-Python
67-
/tools/pcmsolver.py.in licensefile=.githooks/license-maintainer/LICENSE-Python
68-
/tests/make_cmake_files.py licensefile=.githooks/license-maintainer/LICENSE-Python
68+
src/make_cmake_files.py licensefile=.githooks/license-maintainer/LICENSE-Python
69+
tools/pcmsolver.py.in licensefile=.githooks/license-maintainer/LICENSE-Python
70+
tests/make_cmake_files.py licensefile=.githooks/license-maintainer/LICENSE-Python

.githooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# pre-commit hooks to be executed. They should be in the same .git/hooks/ folder
1414
# as this script. Hooks should return 0 if successful and nonzero to cancel the
1515
# commit. They are executed in the order in which they are listed.
16-
HOOKS="pre-commit-clang-format"
17-
#HOOKS="pre-commit-clang-format pre-commit-license-maintainer"
16+
#HOOKS="pre-commit-clang-format"
17+
HOOKS="pre-commit-license-maintainer pre-commit-clang-format"
1818
###########################################################
1919
# There should be no need to change anything below this line.
2020

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
non compliant. The hook generates a patch and shows the command needed to
1313
apply it.
1414
_NOT recommended_ The hook can be skipped by passing the `--no-verify` option to `git commit`
15+
- A pre-commit hook in `.githooks/pre-commit-license-maintainer` checking the license headers.
16+
**BREAKING CHANGE** Perl5 is needed to work on the code.
17+
The hook is based on this [project](https://github.com/NitorCreations/license-maintainer)
18+
and is configured based on the `.gitattributes` file.
19+
The list of authors is automatically extracted from the `license.author`
20+
field in `.git/config`. This can either be modified by hand or by invoking
21+
`git config license.author="list-of-authors"`.
22+
The hook will check the license headers, amend them where possible and abort
23+
where not possible, showing the commands needed to update the license.
24+
_NOT recommended_ The hook can be skipped by passing the `--no-verify` option to `git commit`
1525
- An `UNUSED` preprocessor macro to mark arguments as unused.
1626
- An `UNUSED_FUNCTION` preprocessor macro to mark functions as unused.
1727

api/PCMInput.h

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
/* pcmsolver_copyright_start */
2-
/*
3-
* PCMSolver, an API for the Polarizable Continuum Model
4-
* Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
5-
*
6-
* This file is part of PCMSolver.
7-
*
8-
* PCMSolver is free software: you can redistribute it and/or modify
9-
* it under the terms of the GNU Lesser General Public License as published by
10-
* the Free Software Foundation, either version 3 of the License, or
11-
* (at your option) any later version.
12-
*
13-
* PCMSolver is distributed in the hope that it will be useful,
14-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
* GNU Lesser General Public License for more details.
17-
*
18-
* You should have received a copy of the GNU Lesser General Public License
19-
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20-
*
21-
* For information on the complete list of contributors to the
22-
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
1+
/**
2+
* PCMSolver, an API for the Polarizable Continuum Model
3+
* Copyright (C) 2016 Roberto Di Remigio, Luca Frediani and collaborators.
4+
*
5+
* This file is part of PCMSolver.
6+
*
7+
* PCMSolver is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* PCMSolver is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
19+
*
20+
* For information on the complete list of contributors to the
21+
* PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
2322
*/
24-
/* pcmsolver_copyright_end */
2523

2624
#ifndef PCMINPUT_H
2725
#define PCMINPUT_H
@@ -31,53 +29,54 @@
3129
#define pcmsolver_bool_t_DEFINED
3230
#if (defined(__STDC__) && (__STDC_VERSION__ < 199901L)) && !defined(__cplusplus)
3331
typedef enum { pcmsolver_false, pcmsolver_true } pcmsolver_bool_t;
34-
#else /* (defined(__STDC__) || (__STDC_VERSION__ < 199901L)) && !defined(__cplusplus) */
32+
#else /* (defined(__STDC__) || (__STDC_VERSION__ < 199901L)) && \
33+
!defined(__cplusplus) */
3534
#include <stdbool.h>
3635
typedef bool pcmsolver_bool_t;
37-
#endif /* (defined(__STDC__) || (__STDC_VERSION__ < 199901L)) && !defined(__cplusplus) */
36+
#endif /* (defined(__STDC__) || (__STDC_VERSION__ < 199901L)) && \
37+
!defined(__cplusplus) */
3838
#endif /* pcmsolver_bool_t_DEFINED */
3939

4040
/*! @struct PCMInput
4141
* @brief Data structure for host-API input communication.
4242
*/
43-
typedef struct PCMInput
44-
{
45-
/// Type of cavity requested.
46-
char cavity_type[8];
47-
/// Wavelet cavity mesh patch level.
48-
int patch_level;
49-
/// Wavelet cavity mesh coarsity.
50-
double coarsity;
51-
/// Average tesserae area.
52-
double area;
53-
/// The built-in radii set to be used.
54-
char radii_set[8];
55-
/// Minimal distance between sampling points.
56-
double min_distance;
57-
/// Derivative order for the switching function.
58-
int der_order;
59-
/// Whether to scale or not the atomic radii.
60-
pcmsolver_bool_t scaling;
61-
/// Name of the .npz file for GePol cavity restart.
62-
char restart_name[20];
63-
/// Minimal radius for the added spheres.
64-
double min_radius;
65-
/// Type of solver requested.
66-
char solver_type[7];
67-
/// Correction in the CPCM apparent surface charge scaling factor.
68-
double correction;
69-
/// Name of the solvent.
70-
char solvent[16];
71-
/// Radius of the spherical probe mimicking the solvent.
72-
double probe_radius;
73-
/// Type of the integral equation to be used.
74-
char equation_type[11];
75-
/// Type of Green's function requested inside the cavity.
76-
char inside_type[7];
77-
/// Value of the static permittivity outside the cavity.
78-
double outside_epsilon;
79-
/// Type of Green's function requested outside the cavity.
80-
char outside_type[22];
43+
typedef struct PCMInput {
44+
/// Type of cavity requested.
45+
char cavity_type[8];
46+
/// Wavelet cavity mesh patch level.
47+
int patch_level;
48+
/// Wavelet cavity mesh coarsity.
49+
double coarsity;
50+
/// Average tesserae area.
51+
double area;
52+
/// The built-in radii set to be used.
53+
char radii_set[8];
54+
/// Minimal distance between sampling points.
55+
double min_distance;
56+
/// Derivative order for the switching function.
57+
int der_order;
58+
/// Whether to scale or not the atomic radii.
59+
pcmsolver_bool_t scaling;
60+
/// Name of the .npz file for GePol cavity restart.
61+
char restart_name[20];
62+
/// Minimal radius for the added spheres.
63+
double min_radius;
64+
/// Type of solver requested.
65+
char solver_type[7];
66+
/// Correction in the CPCM apparent surface charge scaling factor.
67+
double correction;
68+
/// Name of the solvent.
69+
char solvent[16];
70+
/// Radius of the spherical probe mimicking the solvent.
71+
double probe_radius;
72+
/// Type of the integral equation to be used.
73+
char equation_type[11];
74+
/// Type of Green's function requested inside the cavity.
75+
char inside_type[7];
76+
/// Value of the static permittivity outside the cavity.
77+
double outside_epsilon;
78+
/// Type of Green's function requested outside the cavity.
79+
char outside_type[22];
8180
} PCMInput;
8281

8382
#endif // PCMINPUT_H

api/pcmsolver.F90

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
!pcmsolver_copyright_start
2-
! PCMSolver, an API for the Polarizable Continuum Model
3-
! Copyright (C) 2013-2016 Roberto Di Remigio, Luca Frediani and contributors
4-
!
5-
! This file is part of PCMSolver.
6-
!
7-
! PCMSolver is free software: you can redistribute it and/or modify
8-
! it under the terms of the GNU Lesser General Public License as published by
9-
! the Free Software Foundation, either version 3 of the License, or
10-
! (at your option) any later version.
11-
!
12-
! PCMSolver is distributed in the hope that it will be useful,
13-
! but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
! GNU Lesser General Public License for more details.
16-
!
17-
! You should have received a copy of the GNU Lesser General Public License
18-
! along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
19-
!
20-
! For information on the complete list of contributors to the
21-
! PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
22-
!pcmsolver_copyright_end
1+
!
2+
! PCMSolver, an API for the Polarizable Continuum Model
3+
! Copyright (C) 2016 Roberto Di Remigio, Luca Frediani and collaborators.
4+
!
5+
! This file is part of PCMSolver.
6+
!
7+
! PCMSolver is free software: you can redistribute it and/or modify
8+
! it under the terms of the GNU Lesser General Public License as published by
9+
! the Free Software Foundation, either version 3 of the License, or
10+
! (at your option) any later version.
11+
!
12+
! PCMSolver is distributed in the hope that it will be useful,
13+
! but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
! GNU Lesser General Public License for more details.
16+
!
17+
! You should have received a copy of the GNU Lesser General Public License
18+
! along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
19+
!
20+
! For information on the complete list of contributors to the
21+
! PCMSolver API, see: <http://pcmsolver.readthedocs.io/>
22+
!
2323

2424
module pcmsolver
2525

0 commit comments

Comments
 (0)