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

Density Fitting Incompatible with Frequencies #1093

Closed
JonathonMisiewicz opened this Issue Jul 14, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@JonathonMisiewicz
Contributor

JonathonMisiewicz commented Jul 14, 2018

Any computation that attempts to compute frequencies of a density fitted method will crash unless the symmetry is explicitly set to c1. Gradients do not have this problem. The below input file demonstrates the problem and has been taken from the test cases. The only modifications are changing gradients to frequencies and CCSD(T) to MP2. The bug is there with both methods, and also CCSD. I haven't checked other DF methods.

#! DF-MP2 cc-pVDZ energy for the H2O molecule.


molecule h2o {
0 1
o
h 1 0.958
h 1 0.958 2 104.4776 
}

set {
  basis cc-pvdz
  df_basis_scf cc-pvdz-jkfit
  df_basis_cc cc-pvdz-ri
  scf_type df
  guess sad 
  freeze_core true
  cc_type df
  qc_module occ 
}

frequencies('mp2', dertype=0)

The crash gives the following error message:

Traceback (most recent call last):
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/bin/psi4", line 264, in <module>
    exec(content)
  File "<string>", line 36, in <module>
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/driver.py", line 1774, in frequency
    H, wfn = hessian(lowername, return_wfn=True, molecule=molecule, **kwargs)
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/driver.py", line 1595, in hessian
    E, wfn = energy(lowername, return_wfn=True, molecule=moleculeclone, **kwargs)
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/driver.py", line 492, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/procrouting/proc.py", line 858, in select_ccsd_t_
    return func(name, **kwargs)
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/procrouting/proc.py", line 1608, in run_dfocc
    "RIFIT", core.get_global_option("BASIS"))
  File "/Users/jonathonmisiewicz/psi4/objdir2/stage/usr/local/psi4/lib/psi4/driver/p4util/python_helpers.py", line 99, in pybuild_basis
    psibasis = core.BasisSet.construct_from_pydict(mol, basisdict, puream)

RuntimeError: 
Fatal Error: CoordEntry::basisset: Basisset not set for O and type of DF_BASIS_CC
Error occurred in file: /Users/jonathonmisiewicz/psi4/psi4/src/psi4/libmints/coordentry.cc on line: 134

My own investigations have partially uncovered the cause of this. During basis set construction, basis set labels are set on all atoms. This occurs by iterating over all atoms in full_atoms_ and setting basis set labels for them. However, there is a very subtle problem. The basis set is constructed from this labels here. The constructor sets the basis by calling atom_entry. The problem is that atom_entry is tied not to full_atoms_ but to atoms_. Setting the basis set labels for full_atoms_ atoms never set them for the atoms_ atoms, hence the error. I've confirmed directly this code sets the basis set label for the first atom of atoms_ in the non-bugged case of a gradient computation, but not in the case of a bugged frequency computation. In both cases, the first atom of full_atoms_ has its basis set labels properly submitted.

My hunch is that these two arrays are supposed to be synced up, modulo ghosts and dummies, so there was probably a problem with pointers somewhere that caused the objects in the two arrays to not be the same. Core devs, am I understanding atoms_ and full_atoms_ correctly?

JonathonMisiewicz added a commit to JonathonMisiewicz/psi4 that referenced this issue Jul 26, 2018

JonathonMisiewicz added a commit to JonathonMisiewicz/psi4 that referenced this issue Jul 26, 2018

JonathonMisiewicz added a commit to JonathonMisiewicz/psi4 that referenced this issue Jul 26, 2018

dgasmith added a commit that referenced this issue Aug 3, 2018

Merge pull request #1108 from JonathonMisiewicz/1093fix
Make Density Fitting Compatible with Frequencies (#1093 Fix)
@JonathonMisiewicz

This comment has been minimized.

Show comment
Hide comment
@JonathonMisiewicz

JonathonMisiewicz Aug 3, 2018

Contributor

Fixed by #1108.

Contributor

JonathonMisiewicz commented Aug 3, 2018

Fixed by #1108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment