QCEngine icon indicating copy to clipboard operation
QCEngine copied to clipboard

Add default for properties origin at the COC

Open jaclark5 opened this issue 2 months ago • 5 comments

Description

Make SCF properties calculated from the COC (center of charge) of the molecule rather than the origin. This isn't an issue for dipole moments of neutral molecules, but unexpectedly results in very large SCF multipole moments.

I understand if this should be an "us" problem and we should remember to add the keyword, but this is very unexpected behevior. Both Gaussian and ORCA report multiple moments from the center of nuclear charge, so I think this should be consistent.

Changelog description

Set psi4 properties_origin to "center of charge" instead of origin.

Status

  • [X] Code base linted
  • [X] Ready to go

jaclark5 avatar Oct 07 '25 14:10 jaclark5

This has bitten me a number of times too, especially in conjunction with QCElemental's default of fix_com False for molecules and inputs, which (if I understand correctly) is not the default for Psi4 and makes the behavior especially unexpected. I'd support a change to the default, although of course it's a very wide-reaching change. If nothing else it would be nice to get a warning or something

amcisaac avatar Oct 07 '25 14:10 amcisaac

This change has been verified to work in DS: 464, the following records have completed: [147472201, 147472680, 147472714, 147472946, 147472929, 147472957, 147473071, 147472975, 147472963, 147473206, 147473178, 147473494, 147473396, 147473319, 147473394, 147473291]

jaclark5 avatar Oct 09 '25 15:10 jaclark5

Talking with Ben, I think I understand the problem, and yes properties at the origin is weird with fix_com/fix_orientation. (Psi4's default is to reorient to a standard frame, so the origin makes more sense there.) Is center-of-charge much preferred over center-of-mass? I know COC would have been a better choice to start with for isotopic substitution, but everything else in Psi4 is COM-based.

loriab avatar Nov 03 '25 18:11 loriab

@loriab I agree that COM makes more sense, I suggest COC because it's what the other packages do so psi4 would be consistent. We discussed in an internal meeting and Bill Swope suggested that COC is chosen because it's independent of isotope.

jaclark5 avatar Nov 03 '25 18:11 jaclark5

Codecov Report

:x: Patch coverage is 28.57143% with 15 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 45.67%. Comparing base (b3905b4) to head (28fbc8e). :warning: Report is 1 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (b3905b4) and HEAD (28fbc8e). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (b3905b4) HEAD (28fbc8e)
5 2
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 05 '25 19:11 codecov[bot]