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

NEBRecord can return final_chain now. #771

Closed
wants to merge 4 commits into from
Closed

Conversation

hjnpark
Copy link
Contributor

@hjnpark hjnpark commented Oct 14, 2023

Description

NEBRecord can return a list of SinglepointRecord instances that correspond to the chain from the last NEB iteration. If optimization of the guessed transition state structure (neb result) is requested, its SinglepointRecord with the Hessian is saved in the NEBSinglepoint with a key value of -1. test_full_neb.py has been updated.

Changelog description

record_models.py, record_socket.py, and test_full_neb.py for the NEB service were updated.

Status

  • Code base linted
  • Ready to go

@@ -400,6 +400,7 @@ def submit_singlepoints(
opt_spec = neb_orm.specification.optimization_specification.model_dict()
qc_spec = opt_spec["qc_specification"]
qc_spec["driver"] = "hessian"
service_state.iteration = -1
Copy link
Contributor

Choose a reason for hiding this comment

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

This is my only concern. This could require a database migration, but I think you are the only one using NEB for now. So it might be safe to ignore that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me find a better way that can avoid a database migration.

Comment on lines 150 to 155
neb_result_id = 0
energy = -9999999
for sp in singlepoints[max(singlepoints.keys())]:
if sp.properties["current energy"] > energy:
energy = sp.properties["current energy"]
neb_result_id = sp.molecule_id
Copy link
Contributor

Choose a reason for hiding this comment

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

I think could be made simpler:

max_sp = singlepoints[max_singlepoints.keys()]
sp_energies = [(sp.properties["current_energy"], sp.molecule_id) for sp in max_sp]
energy, neb_result_id = max(sp_energies)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is fixed now.

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.

2 participants