Skip to content

Conversation

@fevangelista
Copy link
Contributor

@fevangelista fevangelista commented Nov 4, 2021

Description

This PR fixes a bug in the UHF gradients for systems with no beta electrons (1-electron systems).
On line 463 of psi4/src/psi4/scfgrad/jk_grad.cc I couldn't avoid skipping this operation because this buffer is read somewhere else (and it practically does not matter for 1-electron systems).

// > Stripe < //
psio_->write(unit_b_, "(A|ij)", (char*)Aijp[0], sizeof(double) * np * nb * nb, next_Aijb, &next_Aijb);

Todos

  • Fixes logic in scf_grad code

Checklist

Status

  • Ready for review
  • Ready for merge

@fevangelista fevangelista changed the title Fix bug and add test Fix bug in UHF gradient code Nov 4, 2021
@JonathonMisiewicz
Copy link
Contributor

One thing that needs to be added: update tests/CMakeLists.txt with the name of your new test.

Copy link
Member

@loriab loriab left a comment

Choose a reason for hiding this comment

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

I added to the tests/CMakeLists directly.

@JonathonMisiewicz JonathonMisiewicz added this to the Psi4 1.5 milestone Nov 5, 2021
@JonathonMisiewicz JonathonMisiewicz merged commit ace6b39 into psi4:master Nov 5, 2021
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.

4 participants