Skip to content

Small fix in get_random_packed_structure #2

Open
orionarcher wants to merge 7 commits intoBryantLi-BLI:feature/mpmorphfrom
orionarcher:mpmorph_fix
Open

Small fix in get_random_packed_structure #2
orionarcher wants to merge 7 commits intoBryantLi-BLI:feature/mpmorphfrom
orionarcher:mpmorph_fix

Conversation

@orionarcher
Copy link

@BryantLi-BLI @esoteric-ephemera

I was having issues when running get_random_packed_structure as a job. The composition was at some point being converted to a dict and never converted back to a composition. This fixed it for me.

The small reformat is because my linter triggered.

orionarcher and others added 5 commits September 27, 2024 10:40
* Excise openff dependency from openmm testing

* Remove commmented out code

* Update src/atomate2/openmm/jobs/base.py

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>

* Respond to Yanosh PR and fix type of OpenMM Flow

* Fix typo, lint

* Add dataclass tag where needed

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
…aterialsproject#996)

* Fix `prev_dir` behavior in `MPGGAStaticMaker`

* Set `inherit_incar=False` throughout MP jobs.

* Add a test

* add assert maker.input_set_generator.inherit_incar is False to all MP job tests

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
* move ase tests to separate test run, use pytest-split on rest of tests, 3 runs per linux version

* add test durations for split

* update test split, run notebook test as separate test, update test time

* move jupyter notebook test into ase

* tweak some clean_dir to tmp_dir to prevent unncessary test file creation

* reduce to 4 splits

* go back to 3 splits

* try to get better ci timing estimate per @janosh's suggestion

* fix test split cmd

* revert pytest split change for separate pr

* sync with ase branch and add test split logic / times

* tweak wf

* change pytest split algo, see if 5 splits works better for balancing

* change to 3 splits

* change gruneisen test for time use - just make phonon maker cheaper

* add ase to phonon supported codes, enforce string literal in BasePhononMaker

* update timing for gruneisen

* try to fix ci test wf

* ci test wf

* merge conflict fixes, try reorg tests

* pcmt, other tweaks

* remove lingering ase frechet filter remarks

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
…s, I was having issues running get_random_packed_structure as a job. The composition was at some point being converted to a dict and never converted back to a composition.
@esoteric-ephemera
Copy link
Collaborator

Thanks @orionarcher, will merge this in. Just to check, is the Composition.from_dict(<dict>) necessary, or does calling Composition(<dict>) also work? The constructor for Composition is pretty flexible

@orionarcher
Copy link
Author

Let me check. I think Composition(<dict>) should be fine though.

I'm still having some trouble with deserialization, so let's hold off on merging until it's sorted. I'll post an update later.

@@ -315,6 +317,8 @@ def get_random_packed_structure(
)
if isinstance(composition, str):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would probably just change these following lines to:

if isinstance(composition, (str,dict)):
    composition = Composition(composition)

Copy link
Author

@orionarcher orionarcher Oct 1, 2024

Choose a reason for hiding this comment

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

Agreed, that's much cleaner.

orionarcher and others added 2 commits October 1, 2024 13:24
…1004)

* Make energy minimization reporter report a state file when it runs. This allows us to see energies of minimized configuration.

* Only report energy minimization state if state_interval > 0
@esoteric-ephemera
Copy link
Collaborator

Hey @orionarcher not sure what's happening with the git versioning but is it OK if I just make this change and tag you on it?

@orionarcher
Copy link
Author

Yeah just do that! Was going to suggest it myself. The deserialization issue was due to something else so you are good to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants