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

Check job pre-run function #230

Conversation

YHordijk
Copy link
Contributor

@YHordijk YHordijk commented May 7, 2024

Added a AMSJob method that is always called before the calculation is run. This is used, currently, to make sure that the initialhessian is not set to DFTB if spin-polarized ADF calculation was requested.

@YHordijk YHordijk linked an issue May 7, 2024 that may be closed by this pull request
@YHordijk YHordijk self-assigned this May 7, 2024
@YHordijk YHordijk requested a review from SiebeLeDe May 7, 2024 23:21
@YHordijk YHordijk added bug Something isn't working enhancement New feature or request labels May 7, 2024
@YHordijk YHordijk marked this pull request as ready for review May 7, 2024 23:25
Copy link
Contributor

@SiebeLeDe SiebeLeDe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree to introduce such functionality. We may want to split the _check_job method further if we want to take into account more special cases. Furthermore, we may want to make this a function instead of a method for testing purposes.

Functions are much easier to write unit tests for than classes, especially if the functions are "pure", which means in this case, having the self.settings both as argument and return.

@YHordijk
Copy link
Contributor Author

YHordijk commented May 9, 2024

I agree to introduce such functionality. We may want to split the _check_job method further if we want to take into account more special cases. Furthermore, we may want to make this a function instead of a method for testing purposes.

Functions are much easier to write unit tests for than classes, especially if the functions are "pure", which means in this case, having the self.settings both as argument and return.

If you want you can open an issue for this and we can discuss what would be the right approach to take here. I agree that pure functions are easy to test, but I also think it fits the purpose of a class method.

@YHordijk YHordijk merged commit 411856a into main May 9, 2024
6 checks passed
@YHordijk YHordijk deleted the 190-spin-polarized-adf-calculations-should-not-use-a-dftb-initial-hessian branch May 9, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spin-polarized ADF calculations should not use a DFTB initial hessian
2 participants