Codebase list votca-xtp / d0bbc74
New upstream version 2021 Nicholas Breen 1 year, 11 months ago
983 changed file(s) with 519200 addition(s) and 359270 deletion(s). Raw diff Collapse all Expand all
+0
-47
.clang-format less more
0 ---
1 # BasedOnStyle: Google
2 AccessModifierOffset: -1
3 ConstructorInitializerIndentWidth: 4
4 AlignEscapedNewlinesLeft: true
5 AlignTrailingComments: true
6 AllowAllParametersOfDeclarationOnNextLine: true
7 AlwaysBreakTemplateDeclarations: true
8 AlwaysBreakBeforeMultilineStrings: true
9 AllowShortIfStatementsOnASingleLine: true
10 AllowShortLoopsOnASingleLine: true
11 BreakBeforeBinaryOperators: false
12 BreakBeforeTernaryOperators: true
13 BreakConstructorInitializersBeforeComma: false
14 BinPackParameters: true
15 ColumnLimit: 80
16 ConstructorInitializerAllOnOneLineOrOnePerLine: true
17 DerivePointerBinding: true
18 ExperimentalAutoDetectBinPacking: false
19 IndentCaseLabels: true
20 MaxEmptyLinesToKeep: 1
21 NamespaceIndentation: None
22 ObjCSpaceBeforeProtocolList: false
23 PenaltyBreakBeforeFirstCallParameter: 1
24 PenaltyBreakComment: 60
25 PenaltyBreakString: 1000
26 PenaltyBreakFirstLessLess: 120
27 PenaltyExcessCharacter: 1000000
28 PenaltyReturnTypeOnItsOwnLine: 200
29 PointerBindsToType: true
30 SpacesBeforeTrailingComments: 2
31 Cpp11BracedListStyle: true
32 Standard: Auto
33 IndentWidth: 2
34 TabWidth: 8
35 UseTab: Never
36 BreakBeforeBraces: Attach
37 IndentFunctionDeclarationAfterType: true
38 SpacesInParentheses: false
39 SpacesInAngles: false
40 SpaceInEmptyParentheses: false
41 SpacesInCStyleCastParentheses: false
42 SpaceAfterControlStatementKeyword: true
43 SpaceBeforeAssignmentOperators: true
44 ContinuationIndentWidth: 4
45 ...
46
+0
-7
.codecov.yml less more
0 coverage:
1 precision: 1
2 round: down
3 range: "70...100"
4 ignore:
5 - /usr/include/
6 - src/tests/
+0
-40
.github/workflows/changelog.yml less more
0 name: Changelog
1 on:
2 issue_comment:
3 types: [created]
4 jobs:
5 edit:
6 name: add entry
7 if: ${{ startsWith(github.event.comment.body, '@votca-bot changelog:') }}
8 runs-on: ubuntu-latest
9 steps:
10 - name: Check if message comes from PR
11 uses: octokit/request-action@v2.x
12 id: issue_info
13 with:
14 route: GET /repos/:repository/issues/:pull_number
15 repository: ${{ github.repository }}
16 pull_number: ${{ github.event.issue.number }}
17 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 - name: Get PR info
19 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
20 uses: octokit/request-action@v2.x
21 id: pr_info
22 with:
23 route: GET /repos/:repository/pulls/:pull_number
24 repository: ${{ github.repository }}
25 pull_number: ${{ github.event.issue.number }}
26 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 - name: Checkout head branch from PR
28 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
29 uses: actions/checkout@v2.2.0
30 with:
31 repository: ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }}
32 ref: ${{ fromJSON(steps.pr_info.outputs.data).head.ref }}
33 token: ${{ secrets.VOTCA_BOT_TOKEN }}
34 - name: Create and commit changelog entry
35 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
36 uses: votca/actions/changelog@master
37 with:
38 message: ${{ github.event.comment.body }}
39 pr_number: ${{ github.event.issue.number }}
+0
-75
.github/workflows/continuous-integration-workflow.yml less more
0 name: CI
1 on:
2 pull_request:
3 branches:
4 - master
5 - stable
6
7 jobs:
8 CI:
9 continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'opensuse:latest' || matrix.distro == 'fedora:rawhide' || matrix.continue-on-error == true }}
10 strategy:
11 matrix:
12 distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:latest', 'ubuntu:devel', 'ubuntu:rolling', 'ubuntu:18.04', 'fedora:intel']
13 toolchain: [gnu, clang]
14 cmake_build_type: [Release, Debug]
15 minimal: [false]
16 own_gmx: [false]
17 module_build: [false]
18 coverage: [false]
19 no_regression_testing: [true]
20 include:
21 - distro: 'fedora:latest'
22 toolchain: gnu
23 cmake_build_type: Release
24 module_build: true
25 no_regression_testing: true
26 runs-on: ubuntu-latest
27 container: ghcr.io/votca/buildenv/${{ matrix.distro }}
28 steps:
29 - uses: actions/checkout@v2.2.0
30 with:
31 fetch-depth: 0
32 - name: Run Votca Setup
33 id: setup
34 uses: votca/actions/setup@master
35 with:
36 distro: ${{ matrix.distro }}
37 toolchain: ${{ matrix.toolchain }}
38 minimal: ${{ matrix.minimal == true }}
39 module: ${{ matrix.module_build == true }}
40 own_gmx: ${{ matrix.own_gmx == true }}
41 regression_testing: ${{ matrix.no_regression_testing != true }}
42 coverage: ${{ matrix.coverage }}
43 cmake_build_type: ${{ matrix.cmake_build_type }}
44 ctest_args: ${{ matrix.ctest_args }}
45 cmake_args: ${{ matrix.cmake_args }}
46 - uses: actions/cache@v2
47 with:
48 path: ~/.ccache
49 key: ${{ steps.setup.outputs.cache_key }}
50 restore-keys: ${{ steps.setup.outputs.cache_restore_key }}
51 - name: CMake
52 run: mkdir builddir && cd builddir && cmake ${{ steps.setup.outputs.cmake_args }} ../votca
53 - name: Build
54 run: |
55 ccache -z
56 cmake --build builddir -- -j ${{ steps.setup.outputs.jobs }}
57 ccache -s
58 - name: Tests
59 run: ctest --output-on-failure ${{ steps.setup.outputs.ctest_args }}
60 working-directory: builddir
61 - name: Doxygen
62 if: ${{ ! matrix.module_build }}
63 run: cmake --build builddir --target doxygen
64 - name: Build Sphinx
65 if: ${{ steps.setup.outputs.build_sphinx == 'true' }}
66 run: cmake --build builddir --target doc
67 - name: Test DESTDIR Install
68 if: ${{ ! matrix.module_build }}
69 run: DESTDIR=${PWD}/install cmake --build builddir --target install && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install
70 - name: Install
71 run: sudo cmake --build builddir --target install
72 - name: Check Formatting
73 if: ${{ steps.setup.outputs.check_format == 'true' }}
74 run: cmake --build builddir --target format && git -C votca/${{ steps.setup.outputs.module }} diff --exit-code
+0
-37
.github/workflows/create-pr.yml less more
0 name: Create PR
1 on:
2 push:
3 branches:
4 - stable
5
6 jobs:
7 PR:
8 name: Create
9 if: github.repository_owner == 'votca'
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout code
13 uses: actions/checkout@master
14 with:
15 ref: ${{ github.event.ref }}
16 fetch-depth: 0
17 token: ${{ secrets.VOTCA_BOT_TOKEN }}
18 - name: Try to merge master branch
19 run: |
20 git config --global user.name "Votca Bot"
21 git config --global user.email "github@votca.org"
22 git checkout -b stable_fixes
23 git merge origin/master || true
24 git push origin stable_fixes
25 - name: Create Pull Request
26 uses: actions/github-script@0.3.0
27 with:
28 github-token: ${{ secrets.VOTCA_BOT_TOKEN }}
29 script: |
30 github.pulls.create({
31 owner: 'votca',
32 repo: 'xtp',
33 title: 'Fixes from stable',
34 head: 'stable_fixes',
35 base: 'master'
36 })
+0
-28
.github/workflows/create-release.yml less more
0 name: Make Release
1 on:
2 push:
3 tags:
4 - 'v[1-9]*'
5
6 jobs:
7 release:
8 name: Make Release
9 if: github.repository_owner == 'votca'
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout code
13 uses: actions/checkout@v2
14 - name: Create Changlog
15 uses: votca/actions/release_changelog@master
16 with:
17 version: ${{ github.ref }}
18 changelog: 'release_changelog.md'
19 - name: Create Release
20 uses: actions/create-release@v1
21 env:
22 GITHUB_TOKEN: ${{ secrets.VOTCA_BOT_TOKEN }}
23 with:
24 tag_name: ${{ github.ref }}
25 release_name: ${{ github.ref }}
26 prerelease: ${{ contains(github.ref, 'rc') }}
27 body_path: 'release_changelog.md'
+0
-48
.github/workflows/format.yml less more
0 name: Format
1 on:
2 issue_comment:
3 types: [created]
4 jobs:
5 edit:
6 name: clang-format
7 if: ${{ github.event.comment.body == '@votca-bot format' }}
8 runs-on: ubuntu-latest
9 container: ghcr.io/votca/buildenv/format:latest
10 steps:
11 - name: Check if message comes from PR
12 uses: octokit/request-action@v2.x
13 id: issue_info
14 with:
15 route: GET /repos/:repository/issues/:pull_number
16 repository: ${{ github.repository }}
17 pull_number: ${{ github.event.issue.number }}
18 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 - name: Get PR info
20 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
21 uses: octokit/request-action@v2.x
22 id: pr_info
23 with:
24 route: GET /repos/:repository/pulls/:pull_number
25 repository: ${{ github.repository }}
26 pull_number: ${{ github.event.issue.number }}
27 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 - name: Checkout head branch from PR
29 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
30 uses: actions/checkout@master
31 with:
32 repository: ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }}
33 ref: ${{ fromJSON(steps.pr_info.outputs.data).head.ref }}
34 token: ${{ secrets.VOTCA_BOT_TOKEN }}
35 - name: Run clang-format
36 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
37 run: |
38 curl -OL https://github.com/votca/votca/raw/master/.clang-format
39 find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 clang-format -i -style=file
40 - name: Commit and push
41 if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
42 run: |
43 git config --global user.name "Votca Bot"
44 git config --global user.email "github@votca.org"
45 git add -u
46 git commit -m "Format code using $(clang-format --version)" || true
47 git push
+0
-18
.github/workflows/forward-to-votca.yml less more
0 name: Forward
1 on:
2 push:
3 branches:
4 - master
5 - stable
6
7 jobs:
8 VOTCA:
9 if: github.repository_owner == 'votca'
10 runs-on: ubuntu-latest
11 steps:
12 - name: Update submodule
13 uses: votca/actions/forward@master
14 with:
15 module: ${{ github.repository }}
16 token: ${{ secrets.VOTCA_BOT_TOKEN }}
17
+0
-48
.gitignore less more
0 *~
1 Makefile
2
3 libvotca*.a
4 libvotca*.so
5 libvotca*.so.*
6
7 share/doc/html
8 share/doc/Doxyfile
9
10 include/votca/xtp/votca_config.h
11 src/libxtp/gitversion.h
12 include/votca/xtp/votca_config.h
13
14 src/tools/xtp_dump
15 src/tools/xtp_parallel
16 src/tools/xtp_map
17 src/tools/xtp_run
18 src/tools/xtp_tools
19 src/tools/xtp_overlap
20 src/tools/xtp_kmc_run
21 src/dipro/*.mod
22 src/dipro/*.x
23 src/tools/*.man
24
25 scripts/xtp_dipro.out
26 scripts/xtp_dipro
27 scripts/xtp_update
28 scripts/xtp_update.out
29 scripts/xtp_testsuite
30 scripts/xtp_testsuite.out
31 scripts/xtp_update_exciton
32 scripts/xtp_update_exciton.out
33 scripts/xtp_basisset
34 scripts/xtp_basisset.out
35 scripts/xtp_makeauxbasis
36 scripts/xtp_makeauxbasis.out
37
38 netbeans
39 .dep.inc
40 */nbproject/private
41
42 CMakeFiles
43 cmake_install.cmake
44 CMakeCache.txt
45 install_manifest.txt
46
47 /build
+0
-141
CHANGELOG.md less more
0 For more detailed information about the changes see the history of the
1 [repository](https://github.com/votca/xtp/commits/master).
2
3 ## Version 1.6.4 (released 12.01.21)
4 * fix build on openSUSE (#622)
5 * Refactored logger (#625)
6
7 ## Version 1.6.3 (released 09.12.20)
8 * switch to ghcr.io for CI (#555)
9 * fixing Gaussian guess read keyword (#562, #563)
10 * improved kmc output (#575)
11 * use master .clang-format in format action (#582, #584)
12 * strip windows line endings in readers (#596)
13
14 ## Version 1.6.2 _SuperGitta_ (released 22.08.20)
15 * move CI to GitHub Actions (#512, #514, #516, #519)
16 * add more checks to the dft_parse_part (#521)
17 * make unit tests work in parallel (#530)
18
19 ## Version 1.6.1 (released 21.06.20)
20 * fix warnings on Ubuntu 20.04 (#438, #460)
21 * remove obsolete boost define (#440)
22
23 ## Version 1.6 _SuperPelagia_ (released 17.04.20)
24 * fix 32-bit build (#381, #380)
25 * remove duplicated basissets (#384, #386, #387)
26 * fix clang-10 warnings (#394)
27 * fix unit_test_eeinteractor on OpenSUSE (#341, #428)
28
29 ## Version 1.6_rc2 (released 10.02.20)
30 * fix remove giant logo from tarball (#337)
31 * fix assertions related to GLIBCXX_ASSERTIONS (#345)
32 * remove unused boost serialisation (#346)
33 * fix build on 32-bit archs (#347)
34 * add ENABLE_HIGH_MEMORY_TESTS cmake option (#356)
35 * fix copyright (#363)
36 * remove old doxygen target (#365)
37 * fix some gcc10 warnings (#376)
38 * Add external fields to dft calculations (#351, #353)
39 * added def2 and cc basis sets (#355)
40 * added apdft (#350)
41 * added test to cubefile reader (#344)
42 * fix state tracker (#333)
43 * grid class refator (#335)
44 * changed ppm screening (#371)
45
46 ## Version 1.6_rc1 (released 04.12.19)
47 * completely new statefile in hdf5 format for larger systems
48 * new electrostatics with PCG solver
49 * new QM/MM engine with freely configurable regions
50 * exact GW-BSE for small systems
51 * new iterative matrix solvers for large systems
52 * CUDA support for parts of GW-BSE
53 * full LAMMPS support
54 * improved testing
55 * new tutorial with more functionality
56 * deleted netbeans support
57 * removed old manual
58 * Major CMake refactor
59
60 ## Version 1.5.1 (released 20.11.19)
61 * remove exit() calls in the library
62 * fix build on CentOs7
63
64 ## Version 1.5 _SuperVictor_ (released 31.01.19)
65 * enable gitlab CI
66
67 ## Version 1.5_rc3 (released 19.01.19)
68 * travis: fixed bug in building tags
69
70 ## Version 1.5_rc2 (released 16.01.19)
71 * fix parallel build of manual
72 * fix usage on inkscape on arm arch
73 * clean up namespace in header
74
75 ## Version 1.5_rc1 (released 28.12.18)
76 * optimized GW-BSE code and integral engine
77 * added closed shell DFT code which supports hybrid functionals
78 * removed ctp dependency
79 * atm no support for site energy calculation
80 * CHELPG fit for ground and excited states
81 * merged igwbse and idft into one calculator
82 * added unit and integration test
83 * improved geometry optimiser
84 * replaced ublas with Eigen3
85 * replaced boost serialisation with hdf5 files
86
87 ## Version 1.4.1 (released 02.09.17)
88
89 * fix pkg-config file
90
91 ## Version 1.4 (released 29.10.16)
92
93 * fixed a bug in gwbse
94 * added missing copyright
95 * cmake: fixed underlinking
96
97 ## Version 1.4_rc1 (released 26.09.16)
98
99 * include manual
100 * an extension of the whole workflow from: electrons and holes, to singlet and triplet excitons
101 * a fully functional GW-BSE code optimized for: molecular properties, including excited state geometry optimizsation
102 * Inclusion of LIBXC to calculate Exchange correlation matrices
103 * allowing interfacing GW-BSE with many quantum mechanical packages
104 * support for ORCA DFT package
105 * framework to use stochastic models to generate larger system
106 * better performance of larger systems
107 * new calculators: egwbse,igwbse,ewald,.....
108 * support for intel mkl library and compilers for better performance
109 * A periodic polarisation embedding: to calculate classical configuration energies without cutoffs
110 * xtp_update_exciton to update state file to newest format
111 * integration of moo and kmc into xtp for easier installation
112 * kmc_lifetime calculator to simulate exciton movement with lifetimes
113 * partialcharges to extract atomic charges from qm calculation
114 * renaming from ctp to xtp
115 * many bugfixes
116
117 ## Version 1.3 (released XX.09.15)
118
119 * new executables: ctp_tools, ctp_dump, ctp_parallel, xtp_testsuite, xtp_update
120 * ctp_tools wraps light-weight tools that assist e.g. in generating the system mapping file
121 * ctp_dump extracts information from the state file to human-readable format
122 * ctp_parallel wraps heavy-duty job-based calculators: allows synchronization across processes
123 * ctp_testsuite provides an easy-to-use environment to run: selected tests, individual calculators
124 * ctp_update updates an existent state file to the current version
125 * new calculators: edft, idft, pdb2map, xqmultipole, ...
126 * edft / idft: provide interfaces to the GAUSSIAN, TURBOMOLE & NWCHEM package, using packages computes: couplings, internal energies, partial charges
127 * pdb2map (generates a system mapping file from an input coordinate file)
128 * xqmultipole computes classical configuration energies of: charged clusters embedded in a molecular environment
129 * enhanced usability via the command-line help, tutorial & test-suite
130 * a GUI tutorial assists with the first practical steps in using VOTCA-CTP
131 * an extended and homogenized help system provides: short infos on individual calculator options from the command line
132
133 ## Version 1.0 (released 23.10.11)
134
135 * parallel evaluation of site energies using: Thole model + GDMA - Tinker no longer required
136 * much clearer input files (and many more checks for input errors)
137 * most of calculators are parallel and can be used on a cluster
138 * bug in zindo/ctp interface fixed
139 * state file now contains: the atomistic trajectory, rigid fragments, conjugated segments
140 * support for several MD frames
0 For more detailed information about the changes see the history of the
1 `repository <https://github.com/votca/xtp/commits/master>`__.
2
3 Version 2021 (released 13.03.21)
4 ================================
5
6 - fix CI on rawhide (#663)
7 - add xtp_qmmm2qm to cmake install (#665)
8 - add auto-cancel workflow to GitHub Actions (#674)
9
10 Version 2021-rc.1 (released 13.03.21)
11 =====================================
12
13 - G0W0 rpa energies are fixed in BSE (#383)
14 - Hqp part of BSE can be separate from QP range (#388)
15 - Fixed Cuda implementation (#391)
16 - Plain, linear, and Anderson mixing in evGW
17 - Use a general syntax to represent all QMPackages input (#318)
18 - Remove support for both Gaussian and NWChem (#318)
19 - Fixed executable path check (#400)
20 - Usage of offdiagonal elements of Hqp in BSE optional, default: with
21 offdiagonals (#402)
22 - refactored MO reordering of external QMPackages (#406)
23 - Add defaults to XML (#319, #413)
24 - fix build with gcc-10 (#422, #424)
25 - Add name command line argument (#426)
26 - fix usage of PROJECT\_SOURCE\_DIR in cmake (#431)
27 - check that temperature is positive for KMC (#432)
28 - document cmake options and packages (#434)
29 - remove long gone MKL option for gitlab-ci (#435)
30 - add documentation using Sphinx (#433, #615)
31 - add kokkos-based Ewald solver (#444, #446, #485)
32 - allow multiple choices for the calculator options (#442, #445)
33 - move bsecoupling defaults to xml (#451)
34 - address missing includes (#452)
35 - fix readjobfiles path (#453)
36 - standardising include order and style in header files (#448)
37 - changed to OpenMP reductions instead of hand crafted solutions (#466,
38 #471, #493)
39 - switch to GitHub Actions as CI (#467, #474, #477, #482, #500, #502,
40 #518, #549, #637)
41 - move tutorial to its own repo (#450)
42 - removed share/packages folder (#475)
43 - copy orca \*.gbw files in eqm (#472)
44 - improve mkl support (#479)
45 - add def2-tzvp, def2-tzvpp, def2-qzvp, def2-qzvpp for Rb,I,Ag,Xe
46 (#480)
47 - create a map between orca and libxc functional names (#461)
48 - fix path to share/data (#486, #487)
49 - remove special XML symbols (#488)
50 - standardize includes in src files (#462)
51 - add cmake exported target (#489)
52 - update codacy badge (#490)
53 - add mkl builds to CI (#496)
54 - convert markdown to rst (#497)
55 - enable CXX only in CMake (#499)
56 - implement RPA correlation energy (#498)
57 - added verbose option for rootfinder (#503)
58 - fix orca pointcharges (#504)
59 - remove constant cutoff from neighborlist (#508, #509)
60 - fix default and flags properties issue (#511)
61 - add more checks to the dft_parse_part (#510)
62 - add NOSCF option for iqm in internal and external DFT (#483)
63 - added versions to output files (#523)
64 - write an empty state file if it does not exist yet (#526)
65 - fix double unit conversion (#531)
66 - Unittests can read input and reference values from files (#529)
67 - fix double SCF in ORCA keyword line (#533)
68 - xtp internally uses only single shells. (#539)
69 - Refactor orbital reordering (#537)
70 - fix build with clang-11 (#546)
71 - Add a molden parser to xtp (#547)
72 - Correct self-energy frequency derivative (#550)
73 - fix multiline orca keyword (#552)
74 - Contour Deformation Approach (CDA) for self-energy implemented (#4, #548)
75 - BSE with perturbative dynamical screening (#3, #560)
76 - Correction of full BSE energy contribution in analysis output (#560)
77 - Bump required CMake version to 3.12 (#568)
78 - Refactored calculator interface (#570)
79 - Fixed boost test deprecation warnings (#569)
80 - Refactored CUDA-OpenMP integration (#571)
81 - replaced own integrals with the libint library (#559)
82 - improved kmc output (#574)
83 - fix build on Ubuntu 16.04 (#577)
84 - use unique_ptr in factory (#581)
85 - fix QMMM with QP (#590, #591)
86 - fix bug in setCenter of AODipole (#593)
87 - extra check in orca unit test (#594)
88 - fixed atomid numbering while adding containers (#599)
89 - added tool for automatic mapping file generation (#595)
90 - Added GPU support for RPA (#601)
91 - fixed int64 interface to RDKIT (#602)
92 - remove kokkos dependent ewald (#612)
93 - fixed Sphinx warnings (#609)
94 - better error for exceeded angular momentum in libint (#613)
95 - fixed wrong QP-QMMM energy with non-zero QPmin (#620)
96 - fixed density analysis options (#627)
97 - Use libint transformation matrices (#630)
98 - Added script to extract orbitals from qmmm statefile (#629)
99 - clean up XTP app message (#631)
100 - fixed EXX 3c mode (#640)
101
102 Version 1.6.4 (released 12.01.21)
103 =================================
104
105 - fix build on openSUSE (#622)
106 - refactored logger (#625)
107
108 Version 1.6.3 (released 09.12.20)
109 =================================
110
111 - switch to ghcr.io for CI (#555)
112 - fixing Gaussian guess read keyword (#562, #563)
113 - improved kmc output (#575)
114 - use master .clang-format in format action (#582, #584)
115 - strip windows line endings in readers (#596)
116
117 Version 1.6.2 *SuperGitta* (released 22.08.20)
118 =================================
119
120 - move CI to GitHub Actions (#512, #514, #516,
121 #519)
122 - add more checks to the dft_parse_part (#521)
123 - make unit tests work in parallel (#530)
124
125 Version 1.6.1 (released 21.06.20)
126 =================================
127
128 - fix warnings on Ubuntu 20.04 (#438, #460)
129 - remove obsolete boost define (#440)
130
131 Version 1.6 *SuperPelagia* (released 17.04.20)
132 ==============================================
133
134 - fix 32-bit build (#381, #380)
135 - remove duplicated basissets (#384, #386, #387)
136 - fix clang-10 warnings (#394)
137 - fix unit\_test\_eeinteractor on OpenSUSE (#341, #428)
138
139 Version 1.6\_rc2 (released 10.02.20)
140 ====================================
141
142 - fix remove giant logo from tarball (#337)
143 - fix assertions related to GLIBCXX\_ASSERTIONS (#345)
144 - remove unused boost serialisation (#346)
145 - fix build on 32-bit archs (#347)
146 - add ENABLE\_HIGH\_MEMORY\_TESTS cmake option (#356)
147 - fix copyright (#363)
148 - remove old doxygen target (#365)
149 - fix some gcc10 warnings (#376)
150 - Add external fields to dft calculations (#351, #353)
151 - added def2 and cc basis sets (#355)
152 - added apdft (#350)
153 - added test to cubefile reader (#344)
154 - fix state tracker (#333)
155 - grid class refator (#335)
156 - changed ppm screening (#371)
157
158 Version 1.6\_rc1 (released 04.12.19)
159 ====================================
160
161 - completely new statefile in hdf5 format for larger systems
162 - new electrostatics with PCG solver
163 - new QM/MM engine with freely configurable regions
164 - exact GW-BSE for small systems
165 - new iterative matrix solvers for large systems
166 - CUDA support for parts of GW-BSE
167 - full LAMMPS support
168 - improved testing
169 - new tutorial with more functionality
170 - deleted netbeans support
171 - removed old manual
172 - Major CMake refactor
173
174 Version 1.5.1 (released 20.11.19)
175 =================================
176
177 - remove exit() calls in the library
178 - fix build on CentOs7
179
180 Version 1.5 *SuperVictor* (released 31.01.19)
181 =============================================
182
183 - enable gitlab CI
184
185 Version 1.5\_rc3 (released 19.01.19)
186 ====================================
187
188 - travis: fixed bug in building tags
189
190 Version 1.5\_rc2 (released 16.01.19)
191 ====================================
192
193 - fix parallel build of manual
194 - fix usage on inkscape on arm arch
195 - clean up namespace in header
196
197 Version 1.5\_rc1 (released 28.12.18)
198 ====================================
199
200 - optimized GW-BSE code and integral engine
201 - added closed shell DFT code which supports hybrid functionals
202 - removed ctp dependency
203 - atm no support for site energy calculation
204 - CHELPG fit for ground and excited states
205 - merged igwbse and idft into one calculator
206 - added unit and integration test
207 - improved geometry optimiser
208 - replaced ublas with Eigen3
209 - replaced boost serialisation with hdf5 files
210
211 Version 1.4.1 (released 02.09.17)
212 =================================
213
214 - fix pkg-config file
215
216 Version 1.4 (released 29.10.16)
217 ===============================
218
219 - fixed a bug in gwbse
220 - added missing copyright
221 - cmake: fixed underlinking
222
223 Version 1.4\_rc1 (released 26.09.16)
224 ====================================
225
226 - include manual
227 - an extension of the whole workflow from: electrons and holes, to
228 singlet and triplet excitons
229 - a fully functional GW-BSE code optimized for: molecular properties,
230 including excited state geometry optimizsation
231 - Inclusion of LIBXC to calculate Exchange correlation matrices
232 - allowing interfacing GW-BSE with many quantum mechanical packages
233 - support for ORCA DFT package
234 - framework to use stochastic models to generate larger system
235 - better performance of larger systems
236 - new calculators: egwbse,igwbse,ewald,.....
237 - support for intel mkl library and compilers for better performance
238 - A periodic polarisation embedding: to calculate classical
239 configuration energies without cutoffs
240 - xtp\_update\_exciton to update state file to newest format
241 - integration of moo and kmc into xtp for easier installation
242 - kmc\_lifetime calculator to simulate exciton movement with lifetimes
243 - partialcharges to extract atomic charges from qm calculation
244 - renaming from ctp to xtp
245 - many bugfixes
246
247 Version 1.3 (released XX.09.15)
248 ===============================
249
250 - new executables: ctp\_tools, ctp\_dump, ctp\_parallel,
251 xtp\_testsuite, xtp\_update
252 - ctp\_tools wraps light-weight tools that assist e.g. in generating
253 the system mapping file
254 - ctp\_dump extracts information from the state file to human-readable
255 format
256 - ctp\_parallel wraps heavy-duty job-based calculators: allows
257 synchronization across processes
258 - ctp\_testsuite provides an easy-to-use environment to run: selected
259 tests, individual calculators
260 - ctp\_update updates an existent state file to the current version
261 - new calculators: edft, idft, pdb2map, xqmultipole, ...
262 - edft / idft: provide interfaces to the GAUSSIAN, TURBOMOLE & NWCHEM
263 package, using packages computes: couplings, internal energies,
264 partial charges
265 - pdb2map (generates a system mapping file from an input coordinate
266 file)
267 - xqmultipole computes classical configuration energies of: charged
268 clusters embedded in a molecular environment
269 - enhanced usability via the command-line help, tutorial & test-suite
270 - a GUI tutorial assists with the first practical steps in using
271 VOTCA-CTP
272 - an extended and homogenized help system provides: short infos on
273 individual calculator options from the command line
274
275 Version 1.0 (released 23.10.11)
276 ===============================
277
278 - parallel evaluation of site energies using: Thole model + GDMA -
279 Tinker no longer required
280 - much clearer input files (and many more checks for input errors)
281 - most of calculators are parallel and can be used on a cluster
282 - bug in zindo/ctp interface fixed
283 - state file now contains: the atomistic trajectory, rigid fragments,
284 conjugated segments
285 - support for several MD frames
0 cmake_minimum_required(VERSION 3.10)
1 project(votca-xtp)
0 cmake_minimum_required(VERSION 3.12)
1 project(votca-xtp LANGUAGES CXX)
22
3
4 set(PROJECT_VERSION "1.6.4")
5 set(PROJECT_CONTACT "bugs@votca.org")
6 string(REGEX REPLACE "^[1-9]+\\.([1-9]+).*$" "\\1" SOVERSION "${PROJECT_VERSION}")
7 if (NOT ${SOVERSION} MATCHES "[1-9]+")
8 message(FATAL_ERROR "Could not determind SOVERSION from ${PROJECT_VERSION}")
9 endif (NOT ${SOVERSION} MATCHES "[1-9]+")
3 set(PROJECT_VERSION "2021")
4 string(REGEX REPLACE "[-.].*$" "" SOVERSION "${PROJECT_VERSION}")
5 if (NOT ${SOVERSION} MATCHES "^[0-9]+$")
6 message(FATAL_ERROR "Could not determine SOVERSION (${SOVERSION}) from ${PROJECT_VERSION}")
7 endif (NOT ${SOVERSION} MATCHES "^[0-9]+$")
8 set(PROJECT_CONTACT "https://github.com/votca/xtp/issues")
109
1110 # Cmake modules/macros are in a subdirectory to keep this file cleaner
1211 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
1918 add_definitions(-DDEBUG)
2019 endif()
2120
22 enable_language(CXX)
23
2421 ######################################################################
2522 # compiler tests
2623 # these need ot be done early (before further tests).
2724 #####################################################################
2825
26 include(FeatureSummary)
2927 include(CheckCXXCompilerFlag)
3028 set(CMAKE_CXX_STANDARD 14)
3129 set(CMAKE_CXX_STANDARD_REQUIRED ON)
3230 set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
3331
34 find_package(OpenMP)
35 if (OPENMP_FOUND)
36 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
37 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
32 #openmp with clang smaller version 10 and user defined reductions is buggy https://bugs.llvm.org/show_bug.cgi?id=44134
33 if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
34 find_package(OpenMP 4.5)
35 set_package_properties(OpenMP PROPERTIES TYPE RECOMMENDED PURPOSE "Used for thread parallelization in xtp")
36 else()
37 # in case OpenMP was detected somewhere else
38 unset(OpenMP_FOUND)
3839 endif()
3940
4041 ########################################################################
4142 # User input options #
4243 ########################################################################
4344
44 find_package(LIBXC REQUIRED)
45
46 find_package(PkgConfig REQUIRED)
47 set_package_properties(PkgConfig PROPERTIES TYPE RECOMMENDED PURPOSE "Used to detect libxc and libint package")
48 pkg_check_modules(LIBXC REQUIRED IMPORTED_TARGET libxc)
49 if(NOT TARGET PkgConfig::LIBINT)
50 pkg_check_modules(LIBINT REQUIRED IMPORTED_TARGET libint2>=2.6)
51 endif()
52
4553 find_package(HDF5 1.8 REQUIRED COMPONENTS CXX)
54 set_package_properties(HDF5 PROPERTIES TYPE REQUIRED PURPOSE "Used to read/write HDF5 data files")
4655
4756 if(HDF5_VERSION VERSION_GREATER 1.8)
4857 message(WARNING "HDF5 will be used such that it is compatible with version 1.8.")
6170 include(GNUInstallDirs)
6271
6372 option(USE_CUDA "Use a Nvidia GPU to speed up computations" OFF)
73 add_feature_info(USE_CUDA USE_CUDA "Use CUDA for GPU acceleration")
6474
6575 option(ENABLE_TESTING "Build and enable testing stuff" OFF)
76 add_feature_info(ENABLE_TESTING ENABLE_TESTING "Enable unit tests")
6677 if(ENABLE_TESTING)
6778 enable_testing()
6879 endif(ENABLE_TESTING)
7283 ########################################################################
7384 if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.git)
7485 find_package(Git)
86 set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "Generated version for development version")
7587 endif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.git)
7688
7789 find_package(Boost 1.57.0 REQUIRED COMPONENTS program_options filesystem system timer)
7890 find_package(Eigen3 3.3.0 REQUIRED NO_MODULE)
91 if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
92 set_package_properties(Boost PROPERTIES TYPE REQUIRED PURPOSE "Extended C++ libraries")
93 set_package_properties(Eigen3 PROPERTIES TYPE REQUIRED PURPOSE "C++ vector data structures")
94 endif()
7995 message(STATUS "Found Eigen3: ${Eigen3_DIR}")
8096
8197 option(BUILD_MANPAGES "Build manpages (might lead to problem on system without rpath" OFF)
98 add_feature_info(BUILD_MANPAGES BUILD_MANPAGES "Build manpages (disable for cross-compile)")
8299 #define this target here, so that individual man pages can append to it.
83100 if(NOT TARGET manpages)
84101 add_custom_target(manpages ALL)
85102 endif()
86103
87104 find_package(VOTCA_TOOLS REQUIRED NO_MODULE)
105 set_package_properties(VOTCA_TOOLS PROPERTIES TYPE REQUIRED PURPOSE "Votca base library")
88106 if(DEFINED VOTCA_TOOLS_VERSION AND NOT VOTCA_TOOLS_VERSION STREQUAL PROJECT_VERSION)
89107 message(FATAL_ERROR "Incompatible VOTCA Tools version found (needed ${PROJECT_VERSION}, found ${VOTCA_TOOLS_VERSION})")
90108 endif()
91109 message(STATUS "Found VOTCA_TOOLS: ${VOTCA_TOOLS_DIR}")
92110 find_package(VOTCA_CSG REQUIRED NO_MODULE)
111 set_package_properties(VOTCA_TOOLS PROPERTIES TYPE REQUIRED PURPOSE "Votca csg library")
93112 if(DEFINED VOTCA_CSG_VERSION AND NOT VOTCA_CSG_VERSION STREQUAL PROJECT_VERSION)
94113 message(FATAL_ERROR "Incompatible VOTCA CSG version found (needed ${PROJECT_VERSION}, found ${VOTCA_CSG_VERSION})")
95114 endif()
97116
98117 if(USE_CUDA)
99118 find_package(CUDA REQUIRED)
119 set_package_properties(CUDA PROPERTIES TYPE REQUIRED PURPOSE "Used for GPU acceleration")
100120 endif(USE_CUDA)
101121
102122 ########################################################################
108128 ########################################################################
109129 # Basic system tests (standard libraries, headers, functions, types) #
110130 ########################################################################
111 include(CheckIncludeFile)
112 foreach(HEADER assert.h)
113 check_include_file(${HEADER} FOUND_${HEADER})
114 if(NOT FOUND_${HEADER})
115 message(FATAL_ERROR "Could not find needed header - ${HEADER}")
116 endif(NOT FOUND_${HEADER})
117 endforeach(HEADER)
118
119131 include(CheckIncludeFileCXX)
120132 foreach(HEADER algorithm)
121133 check_include_file_cxx(${HEADER} FOUND_${HEADER})
126138
127139 set(MATH_LIBRARIES "m" CACHE STRING "math library")
128140 mark_as_advanced( MATH_LIBRARIES )
129 include(CheckLibraryExists)
130 foreach(FUNC sqrt)
131 check_library_exists(${MATH_LIBRARIES} ${FUNC} "" FOUND_${FUNC}_${MATH_LIBRARIES})
132 if(NOT FOUND_${FUNC}_${MATH_LIBRARIES})
133 message(FATAL_ERROR "Could not find needed math function - ${FUNC}")
134 endif(NOT FOUND_${FUNC}_${MATH_LIBRARIES})
135 endforeach(FUNC)
136141
137142 ######################################
138143 # Include the following subdirectory #
142147 add_subdirectory(src)
143148 add_subdirectory(share)
144149
150 if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
151 feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL)
152 endif (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
+0
-47
CMakeModules/FindLIBXC.cmake less more
0 # - Find libxc
1 # Find the native libxc headers and libraries.
2 #
3 # LIBXC_INCLUDE_DIRS - where to find xc.h, etc.
4 # LIBXC_LIBRARIES - List of libraries when using expat.
5 # LIBXC_FOUND - True if expat found.
6 #
7 # Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
8 #
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
12 #
13 # http://www.apache.org/licenses/LICENSE-2.0
14 #
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 #
21
22 # check if info is available via PkgConfig
23 find_package(PkgConfig)
24 pkg_check_modules(PC_libxc libxc)
25
26 find_path(LIBXC_INCLUDE_DIR NAMES xc.h HINTS HINTS ${PC_libxc_INCLUDE_DIRS})
27 find_library(LIBXC_LIBRARY NAMES xc HINTS ${PC_libxc_LIBRARY_DIRS} )
28
29 #include(FindPackageHandleStandardArgs)
30 # handle the QUIETLY and REQUIRED arguments and set LIBXC_FOUND to TRUE
31 # if all listed variables are TRUE
32 find_package_handle_standard_args(LIBXC DEFAULT_MSG LIBXC_LIBRARY LIBXC_INCLUDE_DIR )
33
34 if(LIBXC_FOUND)
35 set(LIBXC_LIBRARIES ${LIBXC_LIBRARY} )
36 set(LIBXC_INCLUDE_DIRS ${LIBXC_INCLUDE_DIR} )
37
38 if(NOT TARGET LIBXC::LIBXC)
39 add_library(LIBXC::LIBXC UNKNOWN IMPORTED)
40 set_target_properties(LIBXC::LIBXC PROPERTIES
41 IMPORTED_LOCATION "${LIBXC_LIBRARY}"
42 INTERFACE_INCLUDE_DIRECTORIES "${LIBXC_INCLUDE_DIRS}")
43 endif()
44 endif()
45
46 mark_as_advanced(LIBXC_INCLUDE_DIR LIBXC_LIBRARY )
+0
-75
CODE_OF_CONDUCT.md less more
0 # Contributor Covenant Code of Conduct
1
2 ## Our Pledge
3
4 In the interest of fostering an open and welcoming environment, we as
5 contributors and maintainers pledge to making participation in our project and
6 our community a harassment-free experience for everyone, regardless of age, body
7 size, disability, ethnicity, gender identity and expression, level of
8 experience, nationality, personal appearance, race, religion, or sexual identity
9 and orientation.
10
11 ## Our Standards
12
13 Examples of behavior that contributes to creating a positive environment
14 include:
15
16 * Using welcoming and inclusive language
17 * Being respectful of differing viewpoints and experiences
18 * Gracefully accepting constructive criticism
19 * Focusing on what is best for the community
20 * Showing empathy towards other community members
21
22 Examples of unacceptable behavior by participants include:
23
24 * The use of sexualized language or imagery and unwelcome sexual attention or
25 advances
26 * Trolling, insulting/derogatory comments, and personal or political attacks
27 * Public or private harassment
28 * Publishing others' private information, such as a physical or electronic
29 address, without explicit permission
30 * Other conduct which could reasonably be considered inappropriate in a
31 professional setting
32
33 ## Our Responsibilities
34
35 Project maintainers are responsible for clarifying the standards of acceptable
36 behavior and are expected to take appropriate and fair corrective action in
37 response to any instances of unacceptable behavior.
38
39 Project maintainers have the right and responsibility to remove, edit, or reject
40 comments, commits, code, wiki edits, issues, and other contributions that are
41 not aligned to this Code of Conduct, or to ban temporarily or permanently any
42 contributor for other behaviors that they deem inappropriate, threatening,
43 offensive, or harmful.
44
45 ## Scope
46
47 This Code of Conduct applies both within project spaces and in public spaces
48 when an individual is representing the project or its community. Examples of
49 representing a project or community include using an official project e-mail
50 address, posting via an official social media account, or acting as an appointed
51 representative at an online or offline event. Representation of a project may be
52 further defined and clarified by project maintainers.
53
54 ## Enforcement
55
56 Instances of abusive, harassing, or otherwise unacceptable behavior may be
57 reported by contacting the project team at votca@googlegroups.com. The project
58 team will review and investigate all complaints, and will respond in a way that
59 it deems appropriate to the circumstances. The project team is obligated to
60 maintain confidentiality with regard to the reporter of an incident. Further
61 details of specific enforcement policies may be posted separately.
62
63 Project maintainers who do not follow or enforce the Code of Conduct in good
64 faith may face temporary or permanent repercussions as determined by other
65 members of the project's leadership.
66
67 ## Attribution
68
69 This Code of Conduct is adapted from the [Contributor Covenant][homepage],
70 version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
71
72 [homepage]: http://contributor-covenant.org
73
74 [version]: http://contributor-covenant.org/version/1/4/
0 Contributor Covenant Code of Conduct
1 ====================================
2
3 Our Pledge
4 ----------
5
6 In the interest of fostering an open and welcoming environment, we as
7 contributors and maintainers pledge to making participation in our
8 project and our community a harassment-free experience for everyone,
9 regardless of age, body size, disability, ethnicity, gender identity and
10 expression, level of experience, nationality, personal appearance, race,
11 religion, or sexual identity and orientation.
12
13 Our Standards
14 -------------
15
16 Examples of behavior that contributes to creating a positive environment
17 include:
18
19 - Using welcoming and inclusive language
20 - Being respectful of differing viewpoints and experiences
21 - Gracefully accepting constructive criticism
22 - Focusing on what is best for the community
23 - Showing empathy towards other community members
24
25 Examples of unacceptable behavior by participants include:
26
27 - The use of sexualized language or imagery and unwelcome sexual
28 attention or advances
29 - Trolling, insulting/derogatory comments, and personal or political
30 attacks
31 - Public or private harassment
32 - Publishing others' private information, such as a physical or
33 electronic address, without explicit permission
34 - Other conduct which could reasonably be considered inappropriate in a
35 professional setting
36
37 Our Responsibilities
38 --------------------
39
40 Project maintainers are responsible for clarifying the standards of
41 acceptable behavior and are expected to take appropriate and fair
42 corrective action in response to any instances of unacceptable behavior.
43
44 Project maintainers have the right and responsibility to remove, edit,
45 or reject comments, commits, code, wiki edits, issues, and other
46 contributions that are not aligned to this Code of Conduct, or to ban
47 temporarily or permanently any contributor for other behaviors that they
48 deem inappropriate, threatening, offensive, or harmful.
49
50 Scope
51 -----
52
53 This Code of Conduct applies both within project spaces and in public
54 spaces when an individual is representing the project or its community.
55 Examples of representing a project or community include using an
56 official project e-mail address, posting via an official social media
57 account, or acting as an appointed representative at an online or
58 offline event. Representation of a project may be further defined and
59 clarified by project maintainers.
60
61 Enforcement
62 -----------
63
64 Instances of abusive, harassing, or otherwise unacceptable behavior may
65 be reported by contacting the project team at votca@googlegroups.com.
66 The project team will review and investigate all complaints, and will
67 respond in a way that it deems appropriate to the circumstances. The
68 project team is obligated to maintain confidentiality with regard to the
69 reporter of an incident. Further details of specific enforcement
70 policies may be posted separately.
71
72 Project maintainers who do not follow or enforce the Code of Conduct in
73 good faith may face temporary or permanent repercussions as determined
74 by other members of the project's leadership.
75
76 Attribution
77 -----------
78
79 This Code of Conduct is adapted from the `Contributor
80 Covenant <http://contributor-covenant.org>`__, version 1.4, available at
81 `http://contributor-covenant.org/version/1/4 <http://contributor-covenant.org/version/1/4/>`__
+0
-201
LICENSE.md less more
0 Apache License
1 Version 2.0, January 2004
2 http://www.apache.org/licenses/
3
4 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5
6 1. Definitions.
7
8 "License" shall mean the terms and conditions for use, reproduction,
9 and distribution as defined by Sections 1 through 9 of this document.
10
11 "Licensor" shall mean the copyright owner or entity authorized by
12 the copyright owner that is granting the License.
13
14 "Legal Entity" shall mean the union of the acting entity and all
15 other entities that control, are controlled by, or are under common
16 control with that entity. For the purposes of this definition,
17 "control" means (i) the power, direct or indirect, to cause the
18 direction or management of such entity, whether by contract or
19 otherwise, or (ii) ownership of fifty percent (50%) or more of the
20 outstanding shares, or (iii) beneficial ownership of such entity.
21
22 "You" (or "Your") shall mean an individual or Legal Entity
23 exercising permissions granted by this License.
24
25 "Source" form shall mean the preferred form for making modifications,
26 including but not limited to software source code, documentation
27 source, and configuration files.
28
29 "Object" form shall mean any form resulting from mechanical
30 transformation or translation of a Source form, including but
31 not limited to compiled object code, generated documentation,
32 and conversions to other media types.
33
34 "Work" shall mean the work of authorship, whether in Source or
35 Object form, made available under the License, as indicated by a
36 copyright notice that is included in or attached to the work
37 (an example is provided in the Appendix below).
38
39 "Derivative Works" shall mean any work, whether in Source or Object
40 form, that is based on (or derived from) the Work and for which the
41 editorial revisions, annotations, elaborations, or other modifications
42 represent, as a whole, an original work of authorship. For the purposes
43 of this License, Derivative Works shall not include works that remain
44 separable from, or merely link (or bind by name) to the interfaces of,
45 the Work and Derivative Works thereof.
46
47 "Contribution" shall mean any work of authorship, including
48 the original version of the Work and any modifications or additions
49 to that Work or Derivative Works thereof, that is intentionally
50 submitted to Licensor for inclusion in the Work by the copyright owner
51 or by an individual or Legal Entity authorized to submit on behalf of
52 the copyright owner. For the purposes of this definition, "submitted"
53 means any form of electronic, verbal, or written communication sent
54 to the Licensor or its representatives, including but not limited to
55 communication on electronic mailing lists, source code control systems,
56 and issue tracking systems that are managed by, or on behalf of, the
57 Licensor for the purpose of discussing and improving the Work, but
58 excluding communication that is conspicuously marked or otherwise
59 designated in writing by the copyright owner as "Not a Contribution."
60
61 "Contributor" shall mean Licensor and any individual or Legal Entity
62 on behalf of whom a Contribution has been received by Licensor and
63 subsequently incorporated within the Work.
64
65 2. Grant of Copyright License. Subject to the terms and conditions of
66 this License, each Contributor hereby grants to You a perpetual,
67 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68 copyright license to reproduce, prepare Derivative Works of,
69 publicly display, publicly perform, sublicense, and distribute the
70 Work and such Derivative Works in Source or Object form.
71
72 3. Grant of Patent License. Subject to the terms and conditions of
73 this License, each Contributor hereby grants to You a perpetual,
74 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75 (except as stated in this section) patent license to make, have made,
76 use, offer to sell, sell, import, and otherwise transfer the Work,
77 where such license applies only to those patent claims licensable
78 by such Contributor that are necessarily infringed by their
79 Contribution(s) alone or by combination of their Contribution(s)
80 with the Work to which such Contribution(s) was submitted. If You
81 institute patent litigation against any entity (including a
82 cross-claim or counterclaim in a lawsuit) alleging that the Work
83 or a Contribution incorporated within the Work constitutes direct
84 or contributory patent infringement, then any patent licenses
85 granted to You under this License for that Work shall terminate
86 as of the date such litigation is filed.
87
88 4. Redistribution. You may reproduce and distribute copies of the
89 Work or Derivative Works thereof in any medium, with or without
90 modifications, and in Source or Object form, provided that You
91 meet the following conditions:
92
93 (a) You must give any other recipients of the Work or
94 Derivative Works a copy of this License; and
95
96 (b) You must cause any modified files to carry prominent notices
97 stating that You changed the files; and
98
99 (c) You must retain, in the Source form of any Derivative Works
100 that You distribute, all copyright, patent, trademark, and
101 attribution notices from the Source form of the Work,
102 excluding those notices that do not pertain to any part of
103 the Derivative Works; and
104
105 (d) If the Work includes a "NOTICE" text file as part of its
106 distribution, then any Derivative Works that You distribute must
107 include a readable copy of the attribution notices contained
108 within such NOTICE file, excluding those notices that do not
109 pertain to any part of the Derivative Works, in at least one
110 of the following places: within a NOTICE text file distributed
111 as part of the Derivative Works; within the Source form or
112 documentation, if provided along with the Derivative Works; or,
113 within a display generated by the Derivative Works, if and
114 wherever such third-party notices normally appear. The contents
115 of the NOTICE file are for informational purposes only and
116 do not modify the License. You may add Your own attribution
117 notices within Derivative Works that You distribute, alongside
118 or as an addendum to the NOTICE text from the Work, provided
119 that such additional attribution notices cannot be construed
120 as modifying the License.
121
122 You may add Your own copyright statement to Your modifications and
123 may provide additional or different license terms and conditions
124 for use, reproduction, or distribution of Your modifications, or
125 for any such Derivative Works as a whole, provided Your use,
126 reproduction, and distribution of the Work otherwise complies with
127 the conditions stated in this License.
128
129 5. Submission of Contributions. Unless You explicitly state otherwise,
130 any Contribution intentionally submitted for inclusion in the Work
131 by You to the Licensor shall be under the terms and conditions of
132 this License, without any additional terms or conditions.
133 Notwithstanding the above, nothing herein shall supersede or modify
134 the terms of any separate license agreement you may have executed
135 with Licensor regarding such Contributions.
136
137 6. Trademarks. This License does not grant permission to use the trade
138 names, trademarks, service marks, or product names of the Licensor,
139 except as required for reasonable and customary use in describing the
140 origin of the Work and reproducing the content of the NOTICE file.
141
142 7. Disclaimer of Warranty. Unless required by applicable law or
143 agreed to in writing, Licensor provides the Work (and each
144 Contributor provides its Contributions) on an "AS IS" BASIS,
145 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146 implied, including, without limitation, any warranties or conditions
147 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148 PARTICULAR PURPOSE. You are solely responsible for determining the
149 appropriateness of using or redistributing the Work and assume any
150 risks associated with Your exercise of permissions under this License.
151
152 8. Limitation of Liability. In no event and under no legal theory,
153 whether in tort (including negligence), contract, or otherwise,
154 unless required by applicable law (such as deliberate and grossly
155 negligent acts) or agreed to in writing, shall any Contributor be
156 liable to You for damages, including any direct, indirect, special,
157 incidental, or consequential damages of any character arising as a
158 result of this License or out of the use or inability to use the
159 Work (including but not limited to damages for loss of goodwill,
160 work stoppage, computer failure or malfunction, or any and all
161 other commercial damages or losses), even if such Contributor
162 has been advised of the possibility of such damages.
163
164 9. Accepting Warranty or Additional Liability. While redistributing
165 the Work or Derivative Works thereof, You may choose to offer,
166 and charge a fee for, acceptance of support, warranty, indemnity,
167 or other liability obligations and/or rights consistent with this
168 License. However, in accepting such obligations, You may act only
169 on Your own behalf and on Your sole responsibility, not on behalf
170 of any other Contributor, and only if You agree to indemnify,
171 defend, and hold each Contributor harmless for any liability
172 incurred by, or claims asserted against, such Contributor by reason
173 of your accepting any such warranty or additional liability.
174
175 END OF TERMS AND CONDITIONS
176
177 APPENDIX: How to apply the Apache License to your work.
178
179 To apply the Apache License to your work, attach the following
180 boilerplate notice, with the fields enclosed by brackets "{}"
181 replaced with your own identifying information. (Don't include
182 the brackets!) The text should be enclosed in the appropriate
183 comment syntax for the file format. We also recommend that a
184 file or class name and description of purpose be included on the
185 same "printed page" as the copyright notice for easier
186 identification within third-party archives.
187
188 Copyright {yyyy} {name of copyright owner}
189
190 Licensed under the Apache License, Version 2.0 (the "License");
191 you may not use this file except in compliance with the License.
192 You may obtain a copy of the License at
193
194 http://www.apache.org/licenses/LICENSE-2.0
195
196 Unless required by applicable law or agreed to in writing, software
197 distributed under the License is distributed on an "AS IS" BASIS,
198 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199 See the License for the specific language governing permissions and
200 limitations under the License.
0 ::
1
2 Apache License
3 Version 2.0, January 2004
4 http://www.apache.org/licenses/
5
6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
8 1. Definitions.
9
10 "License" shall mean the terms and conditions for use, reproduction, and
11 distribution as defined by Sections 1 through 9 of this document.
12
13 "Licensor" shall mean the copyright owner or entity authorized by the
14 copyright owner that is granting the License.
15
16 "Legal Entity" shall mean the union of the acting entity and all other
17 entities that control, are controlled by, or are under common control
18 with that entity. For the purposes of this definition, "control" means
19 (i) the power, direct or indirect, to cause the direction or management
20 of such entity, whether by contract or otherwise, or (ii) ownership of
21 fifty percent (50%) or more of the outstanding shares, or (iii)
22 beneficial ownership of such entity.
23
24 "You" (or "Your") shall mean an individual or Legal Entity exercising
25 permissions granted by this License.
26
27 "Source" form shall mean the preferred form for making modifications,
28 including but not limited to software source code, documentation source,
29 and configuration files.
30
31 "Object" form shall mean any form resulting from mechanical
32 transformation or translation of a Source form, including but not
33 limited to compiled object code, generated documentation, and
34 conversions to other media types.
35
36 "Work" shall mean the work of authorship, whether in Source or Object
37 form, made available under the License, as indicated by a copyright
38 notice that is included in or attached to the work (an example is
39 provided in the Appendix below).
40
41 "Derivative Works" shall mean any work, whether in Source or Object
42 form, that is based on (or derived from) the Work and for which the
43 editorial revisions, annotations, elaborations, or other modifications
44 represent, as a whole, an original work of authorship. For the purposes
45 of this License, Derivative Works shall not include works that remain
46 separable from, or merely link (or bind by name) to the interfaces of,
47 the Work and Derivative Works thereof.
48
49 "Contribution" shall mean any work of authorship, including the original
50 version of the Work and any modifications or additions to that Work or
51 Derivative Works thereof, that is intentionally submitted to Licensor
52 for inclusion in the Work by the copyright owner or by an individual or
53 Legal Entity authorized to submit on behalf of the copyright owner. For
54 the purposes of this definition, "submitted" means any form of
55 electronic, verbal, or written communication sent to the Licensor or its
56 representatives, including but not limited to communication on
57 electronic mailing lists, source code control systems, and issue
58 tracking systems that are managed by, or on behalf of, the Licensor for
59 the purpose of discussing and improving the Work, but excluding
60 communication that is conspicuously marked or otherwise designated in
61 writing by the copyright owner as "Not a Contribution."
62
63 "Contributor" shall mean Licensor and any individual or Legal Entity on
64 behalf of whom a Contribution has been received by Licensor and
65 subsequently incorporated within the Work.
66
67 2. Grant of Copyright License. Subject to the terms and conditions of
68 this License, each Contributor hereby grants to You a perpetual,
69 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 copyright license to reproduce, prepare Derivative Works of, publicly
71 display, publicly perform, sublicense, and distribute the Work and
72 such Derivative Works in Source or Object form.
73
74 3. Grant of Patent License. Subject to the terms and conditions of this
75 License, each Contributor hereby grants to You a perpetual,
76 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 (except as stated in this section) patent license to make, have made,
78 use, offer to sell, sell, import, and otherwise transfer the Work,
79 where such license applies only to those patent claims licensable by
80 such Contributor that are necessarily infringed by their
81 Contribution(s) alone or by combination of their Contribution(s) with
82 the Work to which such Contribution(s) was submitted. If You
83 institute patent litigation against any entity (including a
84 cross-claim or counterclaim in a lawsuit) alleging that the Work or a
85 Contribution incorporated within the Work constitutes direct or
86 contributory patent infringement, then any patent licenses granted to
87 You under this License for that Work shall terminate as of the date
88 such litigation is filed.
89
90 4. Redistribution. You may reproduce and distribute copies of the Work
91 or Derivative Works thereof in any medium, with or without
92 modifications, and in Source or Object form, provided that You meet
93 the following conditions:
94
95 (a) You must give any other recipients of the Work or Derivative Works a
96 copy of this License; and
97
98 (b) You must cause any modified files to carry prominent notices stating
99 that You changed the files; and
100
101 (c) You must retain, in the Source form of any Derivative Works that You
102 distribute, all copyright, patent, trademark, and attribution
103 notices from the Source form of the Work, excluding those notices
104 that do not pertain to any part of the Derivative Works; and
105
106 (d) If the Work includes a "NOTICE" text file as part of its
107 distribution, then any Derivative Works that You distribute must
108 include a readable copy of the attribution notices contained within
109 such NOTICE file, excluding those notices that do not pertain to any
110 part of the Derivative Works, in at least one of the following
111 places: within a NOTICE text file distributed as part of the
112 Derivative Works; within the Source form or documentation, if
113 provided along with the Derivative Works; or, within a display
114 generated by the Derivative Works, if and wherever such third-party
115 notices normally appear. The contents of the NOTICE file are for
116 informational purposes only and do not modify the License. You may
117 add Your own attribution notices within Derivative Works that You
118 distribute, alongside or as an addendum to the NOTICE text from the
119 Work, provided that such additional attribution notices cannot be
120 construed as modifying the License.
121
122 You may add Your own copyright statement to Your modifications and may
123 provide additional or different license terms and conditions for use,
124 reproduction, or distribution of Your modifications, or for any such
125 Derivative Works as a whole, provided Your use, reproduction, and
126 distribution of the Work otherwise complies with the conditions stated
127 in this License.
128
129 5. Submission of Contributions. Unless You explicitly state otherwise,
130 any Contribution intentionally submitted for inclusion in the Work by
131 You to the Licensor shall be under the terms and conditions of this
132 License, without any additional terms or conditions. Notwithstanding
133 the above, nothing herein shall supersede or modify the terms of any
134 separate license agreement you may have executed with Licensor
135 regarding such Contributions.
136
137 6. Trademarks. This License does not grant permission to use the trade
138 names, trademarks, service marks, or product names of the Licensor,
139 except as required for reasonable and customary use in describing the
140 origin of the Work and reproducing the content of the NOTICE file.
141
142 7. Disclaimer of Warranty. Unless required by applicable law or agreed
143 to in writing, Licensor provides the Work (and each Contributor
144 provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
145 OR CONDITIONS OF ANY KIND, either express or implied, including,
146 without limitation, any warranties or conditions of TITLE,
147 NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
148 PURPOSE. You are solely responsible for determining the
149 appropriateness of using or redistributing the Work and assume any
150 risks associated with Your exercise of permissions under this
151 License.
152
153 8. Limitation of Liability. In no event and under no legal theory,
154 whether in tort (including negligence), contract, or otherwise,
155 unless required by applicable law (such as deliberate and grossly
156 negligent acts) or agreed to in writing, shall any Contributor be
157 liable to You for damages, including any direct, indirect, special,
158 incidental, or consequential damages of any character arising as a
159 result of this License or out of the use or inability to use the Work
160 (including but not limited to damages for loss of goodwill, work
161 stoppage, computer failure or malfunction, or any and all other
162 commercial damages or losses), even if such Contributor has been
163 advised of the possibility of such damages.
164
165 9. Accepting Warranty or Additional Liability. While redistributing the
166 Work or Derivative Works thereof, You may choose to offer, and charge
167 a fee for, acceptance of support, warranty, indemnity, or other
168 liability obligations and/or rights consistent with this License.
169 However, in accepting such obligations, You may act only on Your own
170 behalf and on Your sole responsibility, not on behalf of any other
171 Contributor, and only if You agree to indemnify, defend, and hold
172 each Contributor harmless for any liability incurred by, or claims
173 asserted against, such Contributor by reason of your accepting any
174 such warranty or additional liability.
175
176 END OF TERMS AND CONDITIONS
177
178 APPENDIX: How to apply the Apache License to your work.
179
180 ::
181
182 To apply the Apache License to your work, attach the following
183 boilerplate notice, with the fields enclosed by brackets "{}"
184 replaced with your own identifying information. (Don't include
185 the brackets!) The text should be enclosed in the appropriate
186 comment syntax for the file format. We also recommend that a
187 file or class name and description of purpose be included on the
188 same "printed page" as the copyright notice for easier
189 identification within third-party archives.
190
191 Copyright {yyyy} {name of copyright owner}
192
193 Licensed under the Apache License, Version 2.0 (the "License"); you may
194 not use this file except in compliance with the License. You may obtain
195 a copy of the License at
196
197 ::
198
199 http://www.apache.org/licenses/LICENSE-2.0
200
201 Unless required by applicable law or agreed to in writing, software
202 distributed under the License is distributed on an "AS IS" BASIS,
203 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204 See the License for the specific language governing permissions and
205 limitations under the License.
+0
-8
NOTICE less more
0 Versatile Object-oriented Toolkit for Coarse-graining Applications
1 Copyright 2009-2011 The VOTCA Development Team
2
3 This product includes software developed at
4 The VOTCA Development Team (http://www.votca.org).
5
6 This software contains code, which was
7 derived from VOTCA KMC, MOO and CTP project.
0 Versatile Object-oriented Toolkit for Coarse-graining Applications
1 Copyright 2009-2020 The VOTCA Development Team
2
3 This product includes software developed at The VOTCA Development Team
4 (http://www.votca.org).
5
6 This software contains code, which was derived from VOTCA KMC, MOO and
7 CTP project.
+0
-49
README.md less more
0 [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6e930e3c0f5a4a9b83aa3362cfdd21e1)](https://www.codacy.com/manual/votca-package/xtp?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=votca/xtp&amp;utm_campaign=Badge_Grade)
1 [![codecov](https://codecov.io/gh/votca/xtp/branch/master/graph/badge.svg)](https://codecov.io/gh/votca/xtp)
2 [![Build Status](https://travis-ci.org/votca/xtp.svg?branch=master)](https://travis-ci.org/votca/xtp)
3 [![pipeline status](https://gitlab.com/votca/xtp/badges/master/pipeline.svg)](https://gitlab.com/votca/xtp/commits/master)
4 [![DOI](https://zenodo.org/badge/50048374.svg)](https://zenodo.org/badge/latestdoi/50048374)
5
6 VOTCA-XTP is a library which allows you to calculate the electronic properties of organic materials, e.g.
7 - excited state properties via GW-BSE
8 - spectra using QM/MM in conjunction with excited state treatment via GW-BSE
9 - energetic disorder for electrons/holes and excitions via QM/MM or fast MM/MM multipole methods
10 - electron and hole mobilities using electronic couplings and kinetic Monte-Carlo
11 - electron, hole, singlet and triplet diffusion constants using electronic couplings and kinetic Monte-Carlo
12
13 Installation instructions and developer information can be found
14 [here](https://github.com/votca/votca/blob/master/share/doc/INSTALL.md)
15
16 For other questions, we provide an email list:
17
18 [google group](https://groups.google.com/forum/#!forum/votca)
19
20 and a slack channel:
21
22 [Slack](https://votca.slack.com/messages/C7XVBE9EG/?)
23
24 We have no manual for the moment but we have a complete tutorial here:
25
26 [Tutorial](https://github.com/votca/xtp-tutorials)
27
28 The development of VOTCA is mainly funded by academic research grants. If you
29 use this package, please cite the VOTCA papers:
30
31 * Electronic Excitations in Complex Molecular Environments: Many-Body Green’s
32 Functions Theory in VOTCA-XTP Jens Wehner, Lothar Brombacher, Joshua Brown,
33 Christoph Junghans, Onur Caylak, Yuriy Khalak, Pranav Madhikar, Gianluca
34 Tirimbo, Björn Baumeier J. Chem. Theory Comput. 14, 6353 (2018).
35
36 * Microscopic simulations of charge transport in disordered organic
37 semiconductors V. Ruehle, A. Lukyanov, F. May, M. Schrader, T. Vehoff, J.
38 Kirkpatrick, B. Baumeier and D. Andrienko J. Chem. Theo. Comp. 7, 3335-3345
39 (2011)
40
41 * Versatile Object-oriented Toolkit for Coarse-graining Applications, V.Ruehle,
42 C. Junghans, A. Lukyanov, K. Kremer, D. Andrienko, J. Chem. Theo. Comp. 5
43 (12), 3211 (2009)
44
45 In case of questions, please post them in the google discussion group for votca
46 at <http://groups.google.com/group/votca-xtp>
47
48 You can contact the VOTCA Development Team at devs@votca.org.
0 |Codacy Badge| |codecov| |CI| |DOI|
1
2 VOTCA-XTP is a library which allows you to calculate the electronic
3 properties of organic materials, e.g. - excited state properties via
4 GW-BSE - spectra using QM/MM in conjunction with excited state treatment
5 via GW-BSE - energetic disorder for electrons/holes and excitons via
6 QM/MM or fast MM/MM multipole methods - electron and hole mobilities
7 using electronic couplings and kinetic Monte-Carlo - electron, hole,
8 singlet and triplet diffusion constants using electronic couplings and
9 kinetic Monte-Carlo
10
11 Installation instructions and developer information can be found
12 `here <https://github.com/votca/votca/blob/master/share/doc/INSTALL.rst>`__
13
14 For other questions, we provide an email list:
15
16 `google group <https://groups.google.com/forum/#!forum/votca>`__
17
18 and a slack channel:
19
20 `Slack <https://votca.slack.com/messages/C7XVBE9EG/?>`__
21
22 We have no manual for the moment but we have a complete tutorial here:
23
24 `Tutorial <https://github.com/votca/xtp-tutorials>`__
25
26 The development of VOTCA is mainly funded by academic research grants.
27 If you use this package, please cite the VOTCA papers:
28
29 - Excited-State Electronic Structure of Molecules Using Many-Body
30 Green’s Functions: Quasiparticles and Electron-Hole Excitations with
31 VOTCA-XTP. Gianluca Tirimbò, Vivek Sundaram, Onur Çaylak, Wouter
32 Scharpach, Javier Sijen, Christoph Junghans, Joshua Brown, Felipe
33 Zapata Ruiz, Nicolas Renaud, Jens Wehner, Björn Baumeier, J. Chem.
34 Phys. 152, 114103 (2020).
35
36 - Electronic Excitations in Complex Molecular Environments: Many-Body
37 Green’s Functions Theory in VOTCA-XTP. Jens Wehner, Lothar
38 Brombacher, Joshua Brown, Christoph Junghans, Onur Caylak, Yuriy
39 Khalak, Pranav Madhikar, Gianluca Tirimbo, Björn Baumeier, J. Chem.
40 Theory Comput. 14, 6353 (2018).
41
42 - Microscopic simulations of charge transport in disordered organic
43 semiconductors. V. Ruehle, A. Lukyanov, F. May, M. Schrader, T.
44 Vehoff, J. Kirkpatrick, B. Baumeier and D. Andrienko, J. Chem. Theo.
45 Comp. 7, 3335-3345 (2011).
46
47 - Versatile Object-oriented Toolkit for Coarse-graining Applications.
48 V.Ruehle, C. Junghans, A. Lukyanov, K. Kremer, D. Andrienko, J. Chem.
49 Theo. Comp. 5 (12), 3211 (2009).
50
51 In case of questions, please post them in the google discussion group
52 for votca at http://groups.google.com/group/votca-xtp
53
54 You can contact the VOTCA Development Team at devs@votca.org.
55
56 .. |Codacy Badge| image:: https://app.codacy.com/project/badge/Grade/b9c7170d5c3440b7a2327a667cb1ec59
57 :target: https://www.codacy.com/gh/votca/xtp?utm_source=github.com&utm_medium=referral&utm_content=votca/xtp&utm_campaign=Badge_Grade
58 .. |codecov| image:: https://codecov.io/gh/votca/xtp/branch/master/graph/badge.svg
59 :target: https://codecov.io/gh/votca/xtp
60 .. |CI| image:: https://github.com/votca/votca/workflows/CI/badge.svg?branch=master
61 :target: https://github.com/votca/votca/actions?query=workflow%3ACI+branch%3Amaster
62 .. |DOI| image:: https://zenodo.org/badge/50048374.svg
63 :target: https://zenodo.org/badge/latestdoi/50048374
0 configure_file(votca_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/votca_config.h)
0 configure_file(votca_xtp_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/votca_xtp_config.h)
11
2 file(GLOB_RECURSE VOTCA_HEADERS *.h ${CMAKE_CURRENT_BINARY_DIR}/votca_config.h)
2 file(GLOB_RECURSE VOTCA_HEADERS *.h ${CMAKE_CURRENT_BINARY_DIR}/votca_xtp_config.h)
33 install(FILES ${VOTCA_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/votca/xtp)
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_ERIS_H
2121 #define VOTCA_XTP_ERIS_H
2222
23 #include <votca/xtp/fourcenter.h>
24 #include <votca/xtp/threecenter.h>
23 // Local VOTCA includes
24 #include "threecenter.h"
2525
2626 namespace votca {
2727 namespace xtp {
3030 * \brief Takes a density matrix and and an auxiliary basis set and calculates
3131 * the electron repulsion integrals.
3232 *
33 *
34 *
3533 */
3634 class ERIs {
3735
3836 public:
3937 void Initialize(const AOBasis& dftbasis, const AOBasis& auxbasis);
40 void Initialize_4c_small_molecule(const AOBasis& dftbasis);
41 void Initialize_4c_screening(const AOBasis& dftbasis,
42 double eps); // Pre-screening
38 void Initialize_4c(const AOBasis& dftbasis);
4339
44 Mat_p_Energy CalculateERIs(const Eigen::MatrixXd& DMAT) const;
45 Mat_p_Energy CalculateEXX(const Eigen::MatrixXd& DMAT) const;
46 Mat_p_Energy CalculateEXX(const Eigen::MatrixXd& occMos,
47 const Eigen::MatrixXd& DMAT) const;
48 Mat_p_Energy CalculateERIs_4c_small_molecule(
49 const Eigen::MatrixXd& DMAT) const;
50 Mat_p_Energy CalculateEXX_4c_small_molecule(
51 const Eigen::MatrixXd& DMAT) const;
40 Eigen::MatrixXd CalculateERIs_3c(const Eigen::MatrixXd& DMAT) const;
5241
53 Mat_p_Energy CalculateERIs_4c_direct(const AOBasis& dftbasis,
54 const Eigen::MatrixXd& DMAT) const;
42 std::array<Eigen::MatrixXd, 2> CalculateERIs_EXX_3c(
43 const Eigen::MatrixXd& occMos, const Eigen::MatrixXd& DMAT) const {
44 std::array<Eigen::MatrixXd, 2> result;
45 result[0] = CalculateERIs_3c(DMAT);
46 if (occMos.rows() > 0 && occMos.cols() > 0) {
47 assert(occMos.rows() == DMAT.rows() && "occMos.rows()==DMAT.rows()");
48 result[1] = CalculateEXX_mos(occMos);
49 } else {
50 result[1] = CalculateEXX_dmat(DMAT);
51 }
52 return result;
53 }
54
55 Eigen::MatrixXd CalculateERIs_4c(const Eigen::MatrixXd& DMAT,
56 double error) const {
57 return Compute4c<false>(DMAT, error)[0];
58 }
59
60 std::array<Eigen::MatrixXd, 2> CalculateERIs_EXX_4c(
61 const Eigen::MatrixXd& DMAT, double error) const {
62 return Compute4c<true>(DMAT, error);
63 }
5564
5665 Index Removedfunctions() const { return _threecenter.Removedfunctions(); }
5766
67 static double CalculateEnergy(const Eigen::MatrixXd& DMAT,
68 const Eigen::MatrixXd& matrix_operator) {
69 return matrix_operator.cwiseProduct(DMAT).sum();
70 }
71
5872 private:
59 bool _with_screening = false;
60 double _screening_eps;
61 Eigen::MatrixXd _diagonals; // Square matrix containing <ab|ab> for all basis
62 // functions a, b
73 std::vector<libint2::Shell> basis_;
74 std::vector<Index> starts_;
6375
64 void CalculateERIsDiagonals(const AOBasis& dftbasis);
76 std::vector<std::vector<Index>> shellpairs_;
77 std::vector<std::vector<libint2::ShellPair>> shellpairdata_;
78 Index maxnprim_;
79 Index maxL_;
6580
66 bool CheckScreen(double eps, const AOShell& shell_1, const AOShell& shell_2,
67 const AOShell& shell_3, const AOShell& shell_4) const;
81 Eigen::MatrixXd CalculateEXX_dmat(const Eigen::MatrixXd& DMAT) const;
82 Eigen::MatrixXd CalculateEXX_mos(const Eigen::MatrixXd& occMos) const;
83
84 std::vector<std::vector<libint2::ShellPair>> ComputeShellPairData(
85 const std::vector<libint2::Shell>& basis,
86 const std::vector<std::vector<Index>>& shellpairs) const;
87
88 Eigen::MatrixXd ComputeSchwarzShells(const AOBasis& dftbasis) const;
89 Eigen::MatrixXd ComputeShellBlockNorm(const Eigen::MatrixXd& dmat) const;
90
91 template <bool with_exchange>
92 std::array<Eigen::MatrixXd, 2> Compute4c(const Eigen::MatrixXd& dmat,
93 double error) const;
6894
6995 TCMatrix_dft _threecenter;
70 FCMatrix _fourcenter;
7196
72 double CalculateEnergy(const Eigen::MatrixXd& DMAT,
73 const Eigen::MatrixXd& matrix_operator) const;
74 template <bool transposed_block>
75 void FillERIsBlock(Eigen::MatrixXd& ERIsCur, const Eigen::MatrixXd& DMAT,
76 const Eigen::Tensor<double, 4>& block,
77 const AOShell& shell_1, const AOShell& shell_2,
78 const AOShell& shell_3, const AOShell& shell_4) const;
79 };
97 Eigen::MatrixXd schwarzscreen_; // Square matrix containing <ab|ab> for all
98 // shells
99 }; // namespace xtp
80100
81101 } // namespace xtp
82102 } // namespace votca
0 /*
1 * Copyright 2009-2020 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #pragma once
20
21 #ifndef VOTCA_XTP_GAUSSIANQUADRATUREBASE_H
22 #define VOTCA_XTP_GAUSSIANQUADRATUREBASE_H
23
24 // Local VOTCA includes
25 #include "eigen.h"
26 #include <votca/tools/constants.h>
27
28 namespace votca {
29 namespace xtp {
30
31 class GaussianQuadratureBase {
32 public:
33 GaussianQuadratureBase() = default;
34
35 void configure(Index order) {
36 FillPoints();
37 FillAdaptedWeights();
38 CheckOrder(order, _map_points);
39 CheckOrder(order, _map_AdaptedWeights);
40 points_ = _map_points[order];
41 weights_ = _map_AdaptedWeights[order];
42 }
43
44 virtual ~GaussianQuadratureBase() = default;
45
46 Index Order() const { return points_.size(); }
47
48 template <typename F>
49 double Integrate(const F& f) const {
50 double result = 0.0;
51 for (Index j = 0; j < Order(); ++j) {
52 result += ScaledWeight(j) * f(j, ScaledPoint(j), UseSymmetry());
53 }
54 return result;
55 }
56 virtual double ScaledPoint(Index i) const = 0;
57
58 virtual double ScaledWeight(Index i) const = 0;
59
60 private:
61 void CheckOrder(Index order,
62 const std::map<Index, Eigen::VectorXd>& map) const;
63
64 protected:
65 Eigen::VectorXd points_;
66 Eigen::VectorXd weights_;
67
68 std::map<Index, Eigen::VectorXd> _map_points;
69 std::map<Index, Eigen::VectorXd> _map_AdaptedWeights;
70
71 virtual bool UseSymmetry() const = 0;
72
73 virtual void FillPoints() = 0;
74 virtual void FillAdaptedWeights() = 0;
75 };
76
77 } // namespace xtp
78 } // namespace votca
79
80 #endif // VOTCA_XTP_GAUSSIANQUADRATUREBASE_H
0 /*
1 * Copyright 2009-2020 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #ifndef VOTCA_XTP_IMAGINARYAXISINTEGRATION_H
20 #define VOTCA_XTP_IMAGINARYAXISINTEGRATION_H
21
22 #include "eigen.h"
23 #include "quadrature_factory.h"
24 #include "rpa.h"
25 #include <memory>
26
27 // Computes the contribution from the Gauss-Laguerre quadrature to the
28 // self-energy expectation matrix for given RPA and frequencies
29 namespace votca {
30 namespace xtp {
31
32 class ImaginaryAxisIntegration {
33
34 public:
35 struct options {
36 Index order;
37 Index qptotal;
38 Index qpmin;
39 Index homo;
40 Index rpamin;
41 Index rpamax;
42 std::string quadrature_scheme;
43 double alpha;
44 };
45
46 ImaginaryAxisIntegration(const Eigen::VectorXd& energies,
47 const TCMatrix_gwbse& Mmn);
48
49 void configure(options opt, const RPA& rpa,
50 const Eigen::MatrixXd& kDielMxInv_zero);
51
52 double SigmaGQDiag(double frequency, Index gw_level, double eta) const;
53
54 private:
55 options _opt;
56
57 std::unique_ptr<GaussianQuadratureBase> _gq = nullptr;
58
59 // This function calculates and stores inverses of the microscopic dielectric
60 // matrix in a matrix vector
61 void CalcDielInvVector(const RPA& rpa,
62 const Eigen::MatrixXd& kDielMxInv_zero);
63 const Eigen::VectorXd& _energies;
64 std::vector<Eigen::MatrixXd> _dielinv_matrices_r;
65 const TCMatrix_gwbse& _Mmn;
66 };
67 } // namespace xtp
68 } // namespace votca
69 #endif // VOTCA_XTP_IMAGINARYAXISINTEGRATION_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_INDEXPARSER_H
2121 #define VOTCA_XTP_INDEXPARSER_H
2222
23 // Standard includes
2324 #include <string>
2425 #include <vector>
26
27 // VOTCA includes
2528 #include <votca/tools/types.h>
2629
2730 /**
4346 } // namespace xtp
4447 } // namespace votca
4548
46 #endif // VOTCA_XTP_ATOMCONTAINER_H
49 #endif // VOTCA_XTP_INDEXPARSER_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1717 */
1818
1919 #pragma once
20 #ifndef _VOTCA_XTP_ADIIS__H
21 #define _VOTCA_XTP_ADIIS__H
20 #ifndef VOTCA_XTP_ADIIS_H
21 #define VOTCA_XTP_ADIIS_H
2222
23 // Standard includes
2324 #include <memory>
2425 #include <vector>
25 #include <votca/xtp/eigen.h>
26
27 // Local VOTCA includes
28 #include "eigen.h"
29
2630 namespace votca {
2731 namespace xtp {
2832
4044 } // namespace xtp
4145 } // namespace votca
4246
43 #endif
47 #endif // VOTCA_XTP_ADIIS_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_ADIIS_COSTFUNCTION_H
2121 #define VOTCA_XTP_ADIIS_COSTFUNCTION_H
2222
23 #include <votca/xtp/optimiser_costfunction.h>
23 // Local VOTCA includes
24 #include "optimiser_costfunction.h"
2425
2526 namespace votca {
2627 namespace xtp {
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1717 */
1818
1919 #pragma once
20 #ifndef XTP_AMPLITUDE_INTEGRATION_H
21 #define XTP_AMPLITUDE_INTEGRATION_H
20 #ifndef VOTCA_XTP_AMPLITUDE_INTEGRATION_H
21 #define VOTCA_XTP_AMPLITUDE_INTEGRATION_H
2222
23 #include <votca/xtp/aobasis.h>
24 #include <votca/xtp/eigen.h>
25 #include <votca/xtp/regular_grid.h>
23 // Local VOTCA includes
24 #include "aobasis.h"
25 #include "eigen.h"
26 #include "regular_grid.h"
27
2628 namespace votca {
2729 namespace xtp {
2830
4143
4244 } // namespace xtp
4345 } // namespace votca
44 #endif // XTP_NUMERICAL_INTEGRATION_H
46 #endif // VOTCA_XTP_AMPLITUDE_INTEGRATION_H
0 /*
1 * Copyright 2009-2020 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #pragma once
20 #ifndef VOTCA_XTP_ANDERSON_MIXING_H
21 #define VOTCA_XTP_ANDERSON_MIXING_H
22
23 // Standard includes
24 #include <vector>
25
26 // Local VOTCA includes
27 #include "eigen.h"
28
29 namespace votca {
30 namespace xtp {
31 /**
32 * \brief Anderson mixing as convergence acceleration in SCF/fixed point
33 * problems
34 *
35 * Keeps a history of input and output solution vectors during a self-consistent
36 * fixed-point procedure and determines a new solution from an optimized mixing.
37 * Requires specification of the order of the method (maximum history to take)
38 * and a mixing parameter.
39 *
40 * B. Baumeier, Diploma Thesis, Appendix C (2005)
41 *
42 * I. Ramiere and T. Helfer, Iterative Residual-Based Vector Methods to
43 * Accelerate Fixed Point Iterations, Comput. Math. Appl. 70, 2210 (2015)
44 */
45 class Anderson {
46 public:
47 const Eigen::VectorXd MixHistory();
48
49 void UpdateOutput(const Eigen::VectorXd &newOutput);
50 void UpdateInput(const Eigen::VectorXd &newInput);
51 void Configure(const Index order, const double alpha);
52
53 private:
54 std::vector<Eigen::VectorXd> _input;
55 std::vector<Eigen::VectorXd> _output;
56
57 double _alpha = 0.7;
58 Index _order = 25;
59 };
60
61 } // namespace xtp
62 } // namespace votca
63
64 #endif // VOTCA_XTP_ANDERSON_MIXING_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_AOBASIS_H
2121 #define VOTCA_XTP_AOBASIS_H
2222
23 #include <votca/xtp/aoshell.h>
24 #include <votca/xtp/eigen.h>
23 // Local VOTCA includes
24 #include "aoshell.h"
25 #include "checkpoint.h"
26 #include "eigen.h"
27 #include <libint2/shell.h>
2528
2629 namespace votca {
2730 namespace xtp {
3538 */
3639 class AOBasis {
3740 public:
38 void ReorderMOs(Eigen::MatrixXd& v, const std::string& start,
39 const std::string& target) const;
40
4141 void Fill(const BasisSet& bs, const QMMolecule& atoms);
4242
4343 Index AOBasisSize() const { return _AOBasisSize; }
5252
5353 Index getNumofShells() const { return Index(_aoshells.size()); }
5454
55 Index getMaxNprim() const;
56
57 Index getMaxL() const;
58
59 std::vector<Index> getMapToBasisFunctions() const;
60
5561 const std::vector<Index>& getFuncPerAtom() const { return _FuncperAtom; }
5662
57 private:
63 std::vector<libint2::Shell> GenerateLibintBasis() const;
64
65 std::vector<std::vector<Index>> ComputeShellPairs(
66 double threshold = 1e-20) const;
67
5868 AOShell& addShell(const Shell& shell, const QMAtom& atom, Index startIndex);
5969
60 void MultiplyMOs(Eigen::MatrixXd& v,
61 const std::vector<Index>& multiplier) const;
70 const std::string& Name() const { return _name; }
6271
63 std::vector<Index> invertOrder(const std::vector<Index>& order) const;
72 void UpdateShellPositions(const QMMolecule& mol);
6473
65 std::vector<Index> getReorderVector(const std::string& start,
66 const std::string& target) const;
74 void WriteToCpt(CheckpointWriter& w) const;
6775
68 void addReorderShell(const std::string& start, const std::string& target,
69 const std::string& shell,
70 std::vector<Index>& neworder) const;
76 void ReadFromCpt(CheckpointReader& r);
7177
72 std::vector<Index> getMultiplierVector(const std::string& start,
73 const std::string& target) const;
78 void add(const AOBasis& other);
7479
75 void addMultiplierShell(const std::string& start, const std::string& target,
76 const std::string& shell,
77 std::vector<Index>& multiplier) const;
80 friend std::ostream& operator<<(std::ostream& out, const AOBasis& aobasis);
81
82 private:
83 void FillFuncperAtom();
84
85 void clear();
86 std::string _name = "";
7887
7988 std::vector<AOShell> _aoshells;
8089
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_AOMATRIX_H
2121 #define VOTCA_XTP_AOMATRIX_H
2222
23 #include <votca/xtp/aobasis.h>
23 // Local VOTCA includes
24 #include "aobasis.h"
2425
2526 namespace votca {
2627 namespace xtp {
2728
2829 class AOMatrix {
2930 public:
30 Index Dimension() { return _aomatrix.rows(); }
31 const Eigen::MatrixXd& Matrix() const { return _aomatrix; }
32 void Fill(const AOBasis& aobasis);
33
34 protected:
35 virtual void FillBlock(Eigen::Block<Eigen::MatrixXd>& matrix,
36 const AOShell& shell_row,
37 const AOShell& shell_col) const = 0;
38 Eigen::MatrixXd _aomatrix;
31 virtual void Fill(const AOBasis& aobasis) = 0;
32 virtual Index Dimension() = 0;
33 using MatrixLibInt =
34 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
3935 };
4036
4137 // derived class for kinetic energy
4238 class AOKinetic : public AOMatrix {
43 protected:
44 void FillBlock(Eigen::Block<Eigen::MatrixXd>& matrix,
45 const AOShell& shell_row,
46 const AOShell& shell_col) const override;
39 public:
40 void Fill(const AOBasis& aobasis) final;
41 Index Dimension() final { return _aomatrix.rows(); }
42 const Eigen::MatrixXd& Matrix() const { return _aomatrix; }
43
44 private:
45 Eigen::MatrixXd _aomatrix;
4746 };
4847
4948 // derived class for atomic orbital overlap
5049 class AOOverlap : public AOMatrix {
5150 public:
52 Eigen::MatrixXd FillShell(const AOShell& shell) const;
51 void Fill(const AOBasis& aobasis) final;
52 Index Dimension() final { return _aomatrix.rows(); }
53 const Eigen::MatrixXd& Matrix() const { return _aomatrix; }
54
55 Eigen::MatrixXd singleShellOverlap(const AOShell& shell) const;
5356 Index Removedfunctions() const { return removedfunctions; }
5457 double SmallestEigenValue() const { return smallestEigenvalue; }
5558
5659 Eigen::MatrixXd Pseudo_InvSqrt(double etol);
5760 Eigen::MatrixXd Sqrt();
5861
59 Eigen::MatrixXd Primitive_Overlap(const AOGaussianPrimitive& g_row,
60 const AOGaussianPrimitive& g_col,
61 Index l_offset = 0) const;
62
63 protected:
64 void FillBlock(Eigen::Block<Eigen::MatrixXd>& matrix,
65 const AOShell& shell_row,
66 const AOShell& shell_col) const override;
67
6862 private:
6963 Index removedfunctions;
7064 double smallestEigenvalue;
65 Eigen::MatrixXd _aomatrix;
7166 };
7267
7368 // derived class for atomic orbital Coulomb interaction
7469 class AOCoulomb : public AOMatrix {
7570 public:
71 void Fill(const AOBasis& aobasis) final;
72 Index Dimension() final { return _aomatrix.rows(); }
73 const Eigen::MatrixXd& Matrix() const { return _aomatrix; }
74
7675 Eigen::MatrixXd Pseudo_InvSqrt_GWBSE(const AOOverlap& auxoverlap,
7776 double etol);
7877 Eigen::MatrixXd Pseudo_InvSqrt(double etol);
7978 Index Removedfunctions() const { return removedfunctions; }
8079
81 protected:
82 void FillBlock(Eigen::Block<Eigen::MatrixXd>& matrix,
83 const AOShell& shell_row,
84 const AOShell& shell_col) const override;
80 private:
81 void computeCoulombIntegrals(const AOBasis& aobasis);
82 Index removedfunctions;
83 Eigen::MatrixXd _aomatrix;
84 };
85
86 /* derived class for atomic orbital electrical dipole matrices, required for
87 * electrical transition dipoles
88 */
89 class AODipole : public AOMatrix {
90 public:
91 void Fill(const AOBasis& aobasis) final;
92 Index Dimension() final { return _aomatrix[0].rows(); }
93 const std::array<Eigen::MatrixXd, 3>& Matrix() const { return _aomatrix; }
94
95 void setCenter(const Eigen::Vector3d& r) {
96 for (Index i = 0; i < 3; i++) {
97 _r[i] = r[i];
98 }
99 } // definition of a center around which the moment should be calculated
85100
86101 private:
87 Index removedfunctions;
102 std::array<Eigen::MatrixXd, 3> _aomatrix;
103 std::array<libint2::Shell::real_t, 3> _r = {0, 0, 0};
88104 };
89105
90106 } // namespace xtp
+0
-72
include/votca/xtp/aomatrix3d.h less more
0 /*
1 * Copyright 2009-2019 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #pragma once
20 #ifndef VOTCA_XTP_AOMATRIX3D_H
21 #define VOTCA_XTP_AOMATRIX3D_H
22
23 #include <votca/xtp/aobasis.h>
24
25 namespace votca {
26 namespace xtp {
27
28 class AOMatrix3D {
29 public:
30 const std::array<Eigen::MatrixXd, 3>& Matrix() const { return _aomatrix; }
31 void Fill(const AOBasis& aobasis);
32 Index Dimension() { return _aomatrix[0].rows(); }
33
34 protected:
35 std::array<Eigen::MatrixXd, 3> _aomatrix;
36 virtual void FillBlock(std::vector<Eigen::Block<Eigen::MatrixXd>>& matrix,
37 const AOShell& shell_row,
38 const AOShell& shell_col) const = 0;
39 };
40
41 /* derived class for atomic orbital gradient matrices, required for
42 * momentum transition dipoles
43 */
44 class AOMomentum : public AOMatrix3D {
45 protected:
46 void FillBlock(std::vector<Eigen::Block<Eigen::MatrixXd>>& matrix,
47 const AOShell& shell_row,
48 const AOShell& shell_col) const override;
49 };
50
51 /* derived class for atomic orbital electrical dipole matrices, required for
52 * electrical transition dipoles
53 */
54 class AODipole : public AOMatrix3D {
55 public:
56 void setCenter(const Eigen::Vector3d& r) {
57 _r = r;
58 } // definition of a center around which the moment should be calculated
59 protected:
60 void FillBlock(std::vector<Eigen::Block<Eigen::MatrixXd>>& matrix,
61 const AOShell& shell_row,
62 const AOShell& shell_col) const override;
63
64 private:
65 Eigen::Vector3d _r = Eigen::Vector3d::Zero();
66 };
67
68 } // namespace xtp
69 } // namespace votca
70
71 #endif // VOTCA_XTP_AOMATRIX3D_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_AOPOTENTIAL_H
2121 #define VOTCA_XTP_AOPOTENTIAL_H
2222
23 #include <votca/xtp/aobasis.h>
24 #include <votca/xtp/ecpaobasis.h>
25 #include <votca/xtp/staticsite.h>
23 // Local VOTCA includes
24 #include "aobasis.h"
25 #include "ecpaobasis.h"
26 #include "staticsite.h"
2627
2728 namespace votca {
2829 namespace xtp {
113114 } // namespace xtp
114115 } // namespace votca
115116
116 #endif // VOTCA_XTP_AOMATRIX_H
117 #endif // VOTCA_XTP_AOPOTENTIAL_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_AOSHELL_H
2121 #define VOTCA_XTP_AOSHELL_H
2222
23 // Third party includes
2324 #include <boost/math/constants/constants.hpp>
25
26 // VOTCA includes
2427 #include <votca/tools/constants.h>
25 #include <votca/xtp/eigen.h>
2628
29 // Local VOTCA includes
30 #include "basisset.h"
31 #include "eigen.h"
2732 #include "qmatom.h"
28 #include <votca/xtp/basisset.h>
33 // include libint last otherwise it overrides eigen
34 #include <libint2/shell.h>
2935
3036 namespace votca {
3137 namespace xtp {
3238
39 class AOShell;
3340 class AOBasis;
34 class AOShell;
3541
3642 class AOGaussianPrimitive {
37 friend class AOShell;
43 friend AOShell;
3844
3945 public:
46 AOGaussianPrimitive(const GaussianPrimitive& gaussian,
47 const AOShell& aoshell);
48
49 AOGaussianPrimitive(const AOGaussianPrimitive& gaussian,
50 const AOShell& aoshell);
51
52 struct data {
53 Index atomid;
54 Index l;
55 Index startindex;
56 double decay;
57 double contraction;
58 double x;
59 double y;
60 double z;
61 double scale;
62 };
63
64 AOGaussianPrimitive(const AOGaussianPrimitive::data& d,
65 const AOShell& aoshell)
66 : _aoshell(aoshell) {
67 _decay = d.decay;
68 _contraction = d.contraction;
69 _powfactor = CalcPowFactor(_decay);
70 }
71
72 void SetupCptTable(CptTable& table) const;
73
74 void WriteData(data& d) const;
75
4076 double getPowfactor() const { return _powfactor; }
4177 double getDecay() const { return _decay; }
42 const Eigen::VectorXd& getContraction() const { return _contraction; }
78 double getContraction() const { return _contraction; }
4379 const AOShell& getShell() const { return _aoshell; }
4480
4581 private:
82 static double CalcPowFactor(double decay) {
83 return std::pow(2.0 * decay / boost::math::constants::pi<double>(), 0.75);
84 }
4685 double _decay;
47 Eigen::VectorXd _contraction;
86 double _contraction;
4887 const AOShell& _aoshell;
4988 double _powfactor; // used in evalspace to speed up DFT
50 // private constructor, only a shell can create a primitive
51 AOGaussianPrimitive(const GaussianPrimitive& gaussian, const AOShell& aoshell)
52 : _decay(gaussian.decay()), _aoshell(aoshell) {
53 _contraction = Eigen::VectorXd::Map(gaussian.Contractions().data(),
54 gaussian.Contractions().size());
55 _powfactor =
56 std::pow(2.0 * _decay / boost::math::constants::pi<double>(), 0.75);
57 }
58
59 AOGaussianPrimitive(const AOGaussianPrimitive& gaussian,
60 const AOShell& aoshell)
61 : _decay(gaussian._decay),
62 _contraction(gaussian._contraction),
63 _aoshell(aoshell),
64 _powfactor(gaussian._powfactor) {
65 ;
66 }
6789 };
6890
6991 /*
7092 * shells in a Gaussian-basis expansion
7193 */
7294 class AOShell {
73 friend class AOBasis;
95 friend AOBasis;
7496
7597 public:
76 AOShell(const AOShell& shell) {
98 AOShell(const Shell& shell, const QMAtom& atom, Index startIndex);
7799
78 _type = shell._type;
79 _Lmax = shell._Lmax;
80 _Lmin = shell._Lmin;
81 _scale = shell._scale;
82 _numFunc = shell._numFunc;
83 _numcartFunc = shell._numcartFunc;
84 _mindecay = shell._mindecay;
85 _startIndex = shell._startIndex;
86 _offset = shell._offset;
87 _cartOffset = shell._cartOffset;
88 _pos = shell._pos;
89 _atomindex = shell._atomindex;
90 _gaussians.reserve(shell._gaussians.size());
91 for (const auto& gaus : shell._gaussians) {
92 _gaussians.push_back(AOGaussianPrimitive(gaus, *this));
93 }
100 AOShell(const AOGaussianPrimitive::data& d) {
101 _l = static_cast<L>(d.l);
102 _scale = d.scale;
103 _startIndex = d.startindex;
104 _atomindex = d.atomid;
105 _pos = Eigen::Vector3d(d.x, d.y, d.z);
106 _gaussians.push_back(AOGaussianPrimitive(d, *this));
94107 }
95108
96 const std::string& getType() const { return _type; }
97 Index getNumFunc() const { return _numFunc; }
98 Index getCartesianNumFunc() const { return _numcartFunc; }
109 AOShell(const AOShell& shell);
110
111 L getL() const { return _l; }
112 Index getNumFunc() const { return NumFuncShell(_l); };
113 Index getCartesianNumFunc() const { return NumFuncShell_cartesian(_l); };
99114 Index getStartIndex() const { return _startIndex; }
100 Index getOffset() const { return _offset; }
101 Index getCartesianOffset() const { return _cartOffset; }
115 Index getOffset() const { return OffsetFuncShell(_l); }
116 Index getCartesianOffset() const { return OffsetFuncShell_cartesian(_l); }
102117 Index getAtomIndex() const { return _atomindex; }
118 Index getSize() const { return _gaussians.size(); }
103119
104 Index getLmax() const { return _Lmax; }
105 Index getLmin() const { return _Lmin; }
106
107 bool isCombined() const { return _Lmax != _Lmin; }
120 libint2::Shell LibintShell() const;
108121
109122 const Eigen::Vector3d& getPos() const { return _pos; }
110123 double getScale() const { return _scale; }
112125 void CalcMinDecay() {
113126 _mindecay = std::numeric_limits<double>::max();
114127 for (auto& gaussian : _gaussians) {
115 if (gaussian.getDecay() < _mindecay) {
116 _mindecay = gaussian.getDecay();
117 }
128 _mindecay = std::min(_mindecay, gaussian.getDecay());
118129 }
119 return;
120130 }
121131
122132 double getMinDecay() const { return _mindecay; }
143153 friend std::ostream& operator<<(std::ostream& out, const AOShell& shell);
144154
145155 private:
146 // only class aobasis can construct shells
147 AOShell(const Shell& shell, const QMAtom& atom, Index startIndex)
148 : _type(shell.getType()),
149 _Lmax(shell.getLmax()),
150 _Lmin(shell.getLmin()),
151 _scale(shell.getScale()),
152 _numFunc(shell.getnumofFunc()),
153 _numcartFunc(xtp::NumFuncShell_cartesian(shell.getType())),
154 _startIndex(startIndex),
155 _offset(shell.getOffset()),
156 _cartOffset(xtp::OffsetFuncShell_cartesian(shell.getType())),
157 _pos(atom.getPos()),
158 _atomindex(atom.getId()) {
159 ;
160 }
161
162 std::string _type;
163 Index _Lmax;
164 Index _Lmin;
156 L _l;
165157 // scaling factor
166158 double _scale;
167159 // number of functions in shell
168 Index _numFunc;
169 Index _numcartFunc;
170160 double _mindecay;
171161 Index _startIndex;
172 Index _offset;
173 Index _cartOffset;
174162 Eigen::Vector3d _pos;
175163 Index _atomindex;
176164
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_AOTRANSFORM_H
2121 #define VOTCA_XTP_AOTRANSFORM_H
2222
23 #include <votca/xtp/aoshell.h>
24 #include <votca/xtp/eigen.h>
23 // Local VOTCA includes
24 #include "aoshell.h"
25 #include "eigen.h"
2526
2627 namespace votca {
2728 namespace xtp {
8283 static std::array<int, 120> i_more_y();
8384 static std::array<int, 120> i_more_z();
8485
85 static Index getCartesianSize(Index l);
86 static Index getSphericalSize(Index l);
8786 static Index getBlockSize(Index lmax);
88 static Eigen::MatrixXd getTrafo(const AOGaussianPrimitive& gaussian);
8987 static Eigen::VectorXd XIntegrate(Index size, double U);
9088
91 private:
92 // clang-format off
93 enum S { s };
94 enum P { x, y, z };
95 enum D { xx, xy, xz, yy, yz, zz };
96 enum F { xxx, xxy, xxz, xyy, xyz, xzz, yyy, yyz, yzz, zzz };
97 enum G {
98 xxxx, xxxy, xxxz, xxyy, xxyz, xxzz, xyyy, xyyz, xyzz, xzzz, yyyy,
99 yyyz, yyzz, yzzz, zzzz
100 };
101 enum H {
102 xxxxx, xxxxy, xxxxz, xxxyy, xxxyz, xxxzz, xxyyy, xxyyz, xxyzz, xxzzz,
103 xyyyy, xyyyz, xyyzz, xyzzz, xzzzz, yyyyy, yyyyz, yyyzz, yyzzz, yzzzz,
104 zzzzz
105 };
106 enum I {
107 xxxxxx, xxxxxy, xxxxxz, xxxxyy, xxxxyz, xxxxzz, xxxyyy, xxxyyz, xxxyzz,
108 xxxzzz, xxyyyy, xxyyyz, xxyyzz, xxyzzz, xxzzzz, xyyyyy, xyyyyz, xyyyzz,
109 xyyzzz, xyzzzz, xzzzzz, yyyyyy, yyyyyz, yyyyzz, yyyzzz, yyzzzz, yzzzzz,
110 zzzzzz
111 };
112 // clang-format on
89 static double getNorm(L l, const AOGaussianPrimitive& gaussian);
11390
114 static Eigen::MatrixXd getPrimitiveShellTrafo(Index l, double decay,
115 double contraction);
91 /// transforms a cartesian shell to a spherical cartesian shell
92 template <typename Matrix>
93 static Matrix tform(L l_row, L l_col, const Matrix& cartesian);
11694 };
11795
11896 } // namespace xtp
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2222 #ifndef VOTCA_XTP_ATOM_H
2323 #define VOTCA_XTP_ATOM_H
2424
25 // Standard includes
2526 #include <exception>
2627 #include <map>
2728 #include <string>
28 #include <votca/xtp/checkpointreader.h>
29 #include <votca/xtp/checkpointwriter.h>
29
30 // Local VOTCA includes
31 #include "checkpointreader.h"
32 #include "checkpointwriter.h"
3033
3134 namespace votca {
3235 namespace xtp {
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1919 #pragma once
2020 #ifndef VOTCA_XTP_ATOMCONTAINER_H
2121 #define VOTCA_XTP_ATOMCONTAINER_H
22
23 // Standard includes
2224 #include <limits>
2325 #include <typeinfo>
26
27 // VOTCA includes
2428 #include <votca/tools/elements.h>
25 #include <votca/xtp/checkpoint.h>
26 #include <votca/xtp/eigen.h>
29
30 // Local VOTCA includes
31 #include "checkpoint.h"
32 #include "eigen.h"
2733
2834 /**
2935 * \brief Basic Container for QMAtoms,PolarSites and Atoms
5965 }
6066 void push_back(T&& atom) {
6167 _atomlist.push_back(atom);
62 calcPos();
63 }
64
65 void AddContainer(const AtomContainer<T>& container) {
66 _type += "_" + container._type;
67 _atomlist.insert(_atomlist.end(), container._atomlist.begin(),
68 container._atomlist.end());
6968 calcPos();
7069 }
7170
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
2020 #ifndef VOTCA_XTP_BASISSET_H
2121 #define VOTCA_XTP_BASISSET_H
2222
23 // Standard includes
2324 #include <iostream>
2425 #include <map>
2526 #include <memory>
2627 #include <string>
2728 #include <vector>
29
30 // VOTCA includes
2831 #include <votca/tools/types.h>
2932
3033 namespace votca {
3134 namespace xtp {
35
36 enum class L { S = 0, P = 1, D = 2, F = 3, G = 4, H = 5, I = 6 };
37
38 std::string EnumToString(L l);
39
40 L StringToEnum(const std::string& type);
41 L StringToEnum(char type);
42
3243 // shell type (S, P, D))
3344
34 Index FindLmax(const std::string& type);
45 bool CheckShellType(const std::string& shelltype);
3546
36 Index FindLmin(const std::string& type);
47 Index OffsetFuncShell(L l);
3748
38 Index OffsetFuncShell(const std::string& shell_type);
49 Index NumFuncShell(L l);
50 Index NumFuncShell_cartesian(L l);
3951
40 Index NumFuncShell(const std::string& shell_type);
41 Index NumFuncShell_cartesian(const std::string& shell_type);
42
43 Index OffsetFuncShell_cartesian(const std::string& shell_type);
44
45 std::vector<Index> NumFuncSubShell(const std::string& shell_type);
52 Index OffsetFuncShell_cartesian(L l);
4653
4754 // Gaussian function: contraction*exp(-decay*r^2)
4855 class GaussianPrimitive {
4956 public:
50 GaussianPrimitive(double decay, std::vector<double> contraction)
57 GaussianPrimitive(double decay, double contraction)
5158 : _decay(decay), _contraction(contraction) {}
52 const std::vector<double>& Contractions() const { return _contraction; }
59 double contraction() const { return _contraction; }
5360
5461 double decay() const { return _decay; }
5562
5663 private:
5764 double _decay;
58 std::vector<double> _contraction;
65 double _contraction;
5966 };
6067
6168 class Shell {
6269
6370 public:
64 Shell(std::string type, double scale) : _type(type), _scale(scale) { ; }
65 const std::string& getType() const { return _type; }
71 Shell(L l, double scale) : _l(l), _scale(scale) { ; }
6672
67 bool isCombined() const { return (_type.length() > 1); }
73 L getL() const { return _l; }
6874
69 Index getLmax() const { return FindLmax(_type); }
75 Index getnumofFunc() const { return NumFuncShell(_l); };
7076
71 Index getLmin() const { return FindLmin(_type); }
72
73 Index getnumofFunc() const { return NumFuncShell(_type); };
74
75 Index getOffset() const { return OffsetFuncShell(_type); }
77 Index getOffset() const { return OffsetFuncShell(_l); }
7678
7779 double getScale() const { return _scale; }
7880
8688 }
8789
8890 // adds a Gaussian
89 GaussianPrimitive& addGaussian(double decay, std::vector<double> contraction);
91 GaussianPrimitive& addGaussian(double decay, double contraction);
9092 friend std::ostream& operator<<(std::ostream& out, const Shell& shell);
9193
9294 private:
93 std::string _type;
95 L _l;
9496 // scaling factor
9597 double _scale;
9698
111113
112114 const std::string& getType() const { return _type; }
113115
114 Shell& addShell(const std::string& shellType, double shellScale) {
115 _shells.push_back(Shell(shellType, shellScale));
116 Shell& addShell(L l, double shellScale) {
117 _shells.push_back(Shell(l, shellScale));
116118 return _shells.back();
117119 }
118120
146148
147149 friend std::ostream& operator<<(std::ostream& out, const BasisSet& basis);
148150
151 const std::string& Name() const { return _name; }
152
149153 private:
150154 Element& addElement(std::string elementType);
151155 std::string _name;
+0
-94
include/votca/xtp/bfgs-trm.h less more
0 /*
1 * Copyright 2009-2019 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #pragma once
20 #ifndef VOTCA_XTP_BFGSTRM_H
21 #define VOTCA_XTP_BFGSTRM_H
22
23 #include <functional>
24 #include <vector>
25 #include <votca/xtp/logger.h>
26 #include <votca/xtp/optimiser_costfunction.h>
27
28 namespace votca {
29 namespace xtp {
30
31 class BFGSTRM {
32 public:
33 BFGSTRM(Optimiser_costfunction& costfunction) : _costfunction(costfunction) {
34 _hessian = Eigen::MatrixXd::Identity(costfunction.NumParameters(),
35 costfunction.NumParameters());
36 }
37
38 void setLog(Logger* pLog) { _pLog = pLog; }
39
40 void setTrustRadius(double trust_radius) { _trust_radius = trust_radius; }
41
42 double getTrustRadius() const { return _trust_radius; }
43
44 void setCallbacks(const std::vector<std::function<void()> >& callbacks) {
45 _callbacks = callbacks;
46 }
47
48 void setNumofIterations(Index iterations) { _max_iteration = iterations; }
49
50 void Optimize(const Eigen::VectorXd& initialparameters);
51
52 bool Success() const { return _success; }
53 std::string getErrorMessage() const { return _errormessage; }
54
55 double getCost() const { return _cost; }
56
57 Index getIteration() const { return _iteration; }
58
59 const Eigen::VectorXd getParameters() const { return _parameters; }
60
61 void setInitialHessian(const Eigen::MatrixXd& hessian) { _hessian = hessian; }
62
63 private:
64 Optimiser_costfunction& _costfunction;
65
66 void UpdateHessian(const Eigen::VectorXd& delta_pos,
67 const Eigen::VectorXd& delta_gradient);
68 double QuadraticEnergy(const Eigen::VectorXd& gradient,
69 const Eigen::VectorXd& delta_pos) const;
70 bool AcceptRejectStep(const Eigen::VectorXd& delta_pos,
71 const Eigen::VectorXd& gradient, double energy_delta);
72
73 std::string _errormessage;
74 bool _success = true;
75 Index _iteration = 0;
76
77 std::vector<std::function<void()> > _callbacks;
78
79 Eigen::MatrixXd _hessian;
80 Eigen::VectorXd _parameters;
81
82 double _cost = std::numeric_limits<double>::max();
83
84 double _trust_radius = 0.1;
85
86 Index _max_iteration = 200;
87
88 Logger* _pLog;
89 };
90
91 } // namespace xtp
92 } // namespace votca
93 #endif // VOTCA_XTP_BFGSTRM_H
0 /*
1 * Copyright 2009-2020 The VOTCA Development Team
2 * (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #pragma once
20 #ifndef VOTCA_XTP_BFGS_TRM_H
21 #define VOTCA_XTP_BFGS_TRM_H
22
23 // Standard includes
24 #include <functional>
25 #include <vector>
26
27 // Local VOTCA includes
28 #include "logger.h"
29 #include "optimiser_costfunction.h"
30
31 namespace votca {
32 namespace xtp {
33
34 class BFGSTRM {
35 public:
36 BFGSTRM(Optimiser_costfunction& costfunction) : _costfunction(costfunction) {
37 _hessian = Eigen::MatrixXd::Identity(costfunction.NumParameters(),
38 costfunction.NumParameters());
39 }
40
41 void setLog(Logger* pLog) { _pLog = pLog; }
42
43 void setTrustRadius(double trust_radius) { _trust_radius = trust_radius; }
44
45 double getTrustRadius() const { return _trust_radius; }
46
47 void setCallbacks(const std::vector<std::function<void()> >& callbacks) {
48 _callbacks = callbacks;
49 }
50
51 void setNumofIterations(Index iterations) { _max_iteration = iterations; }
52
53 void Optimize(const Eigen::VectorXd& initialparameters);
54
55 bool Success() const { return _success; }
56 std::string getErrorMessage() const { return _errormessage; }
57
58 double getCost() const { return _cost; }
59
60 Index getIteration() const { return _iteration; }
61
62 const Eigen::VectorXd getParameters() const { return _parameters; }
63
64 void setInitialHessian(const Eigen::MatrixXd& hessian) { _hessian = hessian; }
65
66 private:
67 Optimiser_costfunction& _costfunction;
68
69 void UpdateHessian(const Eigen::VectorXd& delta_pos,
70 const Eigen::VectorXd& delta_gradient);
71 double QuadraticEnergy(const Eigen::VectorXd& gradient,
72 const Eigen::VectorXd& delta_pos) const;
73 bool AcceptRejectStep(const Eigen::VectorXd& delta_pos,
74 const Eigen::VectorXd& gradient, double energy_delta);
75
76 std::string _errormessage;
77 bool _success = true;
78 Index _iteration = 0;
79
80 std::vector<std::function<void()> > _callbacks;
81
82 Eigen::MatrixXd _hessian;
83 Eigen::VectorXd _parameters;
84
85 double _cost = std::numeric_limits<double>::max();
86
87 double _trust_radius = 0.1;
88
89 Index _max_iteration = 200;
90
91 Logger* _pLog;
92 };
93
94 } // namespace xtp
95 } // namespace votca
96 #endif // VOTCA_XTP_BFGS_TRM_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1717 */
1818
1919 #pragma once
20 #ifndef _VOTCA_XTP_BSE_H
21 #define _VOTCA_XTP_BSE_H
20 #ifndef VOTCA_XTP_BSE_H
21 #define VOTCA_XTP_BSE_H
2222
23 #include <votca/xtp/logger.h>
24 #include <votca/xtp/orbitals.h>
25 #include <votca/xtp/qmstate.h>
26 #include <votca/xtp/threecenter.h>
23 // Local VOTCA includes
24 #include "logger.h"
25 #include "orbitals.h"
26 #include "qmstate.h"
27 #include "threecenter.h"
2728
2829 namespace votca {
2930 namespace xtp {
3839 class BSE {
3940
4041 public:
41 BSE(Logger& log, TCMatrix_gwbse& Mmn, const Eigen::MatrixXd& Hqp)
42 : _log(log), _Mmn(Mmn), _Hqp(Hqp){};
42 // BSE(Logger& log, TCMatrix_gwbse& Mmn, const Eigen::MatrixXd& Hqp_in)
43 // : _log(log), _Mmn(Mmn), _Hqp_in(Hqp_in){};
44 BSE(Logger& log, TCMatrix_gwbse& Mmn) : _log(log), _Mmn(Mmn){};
4345
4446 struct options {
4547 bool useTDA = true;
4749 Index rpamin;
4850 Index rpamax;
4951 Index qpmin;
52 Index qpmax;
5053 Index vmin;
5154 Index cmax;
52 Index nmax = 5; // number of eigenvectors to calculate
53 bool davidson = true; // use davidson to diagonalize the matrix
54 bool matrixfree = false; // use matrix free method
55 std::string davidson_correction = "DPR";
56 std::string davidson_ortho = "GS";
57 std::string davidson_tolerance = "normal";
58 std::string davidson_update = "safe";
59 Index davidson_maxiter = 50;
60 double min_print_weight =
61 0.5; // minimium contribution for state to print it
55 Index nmax; // number of eigenvectors to calculate
56 bool davidson; // use davidson to diagonalize the matrix
57 bool matrixfree; // use matrix free method
58 std::string davidson_correction;
59 std::string davidson_ortho;
60 std::string davidson_tolerance;
61 std::string davidson_update;
62 Index davidson_maxiter;
63 double min_print_weight; // minimium contribution for state to print it
64 bool use_Hqp_offdiag;
65 Index max_dyn_iter;
66 double dyn_tolerance;
6267 };
6368
64 void configure(const options& opt, const Eigen::VectorXd& DFTenergies);
69 void configure(const options& opt, const Eigen::VectorXd& RPAEnergies,
70 const Eigen::MatrixXd& Hqp_in);
6571
6672 void Solve_singlets(Orbitals& orb) const;
6773 void Solve_triplets(Orbitals& orb) const;
74
75 Eigen::MatrixXd getHqp() const { return _Hqp; };
6876
6977 SingletOperator_TDA getSingletOperator_TDA() const;
7078 TripletOperator_TDA getTripletOperator_TDA() const;
7381 const Orbitals& orb) const;
7482 void Analyze_triplets(std::vector<QMFragment<BSE_Population> > fragments,
7583 const Orbitals& orb) const;
84
85 void Perturbative_DynamicalScreening(const QMStateType& type, Orbitals& orb);
7686
7787 private:
7888 options _opt;
8393 Eigen::VectorXd qp_contrib;
8494 };
8595
96 struct ExpectationValues {
97 Eigen::VectorXd direct_term;
98 Eigen::VectorXd cross_term;
99 };
100
86101 Logger& _log;
87102 Index _bse_vmax;
88103 Index _bse_cmin;
90105 Index _bse_vtotal;
91106 Index _bse_ctotal;
92107
108 Index _max_dyn_iter;
109 double _dyn_tolerance;
110
93111 Eigen::VectorXd _epsilon_0_inv;
94112
95113 TCMatrix_gwbse& _Mmn;
96 const Eigen::MatrixXd& _Hqp;
114 Eigen::MatrixXd _Hqp;
97115
98116 tools::EigenSystem Solve_singlets_TDA() const;
99117 tools::EigenSystem Solve_singlets_BTDA() const;
107125 void configureBSEOperator(BSE_OPERATOR& H) const;
108126
109127 template <typename BSE_OPERATOR>
110 tools::EigenSystem solve_hermitian(BSE_OPERATOR& H) const;
128 tools::EigenSystem solve_hermitian(BSE_OPERATOR& h) const;
111129
112130 template <typename BSE_OPERATOR_ApB, typename BSE_OPERATOR_AmB>
113131 tools::EigenSystem Solve_nonhermitian(BSE_OPERATOR_ApB& apb,
120138 void printFragInfo(const std::vector<QMFragment<BSE_Population> >& frags,
121139 Index state) const;
122140 void printWeights(Index i_bse, double weight) const;
123 void SetupDirectInteractionOperator(const Eigen::VectorXd& DFTenergies);
141 void SetupDirectInteractionOperator(const Eigen::VectorXd& DFTenergies,
142 double energy);
143
144 Eigen::MatrixXd AdjustHqpSize(const Eigen::MatrixXd& Hqp_in,
145 const Eigen::VectorXd& RPAInputEnergies);
124146
125147 Interaction Analyze_eh_interaction(const QMStateType& type,
126148 const Orbitals& orb) const;
127149 template <typename BSE_OPERATOR>
128 Eigen::VectorXd Analyze_IndividualContribution(const QMStateType& type,
129 const Orbitals& orb,
130 const BSE_OPERATOR& H) const;
150 ExpectationValues ExpectationValue_Operator(const QMStateType& type,
151 const Orbitals& orb,
152 const BSE_OPERATOR& H) const;
153
154 template <typename BSE_OPERATOR>
155 ExpectationValues ExpectationValue_Operator_State(const QMStateType& type,
156 const Orbitals& orb,
157 const BSE_OPERATOR& H,
158 const Index state) const;
131159 };
132160 } // namespace xtp
133161 } // namespace votca
134162
135 #endif /* _VOTCA_XTP_BSE_H */
163 #endif // VOTCA_XTP_BSE_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1717 */
1818
1919 #pragma once
20 #ifndef _VOTCA_XTP_BSE_OPERATOR_H
21 #define _VOTCA_XTP_BSE_OPERATOR_H
20 #ifndef VOTCA_XTP_BSE_OPERATOR_H
21 #define VOTCA_XTP_BSE_OPERATOR_H
2222
23 #include <votca/xtp/eigen.h>
24 #include <votca/xtp/matrixfreeoperator.h>
25 #include <votca/xtp/threecenter.h>
23 // Local VOTCA includes
24 #include "eigen.h"
25 #include "matrixfreeoperator.h"
26 #include "threecenter.h"
2627
2728 namespace votca {
2829 namespace xtp {
8889 } // namespace xtp
8990 } // namespace votca
9091
91 #endif /* _VOTCA_XTP_BSE_OP_H */
92 #endif // VOTCA_XTP_BSE_OPERATOR_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team
1 * Copyright 2009-2020 The VOTCA Development Team
22 * (http://www.votca.org)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License")
1717 */
1818
1919 #pragma once
20 #ifndef VOTCA_XTP_BSE_POPULATIONS_H
21 #define VOTCA_XTP_BSE_POPULATIONS_H
20 #ifndef VOTCA_XTP_BSE_POPULATION_H
21 #define VOTCA_XTP_BSE_POPULATION_H
2222
23 #include <votca/xtp/checkpoint.h>
24 #include <votca/xtp/eigen.h>
23 // Local VOTCA includes
24 #include "checkpoint.h"
25 #include "eigen.h"
2526
2627 /**
2728 * \brief Small container to keep occupation of BSE states for each atom
7374 } // namespace xtp
7475 } // namespace votca
7576
76 #endif // VOTCA_XTP_BSE_POPULATIONS_H
77 #endif // VOTCA_XTP_BSE_POPULATION_H
00 /*
1 * Copyright 2009-2019 The VOTCA Development Team