Skip to content

SCF Vibrational Circular Dichroism (VCD) Simulations#95

Merged
dgasmith merged 16 commits into
psi4:masterfrom
kcpearce:scf-vcd
Nov 8, 2020
Merged

SCF Vibrational Circular Dichroism (VCD) Simulations#95
dgasmith merged 16 commits into
psi4:masterfrom
kcpearce:scf-vcd

Conversation

@kcpearce
Copy link
Copy Markdown
Contributor

@kcpearce kcpearce commented May 29, 2020

Description

Adds SCF VCD capabilities to Psi4NumPy

TODOs

Notable points (developer or user-interest) that this PR has or will accomplish.

  • Reproduce SCF Hessian results using generalized density formalism
  • Reproduce calculation of normal modes
  • Reproduce dipole strengths
  • Calcuate Atomic Polar Tensors (APTs) using dipole derivatives from Psi4
  • Calculate Atomic Axial Tensors (AATs) using half overlap derivatives from Psi4
  • Calculate rotatory strengths

Any questions for the community?

  • None atm

Status

  • Click when ready for review-and-merge

@JonathonMisiewicz
Copy link
Copy Markdown
Collaborator

Travis builds failing aren't necessarily a red flag. If the failures are caused by CEPA tests, it's because my tests require a newer version of Psi than what P4N is using. Lori tells me RHF_symmetry failures have been fixed in a local version of Psi, so that's also not your fault.

@dgasmith
Copy link
Copy Markdown
Member

@JonathonMisiewicz @loriab Can we mark the failing tests as xfail for now until Psi is updated?

@JonathonMisiewicz
Copy link
Copy Markdown
Collaborator

#96 now marks those as xfail.

@loriab
Copy link
Copy Markdown
Member

loriab commented May 30, 2020

after rebase, a clean test suite is within your control.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 9, 2020

Codecov Report

Merging #95 into master will not change coverage.
The diff coverage is n/a.

@dgasmith
Copy link
Copy Markdown
Member

This is looking fairly close to mergeable. Do you have a list of items that you wish to accomplish here?

@kcpearce
Copy link
Copy Markdown
Contributor Author

@dgasmith Working on matching the final rotatory strengths now. One more commit and it should be ready for review.

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Oct 6, 2020

Here's where I'm at. I'm able to compute the APT's and match them perfectly with DALTON's values. However, my AAT's only match to about 3 decimal places when compared to DALTON's. As a result, when you contract the APTs and AATs together to get the rotatory strengths, the error is propogated and I match their values with even less precision. This seems problematic to me. I've broken it down, and I can match the nuclear contribution to the AAT's exactly. So the problem most definitely lies in the electronic contribution to the AAT's. I've broken that down even further. There are three quantities that make up the electronic contribution to the AAT's:

  1. The orbital response coefficients with respect to a nuclear perturbation. I've checked these against Psi4 and I am very confident in these values.

  2. Half overlap derivative integrals. I've also been able to crank up DALTON's print level and compare these. While it appears that their ordering of the AOs (p_z, then p_x, p_y) in these matrices differ, the values match and I'm pretty confident in these terms as well.

  3. The orbital response coefficients with respect to a magnetic perturbation. I cannot figure out how to compare these values. As far as I can tell, there is no straightforward way to print these out in DALTON.

I know there are other codes that can compute VCD at the SCF level, viz. Gaussian. However, I can't figure out how to turn off GIAOs in Gaussian and therefore, until GIAOs are available in Psi4, this comparison is useless. As a further test, I've carried out the same VCD calculation with GIAOs turned on for both Gaussian and DALTON and their AATs don't match perfectly either. My natural inclination is that there must be a bug in my code somewhere, but seeing that their values don't match perfectly makes me wonder. At this point, I'm at a loss for what to do next to further nail down DALTON's AAT's and rotatory strengths. Any ideas?

For comparison, my final rotatory strengths are: [50.53768056395719 -53.527791951020774 28.606794550012008 -14.649888335885528 1.0984924678221817 101.37800368356949]
And DALTON's values are: [-50.519 53.521 -28.608 14.694 -1.098 -101.250]

NOTE: I realize that my rotatory strengths have the opposite sign of DALTON's. This is also worrisome. However, when I did my tests with Gaussian vs. DALTON, Gaussian also had the same sign discrepancy when compared to DALTON's rotatory strengths. In other words, my rotatory strengths have the same sign as Gaussian, but both Gaussian and my values have opposite sign when compared to DALTON. TDC has brought this up with some higher ups at DALTON because we're fairly certain it is a problem on their end. Since our APT's and AAT's match signs, it doesn't make sense that an arbitrary negative sign would should up in each rotatory strength when they're simply contracted together.

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Oct 6, 2020

On another note, I don't know if anyone is still working on #68, but I've calculated IR intensities on the way in this code, and I'd be willing to clean that portion of the code up and use it as a reference implementation for that as well.

@dgasmith
Copy link
Copy Markdown
Member

dgasmith commented Oct 6, 2020

This one is outside of my experience unfortunately. Pinging a few people to see if they have bandwidth to help out.

PS: IR intensities would be awesome!

Edit: Just to double check, everything is canonical integrals, Schwarz thresholds are off, integral thresholds are at max, basis set has been checked to be identical, SCF convergence is very high, etc?

@berquist @andysim @robertodr

@robertodr
Copy link
Copy Markdown

Great work Kirk! 👍

There could be an issue with the orbital connection for the response equations in DALTON. You should try forcing the use of the symmetric, rather than the natural connection:

**DALTON INPUT
.PROPERTIES
.RUN RESPONSE
**INTEGRALS
.PROPRI
.SQHDOL
.SQHDOR
**WAVEFUNCTION
.HF
*SCF INPUT
.THRESH
1.0D-10
**PROPERTIES
.VCD
.NOLOND 
.NODIFC  # <--- force use of symmetric connection
*AAT
.INTPRI
5
.PRINT
5
*LINRES
.PRINT
5
*VIBANA
.HESPUN
.PRINT
10
**END OF DALTON INPUT

To make a reasonable comparison with Gaussian, try to look at convergence with the size of the basis set, as you push it to something stupidly large: the calculations with and without London orbitals should converge to the same results then.

I am not sure I understand the sign issue, I'll think more on it and also review the actual code within tomorrow.

Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
@dgasmith
Copy link
Copy Markdown
Member

dgasmith commented Oct 7, 2020

Thanks @robertodr!

@kcpearce
Copy link
Copy Markdown
Contributor Author

PS: IR intensities would be awesome!

@dgasmith Okay, great. How should I go about that? How do I push changes from my branch to a previously created PR?

Edit: Just to double check, everything is canonical integrals, Schwarz thresholds are off, integral thresholds are at max, basis set has been checked to be identical, SCF convergence is very high, etc?

Nuclear repulsion energies match identically to 15 decimal places, SCF energy matches to 8 decimal places.

@kcpearce
Copy link
Copy Markdown
Contributor Author

To make a reasonable comparison with Gaussian, try to look at convergence with the size of the basis set, as you push it to something stupidly large: the calculations with and without London orbitals should converge to the same results then.

@robertodr Unforunately, I won't be able to crank up the basis set on my Python code very high since it's not very optimized and keeps everything in memory

@dgasmith
Copy link
Copy Markdown
Member

@kcpearce For IR intensities you would need to make a PR to the fork's branch. A bit complex, I would just pull that PR's branch to your fork and make a new PR.

git remote add prbranch https://github.com/dsirianni/psi4numpy.git
git fetch prbranch IRintensities:newbranch
git checkout newbranch
git push origin newbranch

@berquist
Copy link
Copy Markdown
Contributor

Roberto has probably gotten everything technical already, but I'd still like to run this, and neither Psi4 1.3.2 nor 1.4a2.dev191 are running, getting

AttributeError: 'psi4.core.MintsHelper' object has no attribute 'ao_elec_dip_deriv1'

so my two high-level comments so far are:

  • I think this should be moved to Response-Theory/SCF
  • The corresponding function call needs to be added to tests/test_RI_response.py, otherwise it won't run under CI.

@hokru
Copy link
Copy Markdown
Member

hokru commented Oct 15, 2020

1.4a2.dev191 is very old. If you dont get an update offered from conda, try requesting the latest version explicitly.
e.g. conda install psi4=1.4a2.dev1058 -c psi4/label/dev (for linux). I had to do this recently to force an update.

@kcpearce
Copy link
Copy Markdown
Contributor Author

Here's an update on my testing of my code. I mentioned previously that the electronic component of my AAT was not matching DALTON's result exactly. So I decided to compare my results to an old paper by Roger Amos (https://www.sciencedirect.com/science/article/abs/pii/0009261487800465) in which he reports SCF APT's and AAT's using a 4-31G basis set for ehtylene oxide without the use of GIAO's. It was somewhat difficult to recreate the exact geometry that Amos used, but I feel like I've gotten rather close. Below are the results for my code, DALTON's code, and Amos's reported values for the AAT in units of T^-1 Angstrom^-1. Considering the fact that the geometry is most certainly slightly different than the one Amos uses, and I have no information as to what convergence criteria he was using, I feel rather good that I match Amos's values within +/-0.003 (with the exception of one single value corresponding to H1_y B_x - I'm very confused by this one). Unfortunately, I was hoping this would help me figure out why my code and DALTON's were differing slightly, but I still have no insight into why this might be the case.

`MY CODE ELEC AAT (T^-1 A^-1):

                     Bx               By             Bz

    O    x      0.              -10.470653383       0.0000866304
    O    y     10.0231159137     -0.               -0.          
    O    z     -0.0000050096     -0.                0.          

    C    x      0.                5.4542100963     -8.6067839267
    C    y     -4.0236065239      0.               -0.          
    C    z      5.3076934283      0.               -0.          

    C    x     -0.                5.4543313367      8.6067888415
    C    y     -4.0237003588      0.                0.          
    C    z     -5.3076360417     -0.               -0.          

    H    x     -0.1118989481      2.0657086254     -3.9165854289
    H    y     -0.7351920567      0.2321856583      0.9489393874
    H    z      1.6259878483     -1.7646208301     -0.2441560368

    H    x      0.1118989481      2.0657086254     -3.9165854289
    H    y     -0.7351920567     -0.2321856583     -0.9489393874
    H    z      1.6259878483      1.7646208301      0.2441560368

    H    x     -0.1119041248      2.0657789445      3.9165340506
    H    y     -0.7352029914      0.2321937309     -0.9489254625
    H    z     -1.6259647638      1.7646113252     -0.2441920709

    H    x      0.1119041248      2.0657789445      3.9165340506
    H    y     -0.7352029914     -0.2321937309      0.9489254625
    H    z     -1.6259647638     -1.7646113252      0.2441920709

DALTONS ELEC AAT (T^-1 A^-1):

                     Bx                By                Bz

    O    x      0.              -10.470910297539    0.000065040514
    O    y     10.022604448634    0.                0.            
    O    z      0.000247137872    0.                0.            

    C    x      0.                5.455856747041   -8.606890584348
    C    y     -4.02326547247     0.                0.            
    C    z      5.307266829956    0.                0.            

    C    x      0.                5.455976698149    8.606693211714
    C    y     -4.023369263945    0.                0.            
    C    z     -5.307890865142    0.                0.            

    H    x     -0.111826269299    2.066432946498   -3.916756446042
    H    y     -0.735114816424    0.232252196903    0.948759637937
    H    z      1.626032534842   -1.763757309531   -0.244166187926

    H    x      0.111826269299    2.066432946498   -3.916756446042
    H    y     -0.735114816424   -0.232252196903   -0.948759637937
    H    z      1.626032534842    1.763757309531    0.244166187926

    H    x     -0.111920895609    2.066503614745    3.916670984897
    H    y     -0.735206307282    0.232273662684   -0.948747417717
    H    z     -1.626005039346    1.763721050851   -0.244179774881

    H    x      0.111920895609    2.066503614745    3.916670984897
    H    y     -0.735206307282   -0.232273662684    0.948747417717
    H    z     -1.626005039346   -1.763721050851    0.244179774881

AMOS ELEC AAT (T^-1 A^-1):

                 Bx             By             Bz

    O    x      0.              -10.468             0.
    O    y     10.020             0.                0.            
    O    z      0.                0.                0.            

    C    x      0.                5.456            -8.606
    C    y     -4.026             0.                0.            
    C    z      5.307             0.                0.            

    C    x      0.                5.456             8.606
    C    y     -4.026             0.                0.            
    C    z     -5.307             0.                0.            

    H    x     -0.112             2.067            -3.916
    H    y     -0.763             0.232             0.949
    H    z      1.626            -1.764            -0.244

    H    x      0.112             2.067            -3.916
    H    y     -0.763            -0.232            -0.949
    H    z      1.626             1.764             0.244

    H    x     -0.112             2.067             3.916
    H    y     -0.763             0.232            -0.949
    H    z     -1.626             1.764            -0.244

    H    x      0.112             2.067             3.916
    H    y     -0.763            -0.232             0.949
    H    z     -1.626            -1.764             0.244

`

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Oct 27, 2020

Regarding the single H1_y B_x value that I was comparing to Amos's paper and getting a larger than expected error: I think this could be a simple fudging of numbers in his paper. My value for that element is -0.7351920567, DALTON's value is -0.735114816424, and the value in the Amos paper is -0.763. However, after taking a closer look, I think he meant to report this value as -0.736. The reason I say this is that he also reports finite difference values that he compares against, and the corresponding finite difference value is -0.735.

That being said, if we assume that he did in fact have a typo for that single value, then I'm very happy with my comparisons to all of the values in Amos's paper. I know that my AATs differ slightly from DALTONs, and I'm going to continue to look into the source of this difference. However, I'm not sure if we should move forward and merge this reference implementation for the time being or wait until there is a better explanation for the difference. Thoughts?

@loriab
Copy link
Copy Markdown
Member

loriab commented Oct 27, 2020

It looks like excellent detective work and a very plausible match to me.

@dgasmith
Copy link
Copy Markdown
Member

I generally agree, would like @robertodr and @berquist to comment before merging however.

@kcpearce
Copy link
Copy Markdown
Contributor Author

Unfortunately, due to everything described above, it's going to be tough to implement a test for this code. @dgasmith What do you recommend in the way of that?

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 6, 2020

UPDATE: I've been able to track down the sources of error between my code's results and DALTON's results.

1.) The basis sets differ slightly. DALTON is slightly less precise with their basis set coefficients than Psi4/BSE. In order to get a direct comparison, I added STO-3G_dalton.gbs and 4-31G_dalton.gbs files to Psi4's basis directory. I chose to get equivalents for STO-3G because my code is not production level and needs smaller basis sets to run in a reasonable amount of time. I also added the 4-31G equivalent so that I could compare against the Amos paper that I referenced recently where they use a 4-31G basis on ethylene oxide. After making this change, I am able to match DALTON's nuclear repulsion energies to 15 decimal places and their SCF energy to 12 decimal places.

2.) The convergence thresholds for the CPHF solvers in DALTON had default values of 1E-3 and 1E-4 for the nuclear perturbation response equations and magnetic field response equations, respectively. I cranked up both of these thresholds to 1E-8 which helped considerably.

After making these two changes, I was able to nail down DALTON's AAT values. For example, DALTON's AATs for H2O2 with a STO-3G basis set are the following:


        O    x    -0.16438927    -0.10446393    -2.00901728
        O    y     0.09439940     0.00574249     0.11809387
        O    z     2.19819309    -0.11635324     0.15601962

        O    x    -0.16438927    -0.10446393     2.00901728
        O    y     0.09439940     0.00574249    -0.11809387
        O    z    -2.19819309     0.11635324     0.15601962

        H    x    -0.11803349     0.11314253    -0.10726430
        H    y    -0.19342146     0.00350944     0.36522207
        H    z     0.25524026    -0.20123957     0.12058354

        H    x    -0.11803349     0.11314253     0.10726430
        H    y    -0.19342146     0.00350944    -0.36522207
        H    z    -0.25524026     0.20123957     0.12058354

and my code's AATs for the same molecule and basis set are as follows:

 [ 0.0943994015  0.0057424916  0.1180938728]
 [ 2.198193085  -0.1163532438  0.1560196191]
 [-0.1643892688 -0.1044639255  2.0090172769]
 [ 0.0943994015  0.0057424916 -0.1180938728]
 [-2.198193085   0.1163532438  0.1560196191]
 [-0.1180334872  0.1131425301 -0.1072642994]
 [-0.1934214585  0.0035094392  0.3652220712]
 [ 0.2552402649 -0.2012395695  0.1205835383]
 [-0.1180334872  0.1131425301  0.1072642994]
 [-0.1934214585  0.0035094392 -0.3652220712]
 [-0.2552402649  0.2012395695  0.1205835383]]

DALTON's corresponding rotatory strengths for the aforementioned example are:
-50.538 53.528 -28.607 14.650 -1.098 -101.378 10**(-44) (esu**2)*(cm**2)

and my rotatory strengths are:
[50.53769309321309 -53.52780323315591 28.606794451052014 -14.649888665972256 1.0984919436729568 101.37790987586261]

I know that my rotatory strengths and DALTONs still differ in their sign, but @robertodr has informed me that it is a known issue that DALTONs VCD rotatory strengths differ when compared to Gaussian. As such, I am comfortable moving forward knowing that the sign of my values differ from theirs.

As an additional comparison, I also compared the APTs and AATs between my code and DALTON's using the ethylene oxide example discussed above.
DALTON's APTs in a.u. are

                       Ex             Ey             Ez

        O    x    -0.50831412     0.00000000     0.00000000
        O    y     0.00000000    -0.31294438    -0.00000444
        O    z     0.00000000    -0.00000560    -0.87700961

        C    x     0.40530283    -0.00000000    -0.00000000
        C    y    -0.00000000     0.17846440    -0.04329844
        C    z    -0.00000000     0.05374228     0.28884844

        C    x     0.40528529     0.00000000    -0.00000000
        C    y    -0.00000000     0.17842952     0.04329980
        C    z    -0.00000000    -0.05374594     0.28883832

        H    x    -0.07557129    -0.06935066    -0.02149069
        H    y    -0.03839762    -0.01099208    -0.04783422
        H    z    -0.00976671    -0.05962005     0.07483171

        H    x    -0.07557129     0.06935066     0.02149069
        H    y     0.03839762    -0.01099208    -0.04783422
        H    z     0.00976671    -0.05962005     0.07483171

        H    x    -0.07556570    -0.06934640     0.02148828
        H    y    -0.03839489    -0.01098269     0.04783576
        H    z     0.00976684     0.05962468     0.07482971

        H    x    -0.07556570     0.06934640    -0.02148828
        H    y     0.03839489    -0.01098269     0.04783576
        H    z    -0.00976684     0.05962468     0.07482971

and my APTs in a.u. are

 [[-0.5083141243  0.           -0.          ]
 [-0.           -0.3129443819 -0.0000044448]
 [ 0.           -0.0000056021 -0.8770096111]
 [ 0.4053028276  0.            0.          ]
 [ 0.            0.178464403  -0.0432984385]
 [ 0.            0.0537422834  0.2888484433]
 [ 0.405285288  -0.            0.          ]
 [ 0.            0.1784295182  0.0432998032]
 [-0.           -0.0537459391  0.2888383233]
 [-0.0755712948 -0.0693506642 -0.0214906909]
 [-0.0383976196 -0.0109920751 -0.0478342161]
 [-0.0097667116 -0.0596200494  0.0748317092]
 [-0.0755712948  0.0693506642  0.0214906909]
 [ 0.0383976196 -0.0109920751 -0.0478342161]
 [ 0.0097667116 -0.0596200494  0.0748317092]
 [-0.0755657009 -0.0693463962  0.0214882805]
 [-0.0383948917 -0.0109826945  0.0478357562]
 [ 0.0097668365  0.0596246783  0.074829713 ]
 [-0.0755657009  0.0693463962 -0.0214882805]
 [ 0.0383948917 -0.0109826945  0.0478357562]
 [-0.0097668365  0.0596246783  0.074829713 ]]

Lastly, DALTON's AATs in a.u. for this example are

                       Bx             By             Bz

        O    x    -0.00000000     1.92149059     0.00001078
        O    y    -1.97715714     0.00000000    -0.00000000
        O    z    -0.00000062     0.00000000     0.00000000

        C    x    -0.00000000    -0.38090477     1.00153712
        C    y     0.55884902    -0.00000000    -0.00000000
        C    z    -1.41189137     0.00000000    -0.00000000

        C    x    -0.00000000    -0.38094535    -1.00153880
        C    y     0.55889301    -0.00000000     0.00000000
        C    z     1.41190080     0.00000000    -0.00000000

        H    x    -0.01391844    -0.01854727     0.10770736
        H    y     0.18404232     0.02888016    -0.31921122
        H    z    -0.39262117     0.21775347    -0.03036909

        H    x     0.01391844    -0.01854727     0.10770736
        H    y     0.18404232    -0.02888016     0.31921122
        H    z    -0.39262117    -0.21775347     0.03036909

        H    x    -0.01391909    -0.01855450    -0.10771148
        H    y     0.18405694     0.02888117     0.31921295
        H    z     0.39262176    -0.21775465    -0.03037357

        H    x     0.01391909    -0.01855450    -0.10771148
        H    y     0.18405694    -0.02888117    -0.31921295
        H    z     0.39262176     0.21775465     0.03037357

and my AATs in a.u. are

 [[ 0.            1.9214905873  0.0000107754]
 [-1.9771571414 -0.            0.          ]
 [-0.0000006237  0.            0.          ]
 [-0.           -0.3809047722  1.0015371165]
 [ 0.5588490224  0.            0.          ]
 [-1.4118913657  0.           -0.          ]
 [-0.           -0.3809453547 -1.0015388009]
 [ 0.5588930142  0.           -0.          ]
 [ 1.411900799  -0.            0.          ]
 [-0.0139184436 -0.0185472665  0.1077073644]
 [ 0.1840423183  0.0288801635 -0.3192112216]
 [-0.3926211675  0.2177534711 -0.0303690928]
 [ 0.0139184436 -0.0185472665  0.1077073644]
 [ 0.1840423183 -0.0288801635  0.3192112216]
 [-0.3926211675 -0.2177534711  0.0303690928]
 [-0.0139190874 -0.0185544998 -0.1077114789]
 [ 0.1840569383  0.0288811677  0.3192129535]
 [ 0.3926217635 -0.2177546529 -0.0303735751]
 [ 0.0139190874 -0.0185544998 -0.1077114789]
 [ 0.1840569383 -0.0288811677 -0.3192129535]
 [ 0.3926217635  0.2177546529  0.0303735751]]

Since ethylene oxide is non-chiral, the rotatory strengths are trivially zero and aren't worth comparing.

Considering all of this, I am very happy with my comparisons. I'm planning on cleaning up my code and making one last commit. Once that's in, I should finally be ready for a review + merge.

@robertodr
Copy link
Copy Markdown

@kcpearce really great detective work here!

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 7, 2020

Finally ready for review + merge!

(Let me know if you'd like me to add a test for this reference implementation)

Copy link
Copy Markdown
Member

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

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

LGTM, please do add tests.

Lets wait on a review from @robertodr before merging.

Copy link
Copy Markdown

@robertodr robertodr left a comment

Choose a reason for hiding this comment

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

  • The reference output from DALTON needs to be updated (for the cranked-up convergence thresholds)
    - Is the cooked-up basis part of Psi4? I suggest you download the proper STO-3G from the basis set exchange in DALTON format and re-run DALTON with the proper basis. Section 28.4 of the manual explains how to use custom bases (or I can help you run the calculation)
  • As for the test, I think you can copy the tensors of interest from the DALTON output (frequencies, IR intensities, AATs, APTs, VCD strengths), paste them in your Python source, and compare with your results.

Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
Comment thread Self-Consistent-Field/vcd.py Outdated
@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 7, 2020

I'm failing TravisCI with this error:

  File "/home/travis/build/psi4/psi4numpy/Response-Theory/Self-Consistent-Field/vcd.py", line 654, in <module>
    deriv1_mat["MU_" + str(atom)] = mints.ao_elec_dip_deriv1(atom)
AttributeError: 'psi4.core.MintsHelper' object has no attribute 'ao_elec_dip_deriv1'

It appears as though the Psi4 version in Travis is not recent enough to have my changes for exporting the electric dipole derivatives.

Copy link
Copy Markdown

@robertodr robertodr left a comment

Choose a reason for hiding this comment

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

LGTM! I don't know how to solve the CI failures though 😞

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 8, 2020

@dgasmith Any idea about how to update the version of Psi4 for the CI?

@dgasmith
Copy link
Copy Markdown
Member

dgasmith commented Nov 8, 2020

You can add a new decorator here to pin the version of Psi4 that you need. This pin can then be used as in this example.

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 8, 2020

@dgasmith It looks like the last two commits aren't triggering CI. Any idea why?

@dgasmith
Copy link
Copy Markdown
Member

dgasmith commented Nov 8, 2020

We probably ran out of CI bucks. Everything that is still on Travis CI OSS should be moved to GHA or similar since their policies changed.

@kcpearce
Copy link
Copy Markdown
Contributor Author

kcpearce commented Nov 8, 2020

Finally passing! Everything is good to go on my end.

@dgasmith
Copy link
Copy Markdown
Member

dgasmith commented Nov 8, 2020

Cool, thanks again for such an awesome addition!

@dgasmith dgasmith merged commit 3847966 into psi4:master Nov 8, 2020
@kcpearce kcpearce deleted the scf-vcd branch November 8, 2020 23:23
@gkxiao
Copy link
Copy Markdown

gkxiao commented Nov 22, 2022

Hi All,

It is not a good idea to compare with Dalton, because Dalton gives wrong result.

Let me show you an example where Dalton gives the wrong sign of the Cotton effect.

Input mol file (prop.mol):

BASIS
6-311G
prop
Generated by Open Babel. Check overall charge below.
AtomTypes=5 Charge=0 NoSymmetry Angstrom
Charge=6.0 Atoms=2
C            -1.8848000000    2.3694000000   -0.7438000000
C            -1.7787000000    2.1817000000    0.7076000000
Charge=8.0 Atoms=1
O            -1.1103000000    1.2941000000   -0.1970000000
Charge=1.0 Atoms=1
H            -2.8053000000    2.0387000000   -1.2239000000
Charge=6.0 Atoms=1
C            -1.1206000000    3.4432000000   -1.4696000000
Charge=1.0 Atoms=5
H            -2.6064000000    1.7464000000    1.2624000000
H            -1.1269000000    2.8385000000    1.2798000000
H            -0.2208000000    3.7137000000   -0.9130000000
H            -0.8168000000    3.0954000000   -2.4607000000
H            -1.7367000000    4.3383000000   -1.5973000000

Input dal file (vcd.dal):

**DALTON INPUT
.RUN PROPERTIES
**WAVE FUNCTIONS
.HF
**PROPERTIES
.VIBANA
.NOCMC
.VCD
**END OF DALTON INPUT

VCD calculation:

dalton -mol prop.mol -dal vcd.dal -np 12

And here is the result:

  mode       frequency      dip. str.      rot. str.
  --------------------------------------------------
   1          3211.43         50.237          5.001
   2          3151.22         63.941         -9.816
   3          3131.96         12.242          5.948
   4          3123.44         49.374          9.053
   5          3120.03         22.720         -7.254
   6          3067.38         36.849         -1.679
   7          1694.15          7.012         -3.460
   8          1655.13         17.999          3.665
   9          1642.79         14.303         -2.897
  10          1600.44         34.560         -9.039
  11          1572.19         14.950         -8.679
  12          1407.83         17.521          2.784
  13          1332.80          5.762          6.925
  14          1321.35          2.768          1.915
  15          1293.42         19.217         12.609
  16          1251.26         31.259          9.218
  17          1174.12         19.545         -4.381
  18          1080.39         47.470         37.988
  19          1035.22         14.964        -27.033
  20           910.46        250.409        -18.446
  21           859.45         44.023         -5.530
  22           465.33         30.281         -2.281
  23           414.54        102.604         24.688
  24           311.20         11.119         -5.066

Compared to the result calculated with other QM software at the same theory level, the sign of the rotational strength is wrong!

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.

10 participants