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

Deprecate Built-In ADC #2419

Merged
merged 2 commits into from
Feb 7, 2022

Conversation

JonathonMisiewicz
Copy link
Contributor

@JonathonMisiewicz JonathonMisiewicz commented Feb 3, 2022

Description

This PR deprecates Psi's built-in ADC module, per discussion on the January developer conference call, issue #1033, and my own investigation.

Checklist

  • Tested ADC still runs, but with well-deserved warnings

Status

  • Ready for review
  • Ready for merge

@JonathonMisiewicz JonathonMisiewicz added Alert! adc For issues with the ADC module in Psi4 (not ADCC). labels Feb 3, 2022
@JonathonMisiewicz JonathonMisiewicz added this to the Psi4 1.6 milestone Feb 3, 2022
Copy link
Contributor

@mfherbst mfherbst left a comment

Choose a reason for hiding this comment

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

Cool! Just as a remark: I suggest to default to adcc in procrouting as well for ADC(2) in case it is available. Right now the default is still the builtin.

@JonathonMisiewicz
Copy link
Contributor Author

Cool! Just as a remark: I suggest to default to adcc in procrouting as well for ADC(2) in case it is available. Right now the default is still the builtin.

I'm in favor, but this sounds like the sort of thing other developers may object to, so I'll defer to popular opinion before deciding to adopt or not.

@hokru
Copy link
Member

hokru commented Feb 3, 2022

Could we catch the case where users request multiple roots and stop the program? Fewer and fewer people look at the actual output files.

I would also support the more extreme solution of just fully disabling the internal adc. Better some potential inconvenience than wrong results.

@JonathonMisiewicz
Copy link
Contributor Author

Could we catch the case where users request multiple roots and stop the program? Fewer and fewer people look at the actual output files.

I would also support the more extreme solution of just fully disabling the internal adc. Better some potential inconvenience than wrong results.

  1. This is possible in principle, but I don't know exactly what conditions trigger the bug, so there may be some single-root cases that also trigger it.
  2. Removing the buggy internal ADC was my original proposal on the January conference call, but @fevangelista disapproved without a deprecation period first. I was hoping to avoid an argument about "remove vs deprecate" as not a good use of my time, but if we're going to have the argument anyways, I'm on the remove side.

@maxscheurer
Copy link
Contributor

Well since the argument came up again: I'm all for removal, because with adcc, we can guarantee a) correct results (several test cases!) b) all sorts of properties and c) up-to-date documentation.

The step to go from requesting a psi-internal ADC calc to having the same job running with adcc is a simple conda install.

IMHO there should not be a "deprecation phase" for a feature which is obviously broken and a full replacement is already there.

@PeterKraus
Copy link
Contributor

PeterKraus commented Feb 5, 2022

I suppose if people want to get the "broken" version of ADC, they can install Psi4 between (at least) 1.3.2 and 1.5, right? I don't think we need to deprecate features that don't work, and if adcc is a "drop-in" replacement for ADC, I'd too vote for removal. Maybe in 1.6, and perhaps 1.7, calls to ADC should be shimmed to adcc with a deprecation warning, and afterwards the ADC interface removed (if it's different than adcc).

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 can see 3 levels of adc deprecation:

  1. warn on build-in adc invocation and leave adc as default
  2. warn on built-in adc invocation and switch adcc to default (managed_adcc, as @mfherbst suggests)
  3. rm -rf adc/

Right now this PR does (1). I don't remember if @fevangelista was against (2) or only against (3). I'm against (3) until at least after 1.6 release. On the whole, I favor (2) now, but this PR of (1) now is an excellent first step.

psi4/driver/procrouting/proc.py Show resolved Hide resolved
@maxscheurer
Copy link
Contributor

Ok, (2) is a solution I can live with 😄 Then at least the ADC calculations from 1.6+ won't be wrong by default 😉:+1:

@JonathonMisiewicz
Copy link
Contributor Author

(2) was never discussed on the conference call, so I'll take that option for this PR. The driver-side changes are straightforward, test changes should be as well.

@JonathonMisiewicz
Copy link
Contributor Author

Default switched to adcc, if available. Old test cases for built-in code still use the built-in code. Fixed a bug where it was impossible to select the built-in code. Docs updated accordingly.

@loriab @maxscheurer @mfherbst

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 would have done "if module in {ADCC, ''}: run_adcc; elif module in {BUiltin}: run_adc" to avoid the complication of mixed defaults. But as-proposed satisfies the continuity camp by keeping running. And it satisfies the correctness camp by using adcc and peppering the user with adc warnings. So, lgtm!

@JonathonMisiewicz
Copy link
Contributor Author

Great, will merge on test pass.

@JonathonMisiewicz JonathonMisiewicz merged commit dbf9064 into psi4:master Feb 7, 2022
@JonathonMisiewicz JonathonMisiewicz deleted the adc_deprecate branch February 7, 2022 20:38
zachglick pushed a commit to zachglick/psi4 that referenced this pull request Apr 18, 2022
* Slate ADC for the end

* Advance a deprecation stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adc For issues with the ADC module in Psi4 (not ADCC). Alert!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants