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

Nexus: Generate PySCF inputs without template #3550

Merged
merged 16 commits into from
Oct 22, 2021

Conversation

mcbennet
Copy link
Contributor

@mcbennet mcbennet commented Oct 21, 2021

Proposed changes

This PR extends pyscf_input.py to allow template-less workflows. The user can now specify a calculation object with variables that contain information about the run, e.g.

scf = generate_pyscf(
    identifier = 'scf',                           # log output goes to scf.out
    path       = 'h2o_ae_hf',               # directory to run in
    job        = job(serial=True),          # pyscf must run serially         
    system     = system,
    mole       = obj(                             # used to make Mole() inputs
        basis    = 'ccpvtz',
        symmetry = True,
        verbose       = 5,
        ),
    calculation = obj(                          # used to specify run parameters
        method      = 'RHF',
        df_fitting  = True,
        max_cycle  = 200,
        level_shift  = 0.0,
        xc         = 'pbe',
        tol        = '1e-10',
        chkfile    = 'H2O.chk'
        ),
    save_qmc   = True ,
    )

What type(s) of changes does this code introduce?

  • New feature

Does this introduce a breaking change?

  • No. All nxs-test tests pass.

What systems has this change been tested on?

Laptop

Checklist

  • This PR is up to date with current the current state of 'develop'
  • N/A. Code added or changed in the PR has been clang-formatted
  • This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • Documentation has been added (if appropriate)

@qmc-robot
Copy link

Can one of the admins verify this patch?

Copy link
Contributor

@jtkrogel jtkrogel left a comment

Choose a reason for hiding this comment

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

Please add a unit test for input generation in tests/unit/test_pyscf_input.py, function test_generate. You should be able to just copy and then generalize an existing test, now including the calculation input and any others added.

nexus/lib/pyscf_input.py Show resolved Hide resolved
nexus/lib/pyscf_input.py Outdated Show resolved Hide resolved
nexus/lib/pyscf_input.py Outdated Show resolved Hide resolved
nexus/lib/pyscf_input.py Outdated Show resolved Hide resolved
nexus/lib/pyscf_input.py Outdated Show resolved Hide resolved
nexus/lib/pyscf_input.py Outdated Show resolved Hide resolved
@mcbennet
Copy link
Contributor Author

Thank you, Jaron. Unit tests have been added and I have addressed all your comments above.

jtkrogel
jtkrogel previously approved these changes Oct 22, 2021
Copy link
Contributor

@jtkrogel jtkrogel left a comment

Choose a reason for hiding this comment

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

LGTM

@ye-luo
Copy link
Contributor

ye-luo commented Oct 22, 2021

Test this please

@ye-luo ye-luo enabled auto-merge October 22, 2021 16:04
@ye-luo ye-luo merged commit 6d4ad8e into QMCPACK:develop Oct 22, 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