Skip to content

Commit

Permalink
Parallelization for gp3_ipea (#109)
Browse files Browse the repository at this point in the history
* initial work

* new parallelization preliminary done

* small fix in tests

* commented unnecessary code

* updated construction sites

* hopefully fixed parallelization

* small test fix

* initial work

* new parallelization preliminary done

* small fix in tests

* commented unnecessary code

* updated construction sites

* hopefully fixed parallelization

* small test fix

* only print when verbosity > 0, otherwise nothing is printed (bad)

* pre-commit fixes

* added ncores to config + implemented setting ncores for external programs

* fixed tests

* added check for number of cores available vs needed

* pre-commit

* Added support for Turbomole (#101)

* Interface for the qm program turbomole

Signed-off-by: Jonathan Schöps <[email protected]>

* support for turbomole

Signed-off-by: Jonathan Schöps <[email protected]>

* corrected some typos

Signed-off-by: Jonathan Schöps <[email protected]>

* changed the PARNODES command

Signed-off-by: Jonathan Schöps <[email protected]>

* coord handling

Signed-off-by: Jonathan Schöps <[email protected]>

* requestet changes are build in

Signed-off-by: Jonathan Schöps <[email protected]>

* Implementation of the requested changes and the test of the read_mol_from_coord function

Signed-off-by: Jonathan Schöps <[email protected]>

* Implementation of two pathes for turbomole

Signed-off-by: Jonathan Schöps <[email protected]>

* Ignore HOMO-LUMO gap not implemented as refine engine  for Orca and Trubomole

Signed-off-by: Jonathan Schöps <[email protected]>

* improve TURBOMOLE configuration

Signed-off-by: Marcel Müller <[email protected]>

* correct linting errors

Signed-off-by: Marcel Mueller <[email protected]>

* exclude more recent interfaces from coverage check

Signed-off-by: Marcel Müller <[email protected]>

* added a test for the 'write_coord_to_file' function

Signed-off-by: Jonathan Schöps <[email protected]>

* sync the lokal branch with the remote branch

Signed-off-by: Jonathan Schöps <[email protected]>

---------

Signed-off-by: Jonathan Schöps <[email protected]>
Signed-off-by: Marcel Müller <[email protected]>
Signed-off-by: Marcel Mueller <[email protected]>
Co-authored-by: Marcel Müller <[email protected]>

* test fix

* fixed tm implementation

* updated main.py

* tqdm progress bar

* updated dependencies

* mypy types import

* moved warnings in correct bracket

* updated default config toml

* added final output of molecules and timing

* fixed time

* better time info

* print formatting

* shift block setup to parallel.py

Signed-off-by: Marcel Müller <[email protected]>

* avoid UnboundLocalError

Signed-off-by: Marcel Müller <[email protected]>

* some code formatting and printout adjustments

Signed-off-by: Marcel Müller <[email protected]>

* shifted CHANGELOG entry to correct position

Signed-off-by: Marcel Müller <[email protected]>

* update CODEOWNERS file

Signed-off-by: Marcel Müller <[email protected]>

* New parallelization (#108)

* initial work

* new parallelization preliminary done

* small fix in tests

* commented unnecessary code

* updated construction sites

* hopefully fixed parallelization

* small test fix

* initial work

* new parallelization preliminary done

* small fix in tests

* commented unnecessary code

* updated construction sites

* hopefully fixed parallelization

* small test fix

* only print when verbosity > 0, otherwise nothing is printed (bad)

* pre-commit fixes

* added ncores to config + implemented setting ncores for external programs

* fixed tests

* added check for number of cores available vs needed

* pre-commit

* test fix

* fixed tm implementation

* updated main.py

* tqdm progress bar

* updated dependencies

* mypy types import

* moved warnings in correct bracket

* updated default config toml

* added final output of molecules and timing

* fixed time

* better time info

* print formatting

* shift block setup to parallel.py

Signed-off-by: Marcel Müller <[email protected]>

* avoid UnboundLocalError

Signed-off-by: Marcel Müller <[email protected]>

* some code formatting and printout adjustments

Signed-off-by: Marcel Müller <[email protected]>

* shifted CHANGELOG entry to correct position

Signed-off-by: Marcel Müller <[email protected]>

* update CODEOWNERS file

Signed-off-by: Marcel Müller <[email protected]>

---------

Signed-off-by: Marcel Müller <[email protected]>
Co-authored-by: Marcel Müller <[email protected]>

* add IP/EA check with g-xTB for special purpose dev application only

Signed-off-by: Marcel Müller <[email protected]>

* rename gp3 to gxtb consistently

Signed-off-by: Marcel Müller <[email protected]>

* add simple SCF cycles check for molecule

Signed-off-by: Marcel Mueller <[email protected]>

* align variable names with g-xTB

Signed-off-by: Marcel Mueller <[email protected]>

* config is now loaded in dev mode; avoid redundant calculations

Signed-off-by: Marcel Mueller <[email protected]>

* hand over correct config and remove redundant config

Signed-off-by: Marcel Mueller <[email protected]>

* remove last rememnant of config for SCF cycles with g-xTB

Signed-off-by: Marcel Mueller <[email protected]>

* added ncores to gxtb calls

* remove redundant config entry

Signed-off-by: Marcel Mueller <[email protected]>

---------

Signed-off-by: Jonathan Schöps <[email protected]>
Signed-off-by: Marcel Müller <[email protected]>
Signed-off-by: Marcel Mueller <[email protected]>
Co-authored-by: Jonathan Schöps <[email protected]>
Co-authored-by: Marcel Müller <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2025
1 parent 3a90201 commit 8b82a86
Show file tree
Hide file tree
Showing 21 changed files with 1,108 additions and 135 deletions.
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @marcelmbn and @thfroitzheim will be requested for
# the names mentioned after the '*' will be requested for
# review when someone opens a pull request.
* @marcelmbn @jonathan-schoeps

# These parts are specifically owned by some people
/src/mindlessgen/cli @marcelmbn
/src/mindlessgen/generator @marcelmbn
/src/mindlessgen/generator @marcelmbn @lmseidler
/src/mindlessgen/molecules @marcelmbn @jonathan-schoeps
/src/mindlessgen/prog @marcelmbn @jonathan-schoeps
/src/mindlessgen/qm @marcelmbn
/src/mindlessgen/prog @marcelmbn @jonathan-schoeps @lmseidler
/src/mindlessgen/qm @marcelmbn @jonathan-schoeps
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- to set the elemental composition it is now possible to use dicts with not only int but also the element symbols (str)
- dict keys for elemental compositions will now always be checked for validity
- Renamed GP3-xTB to g-xTB
- Nothing will be printed while multiple molecules are generated in parallel, tqdm-based progress bar instead
- Some debugging statements from generate had to be removed (esp. w.r.t. early stopping)

### Added
- `GXTBConfig` class for the g-xTB method, supporting SCF cycles check
- support for TURBOMOLE as QM engine.
- updated the parallelization to work over the number of molecules

### Fixed
- version string is now correctly formatted and printed
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ dependencies:
- pre-commit
- pytest
- tox
- tqdm
- pip:
- covdefaults
20 changes: 18 additions & 2 deletions mindlessgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,18 @@ molecular_charge = "none"
[refine]
# > Maximum number of fragment optimization cycles. Options: <int>
max_frag_cycles = 10
# > Quantum Mechanics (QM) engine to use. Options: 'xtb', 'orca'
# > Quantum Mechanics (QM) engine to use. Options: 'xtb', 'orca'. 'turbomole'
engine = "xtb"
# > HOMO-LUMO gap threshold applied at the end of the refinement step
hlgap = 0.5
# > Debug this step. Leads to more verbose output as soon as the refinement part is reached. Options: <bool>
# > If `debug` is true, the process is terminated after the first (successful or not) refinement step.
debug = false
# > Number of cores to be used for geometry optimizations. Single-points will continue to use one core each.
ncores = 4

[postprocess]
# > Engine for the post-processing part. Options: 'xtb', 'orca'
# > Engine for the post-processing part. Options: 'xtb', 'orca', 'turbomole'
engine = "orca"
# > Optimize geometry in the post-processing part. If `false`, only a single-point is conducted. Options: <bool>
optimize = true
Expand All @@ -70,6 +72,8 @@ opt_cycles = 5
# > If `debug` is true, the process is terminated after the first (successful or not) post-processing step.
# > Note: This option is only relevant if the 'postprocess' option in the 'general' section is set to 'true'.
debug = false
# > Number of cores to be used for both single-point calculations and geometry optimizations.
ncores = 4

[xtb]
# > Path to the xtb executable. The names `xtb` and `xtb_dev` are automatically searched for. Options: <str | Path>
Expand All @@ -88,3 +92,15 @@ basis = "def2-SVP"
gridsize = 1
# > Maximum number of SCF cycles: Options: <int>
scf_cycles = 100

[turbomole]
# > Path to the ridft executable. The name `ridft` is automatically searched for. Options: <str | Path>
ridft_path = "/path/to/ridft"
# > Path to the jobex executable. The name `jobex` is automatically searched for. Options: <str | Path>
jobex_path = "/path/to/jobex"
# > Functional/Method: Options: <str>
functional = "PBE"
# > Basis set: Options: <str>
basis = "def2-SVP"
# > Maximum number of SCF cycles: Options: <int>
scf_cycles = 100
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dependencies = ["numpy", "networkx", "toml"]
dependencies = ["numpy", "networkx", "toml", "tqdm"]
dynamic = ["version"]

[project.urls]
Expand All @@ -41,6 +41,7 @@ dev = [
"tox",
"setuptools_scm>=8",
"types-toml",
"types-tqdm",
]

[project.scripts]
Expand All @@ -59,7 +60,12 @@ markers = "optional: mark test as optional"
plugins = ["covdefaults"]
source = ["./src"]
# Exclude interfaces to external programs from coverage
omit = ["src/mindlessgen/qm/xtb.py", "src/mindlessgen/qm/orca.py"]
omit = [
"src/mindlessgen/qm/xtb.py",
"src/mindlessgen/qm/orca.py",
"src/mindlessgen/qm/tm.py",
"src/mindlessgen/qm/gxtb.py",
]

[tool.coverage.report]
fail_under = 50
Loading

0 comments on commit 8b82a86

Please sign in to comment.