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

Test and document external calculators #383

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

ElliottKasoar
Copy link
Member

Resolves #380

@ElliottKasoar ElliottKasoar self-assigned this Jan 16, 2025
@ElliottKasoar ElliottKasoar added the documentation Improvements or additions to documentation label Jan 16, 2025
Copy link
Collaborator

@harveydevereux harveydevereux left a comment

Choose a reason for hiding this comment

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

I think this is a good addition for the docs, is there any reason why this would not work?

Obviously if the calc depends on something and you don't have it installed (lammps) it won't, which is fine.

But are there breaking code changes we or ASE might make, justifying testing subbing e.g. LennardJones into struct.calc et al.?

@ElliottKasoar
Copy link
Member Author

I think this is a good addition for the docs, is there any reason why this would not work?

Obviously if the calc depends on something and you don't have it installed (lammps) it won't, which is fine.

But are there breaking code changes we or ASE might make, justifying testing subbing e.g. LennardJones into struct.calc et al.?

Yes it inevitably requires the user to set up the calculator correctly, which may well require other installations, and I'm not sure exactly how it would behave with the less native calculators e.g. CP2K requires running something like:

CP2K.command="env OMP_NUM_THREADS=2 mpiexec -np 4 cp2k_shell.psmp"

I knew that every calculation after SinglePoint was built in a way that it could (initially it had to) take SinglePoint.struct inputs, which meant it wouldn't try to reattach a calculator if it was already there.

The only thing I wasn't sure about was if anywhere we assume things like struct.calc.parameters having certain values, but I've always tried to make sure that sort of thing is optional.

I think in general the ASE calculator interface could change, but I don't think anything would break something like LennardJones that wouldn't break MACE etc., so perhaps it would be sensible to test for it.

@ElliottKasoar ElliottKasoar changed the title Add docs for external calculators Test and document external calculators Jan 17, 2025
Copy link
Collaborator

@oerc0122 oerc0122 left a comment

Choose a reason for hiding this comment

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

Nice and simple, if it does the job, happy with it.

@ElliottKasoar ElliottKasoar merged commit 4e0d1cd into stfc:main Jan 17, 2025
11 checks passed
@ElliottKasoar ElliottKasoar deleted the doc-calcs branch January 17, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document external calculators?
3 participants