Add CuCl in triples.org

This commit is contained in:
Anthony Scemama 2024-03-27 15:30:00 +01:00
parent 1214e4c408
commit 004a77fa0f
2 changed files with 482 additions and 7 deletions

View File

@ -85,12 +85,24 @@
\affiliation{\LCPQ}
\begin{abstract}
We introduce a novel algorithm that leverages stochastic sampling techniques to approximate perturbative triples in the coupled-cluster (CC) framework.
By combining elements of randomness and determinism, our algorithm achieves a favorable balance between accuracy and computational cost.
The main advantage of this algorithm is that it allows for calculations to be stopped at any time, providing an unbiased estimate, with a statistical error that goes to zero as the exact calculation is approached.
We provide evidence that our semi-stochastic algorithm achieves substantial computational savings compared to traditional deterministic methods.
Specifically, we demonstrate that a precision of 0.5 milliHartree can be attained with only 10\% of the computational effort required by the full calculation.
This work opens up new avenues for efficient and accurate computations, enabling investigations of complex molecular systems that were previously computationally prohibitive.
We introduce a novel algorithm that leverages stochastic sampling
techniques to approximate perturbative triples correction in the
coupled-cluster (CC) framework.
By combining elements of randomness and determinism, our algorithm
achieves a favorable balance between accuracy and computational cost.
The main advantage of this algorithm is that it allows for
calculations to be stopped at any time, providing an unbiased
estimate, with a statistical error that goes to zero as the exact
calculation is approached.
We provide evidence that our semi-stochastic algorithm achieves
substantial computational savings compared to traditional
deterministic methods.
Specifically, we demonstrate that a precision of 0.5 milliHartree can
be attained with only 10\% of the computational effort required by the
full calculation.
This work opens up new avenues for efficient and accurate
computations, enabling investigations of complex molecular systems
that were previously computationally prohibitive.
\bigskip
\begin{center}
% \boxed{\includegraphics[width=0.5\linewidth]{TOC}}
@ -191,13 +203,42 @@ accelerators.\cite{ma_2011,haidar_2015,dinapoli_2014,springer_2018}
% - Benzene TZ
% - Streptocyanine QZ: Small molecule in a large basis set
% - Caffeine def2-svp: Large molecule in a small basis set
% - Vibrational frequency of F2/cc-pvqz
%b. Discussion of the obtained results, comparing against other methods
% - Measure flops and compare to the peak
%c. Analysis of the algorithm's accuracy, efficiency, and scalability
%d. Discussion of any observed limitations or challenges
\subsection{Vibrational frequency of \ce{F2}}
In this example, we compute the vibrational frequency of \ce{F2} by
computing the potential energy curve, and fitting it with a Morse
potential
\begin{equation}
E(r) = D_e \left( 1 - e^{-a (r - r_e)} \right)^2 + E(r_e)
\end{equation}
where $E(r)$ is the energy at distance $r$, $D_e$ is the well depth,
$r_e$ is the equilibrium bond distance, and $a$ is a parameter
controlling the width of the potential well.
The vibrational frequency $\nu$ is calculated as
\begin{equation}
\nu = \frac{1}{2 \pi c} \sqrt{\frac{2D_e a^2}{\mu}
\end{equation}
where $\mu$ is the mass of the Fluorine atom, and $c$ is the speed of
light in cm/s.
% CCSD
%a = 2.2936 +/- 0.006318 (0.2755%)
%De = 0.125888 +/- 0.0005213 (0.4141%)
%re = 1.3893 +/- 0.0003428 (0.02468%)
%E0 = -199.338 +/- 6.422e-05 (3.222e-05%)
% CCSD(T) exact
%a = 2.65592 +/- 0.0403 (1.518%)
%De = 0.0718253 +/- 0.001879 (2.617%)
%re = 1.4105 +/- 0.00215 (0.1524%)
%E0 = -199.358 +/- 0.0003179 (0.0001595%)
%=================================================================%
\section{Conclusion}
\label{sec:conclusion}

View File

@ -7362,6 +7362,440 @@ plot data using :1:2 w errorlines notitle, -678.026179485578 notitle
#+RESULTS:
[[file:caffeine_svp.png]]
* Vibration F2
** Script to compute frequencies in cm-1
#+begin_src bash :output raw
tail -20 fit.log
#+end_src
#+NAME:freq_
#+begin_src python :var a=1.2526 :var De=0.7 :results output :output drawer
#!/usr/bin/env python
"""Converts vibrational frequencies from atomic units to cm-1 for diatomics."""
import sys
from math import sqrt, pi
# Atomic masses obtained using
# import periodictable as pt
# for el in pt.elements:
# mass[el.symbol] = sorted([ (el[x].abundance,el[x].mass) for x in el.isotopes ])[-1][1]
mass = {'H': 1.0078250321, 'He': 4.0026032497, 'Li': 7.016004, 'Be': 9.0121821, 'B': 11.0093055, 'C': 12.0, 'N': 14.0030740052, 'O': 15.9949146221, 'F': 18.9984032, 'Ne': 19.9924401759, 'Na': 22.98976967, 'Mg': 23.9850419, 'Al': 26.98153844, 'Si': 27.9769265327, 'P': 30.97376151, 'S': 31.97207069, 'Cl': 34.96885271, 'Ar': 39.962383123, 'K': 38.9637069, 'Ca': 39.9625912, 'Sc': 44.9559102, 'Ti': 47.9479471, 'V': 50.9439637, 'Cr': 51.9405119, 'Mn': 54.9380496, 'Fe': 55.9349421, 'Co': 58.9332002, 'Ni': 57.9353479, 'Cu': 62.9296011, 'Zn': 63.9291466, 'Ga': 68.925581, 'Ge': 73.9211782, 'As': 74.9215964, 'Se': 79.9165218, 'Br': 78.9183376, 'Kr': 83.911507, 'Rb': 84.9117893, 'Sr': 87.9056143, 'Y': 88.9058479, 'Zr': 89.9047037, 'Nb': 92.9063775, 'Mo': 97.9054078, 'Tc': 114.93828, 'Ru': 101.9043495, 'Rh': 102.905504, 'Pd': 105.903483, 'Ag': 106.905093, 'Cd': 113.9033581, 'In': 114.903878, 'Sn': 119.9021966, 'Sb': 120.903818, 'Te': 129.9062228, 'I': 126.904468, 'Xe': 131.9041545, 'Cs': 132.905447, 'Ba': 137.905241, 'La': 138.906348, 'Ce': 139.905434, 'Pr': 140.907648, 'Nd': 141.907719, 'Pm': 162.95352, 'Sm': 151.919728, 'Eu': 152.921226, 'Gd': 157.924101, 'Tb': 158.925343, 'Dy': 163.929171, 'Ho': 164.930319, 'Er': 165.93029, 'Tm': 168.934211, 'Yb': 173.9388581, 'Lu': 174.9407679, 'Hf': 179.9465488, 'Ta': 180.947996, 'W': 183.9509326, 'Re': 186.9557508, 'Os': 191.961479, 'Ir': 192.962924, 'Pt': 194.964774, 'Au': 196.966552, 'Hg': 201.970626, 'Tl': 204.974412, 'Pb': 207.976636, 'Bi': 208.980383, 'Po': 218.0089658, 'At': 223.02534, 'Rn': 228.03808, 'Fr': 232.04965, 'Ra': 234.05055, 'Ac': 236.05518, 'Th': 232.0380504, 'Pa': 231.0358789, 'U': 238.0507826, 'Np': 244.06785, 'Pu': 247.07407, 'Am': 249.07848, 'Cm': 252.08487, 'Bk': 254.0906, 'Cf': 256.09344, 'Es': 257.09598, 'Fm': 259.10059, 'Md': 260.10365, 'No': 262.10752, 'Lr': 263.11139, 'Rf': 264.11398, 'Db': 265.11866, 'Sg': 266.12193, 'Bh': 267.12774, 'Hs': 269.13411, 'Mt': 271.14123, 'Ds': 273.14925, 'Rg': 272.15348, 'Cn': 0, 'Nh': 0, 'Fl': 0, 'Mc': 0, 'Lv': 0, 'Ts': 0, 'Og': 0}
def convert(e1,e2,f):
# Conversion factors
hartree = 4.3597447222071e-18 # joules
bohr = 1./18897161646.321 # m
amu = 1.6605402e-27 # kg
c = 299792458.0 # m/s
mole = 6.02214076e23
# Reduced mass in kg
mu = mass[e1]*mass[e2] / (mass[e1]+mass[e2]) * amu
# Frequency in reduced coordinates
lam = (f * hartree / (bohr*bohr) ) / mu
# Convert to wave numbers
nu = sqrt(lam)/(2.*pi*c) * 0.01
return nu
#print("Frequency (in hartree/bohr^2) ? "),
a = float(a)
f = De*2.*a*a
print( convert('F','F',f) )
#+end_src
#+RESULTS: freq_
: 2471.921716627526
** CCSD
NIST Computational Chemistry Comparison and Benchmark Database,
NIST Standard Reference Database Number 101
Release 22, May 2022, Editor: Russell D. Johnson III
http://cccbdb.nist.gov/
Reference: 1016 cm^-1
#+name:f2_ccsd
| 1.20 | -199.300901502767 |
| 1.25 | -199.320245823796 |
| 1.30 | -199.331634513014 |
| 1.35 | -199.337115250478 |
| 1.40 | -199.338256839462 |
| 1.45 | -199.336266825958 |
| 1.50 | -199.332076468455 |
#+begin_src gnuplot :var data=f2_ccsd :results file :file f2_ccsd.png
reset
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.40546
re = 2.66544
De = 0.0718256
E0 = -199.358
set xrange [2:5]
fit E(x) data using ($1*a0):2 via a, re, De, E0
plot E(x), data using ($1*a0):2 w p
#+end_src
#+RESULTS:
[[file:f2_ccsd.png]]
#+begin_example
a = 1.18566 +/- 0.001801 (0.1519%)
re = 2.62779 +/- 4.734e-05 (0.001801%)
De = 0.131861 +/- 0.0004739 (0.3594%)
E0 = -199.338 +/- 3.212e-06 (1.612e-06%)
#+end_example
#+CALL:freq(1.18566,0.131861)
#+RESULTS:
: 1015.5273789489723
** CCSD(T) exact
Harmonic CCSD(T)/cc-pVQZ: 921 cm^-1
Experimental: 894 cm^-1
#+name:f2_ccsdt_ex
| 1.20 | -199.316930965941 |
| 1.25 | -199.337265800989 |
| 1.30 | -199.349733323061 |
| 1.35 | -199.356388989864 |
| 1.40 | -199.358812230238 |
| 1.45 | -199.358223196104 |
| 1.50 | -199.355566745188 |
#+begin_src gnuplot :var data=f2_ccsdt_ex :results file :file f2_ccsdt_ex.png
reset
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.40546
re = 2.66544
De = 0.0718256
E0 = -199.358
set xrange [2:4]
fit E(x) data using ($1*a0):2 via a, re, De, E0
plot E(x), data using ($1*a0):2 w p
#+end_src
#+RESULTS:
[[file:f2_ccsdt_ex.png]]
#+begin_example
a = 1.26212 +/- 0.003274 (0.2594%)
re = 2.67046 +/- 9.555e-05 (0.003578%)
De = 0.0956201 +/- 0.0006465 (0.6761%)
E0 = -199.359 +/- 5.345e-06 (2.681e-06%)
#+end_example
#+CALL:freq(1.26212,0.0956201)
#+RESULTS:
: 920.5524350188175
* Vibration CuCl
23 + 23 electrons = 46 electrons
6 frozen orbitals (12 electrons)
163 MOs total
34 electrons in 157 MOs
** Script to compute frequencies in cm-1
#+begin_src bash :output raw
tail -20 fit.log
#+end_src
#+RESULTS:
| final | sum | of | squares | of | residuals | : | 1.94178e-06 | |
| rel. | change | during | last | iteration | : | -3.41338e-13 | | |
| | | | | | | | | |
| degrees | of | freedom | (FIT_NDF) | : | 17 | | | |
| rms | of | residuals | (FIT_STDFIT) | = | sqrt(WSSR/ndf) | : | 0.000337968 | |
| variance | of | residuals | (reduced | chisquare) | = | WSSR/ndf | : | 1.14222e-07 |
| | | | | | | | | |
| Final | set | of | parameters | Asymptotic | Standard | Error | | |
| ======================= | ========================== | | | | | | | |
| a | = | 0.8637 | +/- | 0.005479 | (0.6344%) | | | |
| re | = | 3.948 | +/- | 0.001468 | (0.03719%) | | | |
| De | = | 0.0912735 | +/- | 0.001791 | (1.962%) | | | |
| E0 | = | -2099.73 | +/- | 0.0001235 | (5.883e-06%) | | | |
| | | | | | | | | |
| correlation | matrix | of | the | fit | parameters: | | | |
| a | re | De | E0 | | | | | |
| a | 1.0 | | | | | | | |
| re | -0.108 | 1.0 | | | | | | |
| De | -0.972 | -0.122 | 1.0 | | | | | |
| E0 | 0.677 | 0.055 | -0.711 | 1.0 | | | | |
#+NAME:freq
#+begin_src python :var a=1.2526 :var De=0.7 :results output :output drawer
#!/usr/bin/env python
"""Converts vibrational frequencies from atomic units to cm-1 for diatomics."""
import sys
from math import sqrt, pi
# Atomic masses obtained using
# import periodictable as pt
# for el in pt.elements:
# mass[el.symbol] = sorted([ (el[x].abundance,el[x].mass) for x in el.isotopes ])[-1][1]
mass = {'H': 1.0078250321, 'He': 4.0026032497, 'Li': 7.016004, 'Be': 9.0121821, 'B': 11.0093055, 'C': 12.0, 'N': 14.0030740052, 'O': 15.9949146221, 'F': 18.9984032, 'Ne': 19.9924401759, 'Na': 22.98976967, 'Mg': 23.9850419, 'Al': 26.98153844, 'Si': 27.9769265327, 'P': 30.97376151, 'S': 31.97207069, 'Cl': 34.96885271, 'Ar': 39.962383123, 'K': 38.9637069, 'Ca': 39.9625912, 'Sc': 44.9559102, 'Ti': 47.9479471, 'V': 50.9439637, 'Cr': 51.9405119, 'Mn': 54.9380496, 'Fe': 55.9349421, 'Co': 58.9332002, 'Ni': 57.9353479, 'Cu': 62.9296011, 'Zn': 63.9291466, 'Ga': 68.925581, 'Ge': 73.9211782, 'As': 74.9215964, 'Se': 79.9165218, 'Br': 78.9183376, 'Kr': 83.911507, 'Rb': 84.9117893, 'Sr': 87.9056143, 'Y': 88.9058479, 'Zr': 89.9047037, 'Nb': 92.9063775, 'Mo': 97.9054078, 'Tc': 114.93828, 'Ru': 101.9043495, 'Rh': 102.905504, 'Pd': 105.903483, 'Ag': 106.905093, 'Cd': 113.9033581, 'In': 114.903878, 'Sn': 119.9021966, 'Sb': 120.903818, 'Te': 129.9062228, 'I': 126.904468, 'Xe': 131.9041545, 'Cs': 132.905447, 'Ba': 137.905241, 'La': 138.906348, 'Ce': 139.905434, 'Pr': 140.907648, 'Nd': 141.907719, 'Pm': 162.95352, 'Sm': 151.919728, 'Eu': 152.921226, 'Gd': 157.924101, 'Tb': 158.925343, 'Dy': 163.929171, 'Ho': 164.930319, 'Er': 165.93029, 'Tm': 168.934211, 'Yb': 173.9388581, 'Lu': 174.9407679, 'Hf': 179.9465488, 'Ta': 180.947996, 'W': 183.9509326, 'Re': 186.9557508, 'Os': 191.961479, 'Ir': 192.962924, 'Pt': 194.964774, 'Au': 196.966552, 'Hg': 201.970626, 'Tl': 204.974412, 'Pb': 207.976636, 'Bi': 208.980383, 'Po': 218.0089658, 'At': 223.02534, 'Rn': 228.03808, 'Fr': 232.04965, 'Ra': 234.05055, 'Ac': 236.05518, 'Th': 232.0380504, 'Pa': 231.0358789, 'U': 238.0507826, 'Np': 244.06785, 'Pu': 247.07407, 'Am': 249.07848, 'Cm': 252.08487, 'Bk': 254.0906, 'Cf': 256.09344, 'Es': 257.09598, 'Fm': 259.10059, 'Md': 260.10365, 'No': 262.10752, 'Lr': 263.11139, 'Rf': 264.11398, 'Db': 265.11866, 'Sg': 266.12193, 'Bh': 267.12774, 'Hs': 269.13411, 'Mt': 271.14123, 'Ds': 273.14925, 'Rg': 272.15348, 'Cn': 0, 'Nh': 0, 'Fl': 0, 'Mc': 0, 'Lv': 0, 'Ts': 0, 'Og': 0}
def convert(e1,e2,f):
# Conversion factors
hartree = 4.3597447222071e-18 # joules
bohr = 1./18897161646.321 # m
amu = 1.6605402e-27 # kg
c = 299792458.0 # m/s
mole = 6.02214076e23
# Reduced mass in kg
mu = mass[e1]*mass[e2] / (mass[e1]+mass[e2]) * amu
# Frequency in reduced coordinates
lam = (f * hartree / (bohr*bohr) ) / mu
# Convert to wave numbers
nu = sqrt(lam)/(2.*pi*c) * 0.01
return nu
#print("Frequency (in hartree/bohr^2) ? "),
a = float(a)
f = De*2.*a*a
print( convert('Cu','Cl',f) )
#+end_src
#+RESULTS: freq
: 1606.9338540276244
** CCSD
NIST Computational Chemistry Comparison and Benchmark Database,
NIST Standard Reference Database Number 101
Release 22, May 2022, Editor: Russell D. Johnson III
http://cccbdb.nist.gov/
Reference: 418 cm^-1
#+name:cucl_ccsd
| 1.50 | -2099.486410873280 |
| 1.55 | -2099.543699210125 |
| 1.60 | -2099.589314361086 |
| 1.65 | -2099.625339778701 |
| 1.70 | -2099.653512737443 |
| 1.75 | -2099.675272554191 |
| 1.80 | -2099.691805023191 |
| 1.85 | -2099.704090874785 |
| 1.90 | -2099.712929797538 |
| 1.95 | -2099.718979067095 |
| 2.00 | -2099.722774674517 |
| 2.05 | -2099.724755534740 |
| 2.10 | -2099.725278146519 |
| 2.15 | -2099.724633969314 |
| 2.20 | -2099.723061015635 |
| 2.25 | -2099.720753446736 |
| 2.30 | -2099.717868046847 |
| 2.35 | -2099.714536050722 |
| 2.40 | -2099.710862892300 |
| 2.45 | -2099.706934614773 |
| 2.50 | -2099.702822147426 |
| 2.55 | -2099.698584961555 |
| 2.60 | -2099.694269954830 |
| 2.65 | -2099.689916001502 |
#+begin_src gnuplot :var data=cucl_ccsd :results file :file cucl_ccsd.png
reset
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.
re = 3.9
De = 0.1
E0 = -2099.725
set xrange [2.7:5]
fit E(x) data using ($1*a0):2 via a, re, De, E0
plot E(x), data using ($1*a0):2 w p
#+end_src
#+RESULTS:
[[file:cucl_ccsd.png]]
#+begin_example
a = 0.850836 +/- 0.005939 (0.698%)
re = 3.94582 +/- 0.001786 (0.04526%)
De = 0.0961907 +/- 0.00189 (1.965%)
E0 = -2099.73 +/- 0.0001574 (7.496e-06%)
#+end_example
#+CALL:freq(0.8637,0.0912735)
#+RESULTS:
: 400.10303409950683
** CCSD(T) 1%
| 1.50 | -2099.53432314 | 1.4370E-03 |
| 1.55 | -2099.58890791 | 1.3630E-03 |
| 1.60 | -2099.63464947 | 1.1896E-03 |
| 1.65 | -2099.67175286 | 1.5710E-03 |
| 1.70 | -2099.69974767 | 1.6166E-03 |
| 1.75 | -2099.71877319 | 1.3199E-03 |
| 1.80 | -2099.73774273 | 1.6649E-03 |
| 1.85 | -2099.74897746 | 1.4668E-03 |
| 1.90 | -2099.75550908 | 1.4868E-03 |
| 1.95 | -2099.76232971 | 1.6105E-03 |
| 2.00 | -2099.76550160 | 1.5386E-03 |
| 2.05 | -2099.76565267 | 1.5202E-03 |
| 2.10 | -2099.76718796 | 1.7046E-03 |
| 2.15 | -2099.76485609 | 1.7470E-03 |
| 2.20 | -2099.76331490 | 1.4802E-03 |
| 2.25 | -2099.76237391 | 1.7474E-03 |
| 2.30 | -2099.76090908 | 1.9686E-03 |
| 2.35 | -2099.75681975 | 1.9951E-03 |
| 2.40 | -2099.73868918 | 8.8739E-04 |
| 2.45 | -2099.74813718 | 2.4288E-03 |
| 2.50 | -2099.74125661 | 1.6437E-03 |
| 2.55 | -2099.74031232 | 2.4057E-03 |
| 2.60 | -2099.73104343 | 1.4544E-03 |
| 2.65 | -2099.72866832 | 1.6894E-03 |
#+name:cucl_ccsdt
| 1.55 | -2099.58890791 | 1.3630E-03 |
| 1.65 | -2099.67175286 | 1.5710E-03 |
| 1.75 | -2099.71877319 | 1.3199E-03 |
| 1.85 | -2099.74897746 | 1.4668E-03 |
| 1.95 | -2099.76232971 | 1.6105E-03 |
| 2.05 | -2099.76565267 | 1.5202E-03 |
| 2.15 | -2099.76485609 | 1.7470E-03 |
| 2.25 | -2099.76237391 | 1.7474E-03 |
| 2.35 | -2099.75681975 | 1.9951E-03 |
| 2.45 | -2099.74813718 | 2.4288E-03 |
| 2.55 | -2099.74031232 | 2.4057E-03 |
| 2.65 | -2099.72866832 | 1.6894E-03 |
#+begin_src gnuplot :var data=cucl_ccsdt :results file :file cucl_ccsdt.png
reset
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.
re = 3.9
De = 0.1
E0 = -2099.767
set xrange [2.7:5.2]
fit E(x) data using ($1*a0):2 via a, re, De, E0
plot E(x), data using ($1*a0):2:3 w err
#+end_src
#+RESULTS:
[[file:cucl_ccsdt.png]]
#+begin_example
a = 0.84615 +/- 0.03216 (3.8%)
re = 3.92539 +/- 0.01058 (0.2696%)
De = 0.101589 +/- 0.00932 (9.174%)
E0 = -2099.77 +/- 0.0008014 (3.817e-05%)
#+end_example
#+CALL:freq(0.84615,0.101589)
#+RESULTS:
: 413.5302408975902
#+CALL:freq(0.895573,0.0854261)
#+RESULTS:
: 401.3588602143032
** CCSD(T) exact
#+name:cucl_ccsdt_ex
| 1.50 | -2099.533616067071 |
| 1.55 | -2099.590506349950 |
| 1.60 | -2099.635662051331 |
| 1.65 | -2099.671184187604 |
| 1.70 | -2099.698826802514 |
| 1.75 | -2099.720045862965 |
| 1.80 | -2099.736043284873 |
| 1.85 | -2099.747811193906 |
| 1.90 | -2099.756159621832 |
| 1.95 | -2099.761752030920 |
| 2.00 | -2099.765128141854 |
| 2.05 | -2099.766727898670 |
| 2.10 | -2099.766907494029 |
| 2.15 | -2099.765956694308 |
| 2.20 | -2099.764111168127 |
| 2.25 | -2099.761562105614 |
| 2.30 | -2099.758464229658 |
| 2.35 | -2099.754944906474 |
| 2.40 | -2099.751100967299 |
| 2.45 | -2099.747028328725 |
| 2.50 | -2099.742790106242 |
| 2.55 | -2099.738443175793 |
| 2.60 | -2099.734033236772 |
| 2.65 | -2099.729597826175 |
#+begin_src gnuplot :var data=cucl_ccsdt_ex :results file :file cucl_ccsdt_ex.png
reset
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.
re = 3.9
De = 0.1
E0 = -2099.767
set xrange [2.7:5.2]
fit E(x) data using ($1*a0):2 via a, re, De, E0
plot E(x), data using ($1*a0):2
#+end_src
#+RESULTS:
[[file:cucl_ccsdt_ex.png]]
#+begin_example
a = 0.853035 +/- 0.006204 (0.7273%)
re = 3.91994 +/- 0.002032 (0.05183%)
De = 0.100264 +/- 0.001906 (1.901%)
E0 = -2099.77 +/- 0.0001757 (8.367e-06%)
#+end_example
#+CALL:freq(0.853035,0.100264)
#+RESULTS:
: 414.16742408686565
#+begin_src gnuplot :var data=cucl_ccsdt :var data2=cucl_ccsdt_ex :results file :file cucl_ccsdt2.png
reset
set grid
a0 = 1.8897161646321
E(r) = De * (1-exp(-a*(r-re)))**2 + E0
a = 1.
re = 3.9
De = 0.1
E0 = -2099.767
set xrange [2.7:5.5]
fit E(x) data using ($1*a0):2 via a, re, De, E0
set xrange [3.0:5.2]
plot data2 using ($1*a0-0.002):2 pointtype 2 lt 3 title "Full", data using ($1*a0+0.002):2:3 w err pt 0 lt 8 title "1%", E(x) title "" lt 5
#+end_src
#+RESULTS:
[[file:cucl_ccsdt2.png]]
* Export :noexport:
#+BEGIN_SRC elisp :output none