SCM-NV / PLAMS

Python Library for Automating Molecular Simulations
https://www.scm.com/doc/plams
Other
65 stars 24 forks source link

Draft: BandFragmentJob #130

Open patrickmelix opened 3 months ago

patrickmelix commented 3 months ago

Writing a BandFragmentJob for pEDA calculations based on the available ADFFragmentJob.

Based on initial work by @hweiske.

Feedback welcome!

patrickmelix commented 3 months ago

The documentation used Sphinx app.add_stylesheet, but that has be deprecated. So I've switched it over to app.add_css_file. See https://github.com/sphinx-doc/sphinx/issues/7747#issuecomment-636023612. I did not see any problem with that, but the self-built doc always looks very different to the official one...

Also: There are many relative links in the documentation to other parts of AMS, therefore it cannot be built independently...

patrickmelix commented 2 months ago

I'm not quite sure how the ADFFragment recipe was ever supposed to work... I think I'm fixing it in with b99ff4a.

dormrod commented 2 months ago

The documentation used Sphinx app.add_stylesheet, but that has be deprecated. So I've switched it over to app.add_css_file. See sphinx-doc/sphinx#7747 (comment). I did not see any problem with that, but the self-built doc always looks very different to the official one...

Also: There are many relative links in the documentation to other parts of AMS, therefore it cannot be built independently...

Good idea on the switch to app.add_css_file - this change should now be in trunk. The style sheet for the official doc is not available in the open-source plams, which is why it appears different.

I have also fixed a fair few of the links, although there are still some remaining. I aim to get this as self-contained as possible!

dormrod commented 2 months ago

I'm not quite sure how the ADFFragment recipe was ever supposed to work... I think I'm fixing it in with b99ff4a.

I have been looking at the example plams/recipes/adffragment.py which seems to run successfully. The dependencies seem to resolve successfully, but I need to dig more into exactly why!

patrickmelix commented 2 months ago

I'm not quite sure how the ADFFragment recipe was ever supposed to work... I think I'm fixing it in with b99ff4a.

I have been looking at the example plams/recipes/adffragment.py which seems to run successfully. The dependencies seem to resolve successfully, but I need to dig more into exactly why!

Interesting. For me it did not create a valid input file...

patrickmelix commented 2 months ago

Working on debugging the issue with relative restart paths with Pier at the moment. Perhaps I can make the code much easier when we figure out when relative paths make the calculations crash...

dormrod commented 2 months ago

I'm not quite sure how the ADFFragment recipe was ever supposed to work... I think I'm fixing it in with b99ff4a.

I have been looking at the example plams/recipes/adffragment.py which seems to run successfully. The dependencies seem to resolve successfully, but I need to dig more into exactly why!

Interesting. For me it did not create a valid input file...

Found it - for reference, the original fragment job works because when getting the input for the full job (https://github.com/SCM-NV/PLAMS/blob/trunk/interfaces/adfsuite/ams.py#L2244), the _tuple2rkf accesses the Results of the fragment jobs (https://github.com/SCM-NV/PLAMS/blob/trunk/interfaces/adfsuite/ams.py#L2658), which blocks the thread until the results are ready.

So this in a roundabout way is how the dependency is enforced between the full and fragment jobs.

I have attached the input file that should be generated by adffragment.py below, if that helps at all full.in.txt

patrickmelix commented 1 month ago

I'm not quite sure how the ADFFragment recipe was ever supposed to work... I think I'm fixing it in with b99ff4a.

I have been looking at the example plams/recipes/adffragment.py which seems to run successfully. The dependencies seem to resolve successfully, but I need to dig more into exactly why!

Interesting. For me it did not create a valid input file...

Found it - for reference, the original fragment job works because when getting the input for the full job (https://github.com/SCM-NV/PLAMS/blob/trunk/interfaces/adfsuite/ams.py#L2244), the _tuple2rkf accesses the Results of the fragment jobs (https://github.com/SCM-NV/PLAMS/blob/trunk/interfaces/adfsuite/ams.py#L2658), which blocks the thread until the results are ready.

So this in a roundabout way is how the dependency is enforced between the full and fragment jobs.

I have attached the input file that should be generated by adffragment.py below, if that helps at all full.in.txt

Ahh, now I understand. Thanks. Just reverted the changes there...