Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

A fixed molecular charge for the molecule generation. #73

Merged
merged 17 commits into from
Nov 15, 2024

Conversation

jonathan-schoeps
Copy link
Contributor

@jonathan-schoeps jonathan-schoeps commented Nov 11, 2024

According to issue #68 the following change was made.

  • Add a function to set a charge for the molecule generation but ensure that the molecule is closed shell. This is done by adding or removing an atom, which depends on the overall configuration.

  • This function is controllable via the .toml file and the CLI.

  • The function is the last step within the atom list generation.

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
@marcelmbn marcelmbn linked an issue Nov 12, 2024 that may be closed by this pull request
@marcelmbn marcelmbn added the enhancement New feature or request label Nov 12, 2024
@marcelmbn marcelmbn added this to the v1.0.0 milestone Nov 12, 2024
mindlessgen.toml Outdated Show resolved Hide resolved
src/mindlessgen/cli/cli_parser.py Outdated Show resolved Hide resolved
src/mindlessgen/cli/cli_parser.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/prog/config.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/refinement.py Outdated Show resolved Hide resolved
src/mindlessgen/qm/xtb.py Outdated Show resolved Hide resolved
test/test_generate/test_generate_molecule.py Show resolved Hide resolved
test/test_generate/test_generate_molecule.py Show resolved Hide resolved
src/mindlessgen/qm/xtb.py Outdated Show resolved Hide resolved
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
@jonathan-schoeps
Copy link
Contributor Author

One unit test is failing sometimes when the number of metals within the atom list is larger than 3.

@marcelmbn
Copy link
Member

One unit test is failing sometimes when the number of metals within the atom list is larger than 3.

Do you understand why? There might be a randomness involved, which we don't catch. I observed a similar thing today in the morning.

CHANGELOG.md Outdated Show resolved Hide resolved
mindlessgen.toml Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/generate_molecule.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/miscellaneous.py Outdated Show resolved Hide resolved
src/mindlessgen/qm/xtb.py Show resolved Hide resolved
mindlessgen.toml Outdated Show resolved Hide resolved
src/mindlessgen/molecules/miscellaneous.py Outdated Show resolved Hide resolved
src/mindlessgen/molecules/miscellaneous.py Outdated Show resolved Hide resolved
src/mindlessgen/qm/xtb.py Show resolved Hide resolved
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
@marcelmbn marcelmbn self-requested a review November 15, 2024 14:03
@jonathan-schoeps jonathan-schoeps merged commit 82aa3f5 into grimme-lab:main Nov 15, 2024
10 checks passed
@jonathan-schoeps jonathan-schoeps deleted the dev/fixed_charge branch November 15, 2024 14:56
marcelmbn added a commit that referenced this pull request Nov 18, 2024
* Update Docs (#72)

* update docs, co-workers, pyproject.toml, remove typos

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* update CHANGELOG, make case more consistent

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* update mindlessgen.toml

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* align defaults

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* update reference default value

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* update tests

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* correct inconsistent boolean

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* Fix random number generation by removing legacy random number generation (#78)

* fix random number generation by incorporating default_rng

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* update CHANGELOG.md

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* Remove deprecated tests that are not strictly true (#79)

* remove deprecated tests

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* remove random numpy seed as it's pointless now

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* A fixed molecular charge for the molecule generation. (#73)

* A new function to set a fixed charge value

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* latest changes to the fixed charge method

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Fixed charge and element composition works test have to be added

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* More modular fixed charge routine

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* complete fixed charge routine

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Removed an unnessesary import

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* more convenient function name

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Worked in the suggested changes

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Added a changelog entry

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Changes a bug with an array type

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* removed left over print statements

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Implemented requested changes

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Added a new test to raise a ValueError

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

---------

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* `atlist` to `ati` and back conversion (#81)

* implement atlist to ati conversion

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* add conversion test

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* Bug fix were uhf was always 0 if a fixed charge were given (#80)

* bug fix were uhf was always 0 if a fixed charge were given

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* updated a test for the right uhf

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* get rid of redundant code within set_random_charge

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* using atlist as a variable in misscellaneous

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

---------

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* adapt CODEOWNERS to commit history (#82)

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* The `.UHF` file is now written if the molecule has a uhf larger than 0 (#74)

* The .UHF file is now written if the molecule has a uhf larger than 0

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Writes the .CHRG file if the charge is larger than 0

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* charge and uhf can be None

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* Negative charge is now written aswell

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

---------

Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>

* update CHANGELOG

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>
Signed-off-by: Jonathan Schöps <s6jtscho@uni-bonn.de>
Co-authored-by: Jonathan Schöps <106986430+jonathan-schoeps@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixed charge for molecule generation
2 participants