Giter Club home page Giter Club logo

gcp's Introduction

Geometrical Counter-Poise Correction

LGPL-3.0-or-later Latest Version CI DOI DOI codecov

Installation

A statically linked binary distribution for Linux platforms is available at the latest release tag.

Conda package

Conda Version

This project is packaged for the conda package manager and available on the conda-forge channel. To install the conda package manager we recommend the miniforge installer. If the conda-forge channel is not yet enabled, add it to your channels with

conda config --add channels conda-forge

Once the conda-forge channel has been enabled, this project can be installed with:

conda install gcp-correction

It is possible to list all of the versions available on your platform with:

conda search gcp-correction --channel conda-forge

Now you are ready to use mctc-gcp.

Building from source

To build this project from the source code in this repository you need to have

  • a Fortran compiler supporting Fortran 2008
  • meson version 0.53 or newer
  • a build-system backend, i.e. ninja version 1.7 or newer

Setup a build with

meson setup _build

You can select the Fortran compiler by the FC environment variable, currently this project supports GCC and Intel compilers. To compile the project run

meson compile -C _build

You can run the projects testsuite with

meson test -C _build --print-errorlogs

If the testsuite passes you can install with

meson configure _build --prefix=/path/to/install
meson install -C _build

This might require administrator access depending on the chosen install prefix. Now you are ready to use mctc-gcp.

Usage

To calculate the geometrical counter poise correction use the mctc-gcp(1) program. For a Hartree-Fock calculation in split valence basis use

mctc-gcp coord -l hf/def2-svp

Similarly, other methods can be selected. Special levels are the “3c” methods hf-3c, pbeh-3c, hse-3c, b97-3c and r2scan-3c.

Periodic calculations can be performed by providing periodic input, like Vasp's POSCAR, riper coord file or supercell DFTB+ general format.

mctc-gcp POSCAR -l hse-3c

For more details look up the manual page.

Contributors

References

Please cite the GCP reference publication for work done with this program

  1. H. Kruse, S. Grimme J. Chem. Phys. 136, 154101 (2012). DOI: 10.1063/1.3700154
  2. For periodic GCP also cite: J. G. Brandenburg, M. Alessio, B. Civalleri, M. F. Peintinger, T. Bredow, S. Grimme J. Phys. Chem. A 117, 9282–9292 (2013). DOI: 10.1021/jp406658y

For the “3c” methods see:

  1. R. Sure, S. Grimme J. Comput. Chem. 34, 1672–1685 (2013). DOI: 10.1002/jcc.23317
  2. S. Grimme, J. G. Brandenburg, C. Bannwarth, A. Hansen J. Chem. Phys. 143, 054107 (2015). DOI: 10.1063/1.4927476
  3. J. G. Brandenburg, E. Caldeweyher, S. Grimme. Phys. Chem. Chem. Phys. 18, 15519–15523 (2016). DOI: 10.1039/C6CP01697A
  4. J. G. Brandenburg, C. Bannwarth, A. Hansen, S. Grimme J. Chem. Phys. 148, 064104 (2018). DOI: 10.1063/1.5012601
  5. S. Grimme, A. Hansen, S. Ehlert, J.-M. Mewes J. Chem. Phys. 154, 064103 (2021). DOI: 10.1063/5.0040021 ChemRxiv: 10.26434/chemrxiv.13333520.v2

License

This project is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This project is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the Lesser GNU General Public License for more details.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Lesser GNU General Public license, shall be licensed as above, without any additional terms or conditions.

gcp's People

Contributors

awvwgk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gcp's Issues

results differ between classic and mctc

I was seeing if I could drive mctc-gcp with slight modifications of the gcp QCEngine harness. atom is fine, but molecules differ in Egcp by about an order of magnitude with the same input. It's not a simple bohr/ang issue. I don't particularly need this solved -- just FYI and stashing notes.

command=['mctc-gcp', 'gcp_geometry.xyz', '-level', 'HF/SV', '-grad']
infiles={'gcp_geometry.xyz': '10\n0 1 C4H6\nC                     0.000000000000    -0.667578000000    -2.124659000000\nC                     0.000000000000     0.667578000000    -2.124659000000\nH                     0.923621000000    -1.232253000000    -2.126185000000\nH                    -0.923621000000    -1.232253000000    -2.126185000000\nH                    -0.923621000000     1.232253000000    -2.126185000000\nH                     0.923621000000     1.232253000000    -2.126185000000\nC                     0.000000000000     0.000000000000     2.900503000000\nC                     0.000000000000     0.000000000000     1.693240000000\nH                     0.000000000000     0.000000000000     0.627352000000\nH                     0.000000000000     0.000000000000     3.963929000000\n'}

"classic" on left, mctc on right

'keywords': {},																	 'keywords': {},
 'model': {'basis': None, 'method': 'hf/sv'},														 'model': {'basis': None, 'method': 'hf/sv'},
 'molecule': {'atom_labels': array(['', '', '', '', '', '', '', '', '', ''], dtype='<U1'),								 'molecule': {'atom_labels': array(['', '', '', '', '', '', '', '', '', ''], dtype='<U1'),
              'atomic_numbers': array([6, 6, 1, 1, 1, 1, 6, 6, 1, 1], dtype=int16),									              'atomic_numbers': array([6, 6, 1, 1, 1, 1, 6, 6, 1, 1], dtype=int16),
              'fix_com': False,																              'fix_com': False,
              'fix_orientation': False,															              'fix_orientation': False,
              'fragment_charges': [0.0, 0.0],														              'fragment_charges': [0.0, 0.0],
              'fragment_multiplicities': [1, 1],													              'fragment_multiplicities': [1, 1],
              'fragments': [array([0, 1, 2, 3, 4, 5], dtype=int32),											              'fragments': [array([0, 1, 2, 3, 4, 5], dtype=int32),
                            array([6, 7, 8, 9], dtype=int32)],												                            array([6, 7, 8, 9], dtype=int32)],
              'geometry': array([[ 0.        , -1.26153959, -4.01502362],										              'geometry': array([[ 0.        , -1.26153959, -4.01502362],
       [ 0.        ,  1.26153959, -4.01502362],														       [ 0.        ,  1.26153959, -4.01502362],
       [ 1.74539073, -2.32862069, -4.01790734],														       [ 1.74539073, -2.32862069, -4.01790734],
       [-1.74539073, -2.32862069, -4.01790734],														       [-1.74539073, -2.32862069, -4.01790734],
       [-1.74539073,  2.32862069, -4.01790734],														       [-1.74539073,  2.32862069, -4.01790734],
       [ 1.74539073,  2.32862069, -4.01790734],														       [ 1.74539073,  2.32862069, -4.01790734],
       [ 0.        ,  0.        ,  5.4811563 ],														       [ 0.        ,  0.        ,  5.4811563 ],
       [ 0.        ,  0.        ,  3.19975986],														       [ 0.        ,  0.        ,  3.19975986],
       [ 0.        ,  0.        ,  1.18552346],														       [ 0.        ,  0.        ,  1.18552346],
       [ 0.        ,  0.        ,  7.49074019]]),													       [ 0.        ,  0.        ,  7.49074019]]),
              'mass_numbers': array([12, 12,  1,  1,  1,  1, 12, 12,  1,  1], dtype=int16),								              'mass_numbers': array([12, 12,  1,  1,  1,  1, 12, 12,  1,  1], dtype=int16),
              'masses': array([12.        , 12.        ,  1.00782503,  1.00782503,  1.00782503,								              'masses': array([12.        , 12.        ,  1.00782503,  1.00782503,  1.00782503,
        1.00782503, 12.        , 12.        ,  1.00782503,  1.00782503]),										        1.00782503, 12.        , 12.        ,  1.00782503,  1.00782503]),
              'molecular_charge': 0.0,															              'molecular_charge': 0.0,
              'molecular_multiplicity': 1,														              'molecular_multiplicity': 1,
              'name': 'C4H6',																              'name': 'C4H6',
              'provenance': {'creator': 'QCElemental',													              'provenance': {'creator': 'QCElemental',
                             'routine': 'qcelemental.molparse.from_string',										                             'routine': 'qcelemental.molparse.from_string',
                             'version': 'v0.18.0'},													                             'version': 'v0.18.0'},
              'real': array([ True,  True,  True,  True,  True,  True,  True,  True,  True,								              'real': array([ True,  True,  True,  True,  True,  True,  True,  True,  True,
        True]),																		        True]),
              'schema_name': 'qcschema_molecule',													              'schema_name': 'qcschema_molecule',
              'schema_version': 2,															              'schema_version': 2,
              'symbols': array(['C', 'C', 'H', 'H', 'H', 'H', 'C', 'C', 'H', 'H'], dtype='<U1'),							              'symbols': array(['C', 'C', 'H', 'H', 'H', 'H', 'C', 'C', 'H', 'H'], dtype='<U1'),
              'validated': True},															              'validated': True},
 'properties': {},																	 'properties': {},
 'protocols': {},																	 'protocols': {},
 'provenance': {'cpu': 'Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz',											 'provenance': {'cpu': 'Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz',
                'creator': 'GCP',															                'creator': 'GCP',
                'hostname': 'psinet',															                'hostname': 'psinet',
                'qcengine_version': 'v0.18.0+12.g30ed0d2.dirty',											                'qcengine_version': 'v0.18.0+12.g30ed0d2.dirty',
                'routine': 'qcengine.programs.gcp.parse_output',											                'routine': 'qcengine.programs.gcp.parse_output',
                'username': 'psilocaluser',														                'username': 'psilocaluser',
                'version': '2.2',														     |	                'version': '2.1.2',
                'wall_time': 1.2454249858856201},												     |	                'wall_time': 1.2334864139556885},
 'return_result': array([[-6.11830758e-20, -6.91724066e-05,  1.09826314e-04],									     |	 'return_result': array([[ 2.33645568e-21,  1.88406240e-04,  9.40795164e-05],
       [ 7.12044626e-20,  6.91724066e-05,  1.09826314e-04],											     |	       [-4.67291136e-21, -1.88406240e-04,  9.40795164e-05],
       [-1.52546975e-03,  1.10309566e-03,  2.80148912e-05],											     |	       [ 2.63848984e-05,  6.77932735e-05,  2.46892935e-05],
       [ 1.52546975e-03,  1.10309566e-03,  2.80148912e-05],											     |	       [-2.63848984e-05,  6.77932735e-05,  2.46892935e-05],
       [ 1.52546975e-03, -1.10309566e-03,  2.80148912e-05],											     |	       [-2.63848984e-05, -6.77932735e-05,  2.46892935e-05],
       [-1.52546975e-03, -1.10309566e-03,  2.80148912e-05],											     |	       [ 2.63848984e-05, -6.77932735e-05,  2.46892935e-05],
       [-2.77691314e-24, -5.08629086e-24,  1.82372296e-04],											     |	       [ 1.14084750e-23,  6.84508500e-23, -1.57281683e-04],
       [-6.06354197e-23, -1.02697054e-21, -2.59507279e-04],											     |	       [ 3.65071200e-23,  1.82535600e-22,  7.77370261e-05],
       [-4.59899866e-22,  3.60801817e-21,  1.47563104e-03],											     |	       [ 0.00000000e+00,  0.00000000e+00, -2.02905480e-04],
       [ 3.74257354e-26, -2.25113303e-25, -1.73020825e-03]]),											     |	       [ 0.00000000e+00, -1.14084750e-24, -4.46606984e-06]]),
 'schema_name': 'qcschema_output',															 'schema_name': 'qcschema_output',
 'schema_version': 1,																	 'schema_version': 1,
 'stderr': None,																	 'stderr': None,
 'stdout': '  ___________________________________________ \n'											     |	 'stdout': ' -------------------------------------------\n'
           '                                              \n'											     <
           ' |              **  g C P  **                |\n'												           '|              **  g C P  **                |\n'
           ' |  a geometrical counterpoise correction    |\n'												           '|  a geometrical counterpoise correction    |\n'
           ' |     H.Kruse J.G.Brandenburg S.Grimme      |\n'												           '|     H.Kruse J.G.Brandenburg S.Grimme      |\n'
           ' |          Version 2.02 Nov 2016            |\n'											     |	           ' -------------------------------------------\n'
           ' |                                           |\n'											     |	           'mctc-gcp version 2.1.2\n'
           '  ___________________________________________ \n'											     <
           ' \n'																	           '\n'
           ' Please cite work done with this code as:\n'												           'Please cite work done with this code as:\n'
           ' H. Kruse, S. Grimme J. Chem. Phys. 136, 154101 (2012)\n'											           'H. Kruse, S. Grimme J. Chem. Phys. 136, 154101 (2012)\n'
           ' DOI: 10.1063/1.3700154 \n'															           'DOI: 10.1063/1.3700154\n'
           ' For the periodic version, please also cite:\n'												           'For the periodic version, please also cite:\n'
           ' J. G. Brandenburg, M. Alessio, B. Civalleri, M. F. Peintinger\n'										           'J. G. Brandenburg, M. Alessio, B. Civalleri, M. F. Peintinger\n'
           ' T. Bredow, S.Grimme J. Phys. Chem. A 117, 9282-9292 (2013).\n'										           'T. Bredow, S.Grimme J. Phys. Chem. A 117, 9282-9292 (2013).\n'
           ' DOI: 10.1021/jp406658y \n'															           'DOI: 10.1021/jp406658y\n'
           ' \n'																	           '\n'
           ' \n'																	           ' \n'
           ' reading...      XYZ file [angst]: gcp_geometry.xyz\n'										     <
           ' \n'																     <
           '  level           hf/sv  basis: SV (Ahlrichs)\n'												           '  level           hf/sv  basis: SV (Ahlrichs)\n'
           '  Nbf                48\n'															           '  Nbf                48\n'
           '  Atoms              10\n'															           '  Atoms              10\n'
           ' \n'																	           ' \n'
           '  Parameters: \n'																           '  Parameters: \n'
           '  sigma         0.1724\n'															           '  sigma         0.1724\n'
           '  eta           1.2804\n'															           '  eta           1.2804\n'
           '  alpha         0.8568\n'															           '  alpha         0.8568\n'
           '  beta          1.2342\n'															           '  beta          1.2342\n'
																		     >	           '  dmp_scal      4.0000\n'
																		     >	           '  dmp_exp       6.0000\n'
           ' \n'																	           ' \n'
           '  \n'																	           '  \n'
           ' element parameters hf/sv\n'														           ' element parameters hf/sv\n'
           '  elem   emiss   nbas    elem   emiss   nbas    elem   emiss   '										           '  elem   emiss   nbas    elem   emiss   nbas    elem   emiss   '
           'nbas\n'																	           'nbas\n'
           '    h    0.00904    2      he   0.00884    2      li   0.20419    '										           '    h    0.00904    2      he   0.00884    2      li   0.20419    '
           '3\n'																	           '3\n'
           '    be   0.10775    3      b    0.04953    9      c    0.05548    '										           '    be   0.10775    3      b    0.04953    9      c    0.05548    '
           '9\n'																	           '9\n'
           '    n    0.07282    9      o    0.10085    9      f    0.13403    '										           '    n    0.07282    9      o    0.10085    9      f    0.13403    '
           '9\n'																	           '9\n'
           '    ne   0.17422    9      na   0.31562    7      mg   0.26112    '										           '    ne   0.17422    9      na   0.31562    7      mg   0.26112    '
           '7\n'																	           '7\n'
           '    al   0.16857   13      si   0.15229   13      p    0.14691   '										           '    al   0.16857   13      si   0.15229   13      p    0.14691   '
           '13\n'																	           '13\n'
           '    s    0.16825   13      cl   0.18788   13      ar   0.21116   '										           '    s    0.16825   13      cl   0.18788   13      ar   0.21116   '
           '13\n'																	           '13\n'
           '    k    0.37425   11      ca   0.46097   11      sc   0.44489   '										           '    k    0.37425   11      ca   0.46097   11      sc   0.44489   '
           '21\n'																	           '21\n'
           '    ti   0.40499   21      v    0.37841   21      cr   0.37344   '										           '    ti   0.40499   21      v    0.37841   21      cr   0.37344   '
           '21\n'																	           '21\n'
           '    mn   0.36125   21      fe   0.36001   21      co   0.36293   '										           '    mn   0.36125   21      fe   0.36001   21      co   0.36293   '
           '21\n'																	           '21\n'
           '    ni   0.24380   21      cu   0.40530   21      zn   0.39651   '										           '    ni   0.24380   21      cu   0.40530   21      zn   0.39651   '
           '21\n'																	           '21\n'
           '    ga   0.36267   27      ge   0.36046   27      as   0.36336   '										           '    ga   0.36267   27      ge   0.36046   27      as   0.36336   '
           '27\n'																	           '27\n'
           '    se   0.38417   27      br   0.39970   27      kr   0.41731   '										           '    se   0.38417   27      br   0.39970   27      kr   0.41731   '
           '27\n'																	           '27\n'
           '  \n'																	           '  \n'
           '   \n'																	           '   \n'
           ' cutoffs: \n'																           ' cutoffs: \n'
           '   distance [bohr] 60.0\n'															           '   distance [bohr] 60.0\n'
           '   noise    [a.u.] 2.2E-16\n'														           '   noise    [a.u.] 2.2E-16\n'
           '   SR-damping      F\n'														     |	           '   SR-damping      T\n'
           '   \n'																	           '   \n'
           '      #     ON  sites    Nvirt           Emiss    BSSE [kcal/mol]\n'									           '      #     ON  sites    Nvirt           Emiss    BSSE [kcal/mol]\n'
           '      1      6      9      6.0          0.0555          2.8760\n'									     |	           '      1      6      9      6.0          0.0555          0.3915\n'
           '      2      6      9      6.0          0.0555          2.8760\n'									     |	           '      2      6      9      6.0          0.0555          0.3915\n'
           '      3      1      9      1.5          0.0090          0.1846\n'									     |	           '      3      1      9      1.5          0.0090          0.0729\n'
           '      4      1      9      1.5          0.0090          0.1846\n'									     |	           '      4      1      9      1.5          0.0090          0.0729\n'
           '      5      1      9      1.5          0.0090          0.1846\n'									     |	           '      5      1      9      1.5          0.0090          0.0729\n'
           '      6      1      9      1.5          0.0090          0.1846\n'									     |	           '      6      1      9      1.5          0.0090          0.0729\n'
           '      7      6      9      6.0          0.0555          1.6288\n'									     |	           '      7      6      9      6.0          0.0555          0.1542\n'
           '      8      6      9      6.0          0.0555          1.6586\n'									     |	           '      8      6      9      6.0          0.0555          0.1870\n'
           '      9      1      9      1.5          0.0090          0.1346\n'									     |	           '      9      1      9      1.5          0.0090          0.0455\n'
           '     10      1      9      1.5          0.0090          0.1033\n'									     |	           '     10      1      9      1.5          0.0090          0.0154\n'
           'cpu-time for gradient    0.0 s\n'														           'cpu-time for gradient    0.0 s\n'
           '                 \n'															           '\n'
           ' ** gCP correction ** \n'															           '** gCP correction ** \n'
           '  Egcp:        0.0159608596 / (a.u.) ||      10.0156 / (kcal/mol)\n'								     |	           '  Egcp:        0.0023531419 / (a.u.) ||       1.4766 / (kcal/mol)\n'
           '                 \n'															           '\n'
           ' |G|=  1.463203748874275E-002\n'													     |	           ' |G|=   1.4828316340119714E-003\n'
           ' no gradient file found to add G(gcp)!\n'													           ' no gradient file found to add G(gcp)!\n'
           ' hence written to file gcp_gradient\n'												     |	           ' hence written to file gcp_gradient\n',
           'cpu-time for gCP    0.0 s\n'													     <
           ' \n'																     <
           '     normal termination of gCP\n',													     <
 'success': True,																	 'success': True,
 'wavefunction': None}																	 'wavefunction': None}
{'CURRENT ENERGY': '0.0159608596', 'GCP CORRECTION ENERGY': '0.0159608596', 'HF/SV GCP CORRECTION ENERGY': '0.0159608596', 'CURRENT GRADIENT': [-6.1 |	{'CURRENT ENERGY': '0.0023531419', 'GCP CORRECTION ENERGY': '0.0023531419', 'HF/SV GCP CORRECTION ENERGY': '0.0023531419', 'CURRENT GRADIENT': [2.33
==================================================================================================================================================== |	----------------------------------------------------------------------------------------------------------------------------------------------------
FAILED qcengine/programs/tests/test_dftd3_mp2d.py::test_gcp[inp0-qcmol] - assert 0								     |	ERROR    root:testing.py:20     test_gcp.............................................FAILED
																		     >	ERROR    root:testing.py:21         test_gcp: computed value (0.002353142) does not match (0.015960860) to atol=1e-07 by difference (-0.013607718).

Provide flag to enable damping for all methods

The bug in #8 showed large deviations between individual GCP corrections, yet relative GCP corrections were largely unaffected. For some systems we checked the difference and found an improvement with enabled damping.

To further investigate this a command line option could be added to enable the damping for other GCP corrected methods than the 3c methods.

`-hess` flag seems to be ignored

No additional output is written when the -hess flag is specified. I've tried for a few methods using the condaforge mctc-gcp version 2.3.1.

HSE-3c parameterization differs from reference

From the supporting information of the original HSE-3c paper (Phys. Chem. Chem. Phys., 2016,18, 15519-15523 DOI), the gCP parameters for HSE-3c should be:
sigma = 1.00000
eta = 1.40858
alpha = 0.29083
beta = 1.95260

In the code, slightly different values are used:

  p(1)=1.00000d0 ! sigma
  p(2)=1.32378d0 ! eta
  p(3)=0.28314d0 ! alpha
  p(4)=1.94527d0 ! beta

Is this a bug or some later update to the HSE-3c parameters?

Provide C API

The GCP library should provide a C API using iso_c_binding to provide better access than just the command line interface for non-Fortran project. This would allow to create a Python API based on the CFFI wrapper as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.