Different version, different result?
Andy Van Yperen-De Deyne
andy.vanyp... at ugent.be
Mon Nov 9 15:14:10 UTC 2009
Dear prof. Hutter,
I tried as you suggested the higher EPS convergence (even up to 1E-15)
and the values indeed changed a little bit, but they still are not
even close to the old values. So I performed a larger number of tests
using more then 2 versions of cp2k, and I found two versions
(2009-06-03 and 2009-08-25) that have identical linear respons scf
cycles, identical g_zke but different spin-orbit contributions to the
g-tensor. The Juin version still has (approximatly) the same values as
before and also has the fast linres convergence algorithm used in the
August version.
I tried GPW calculations with not difference between the two versions
as a result, so the problem is the GAPW part of the g-tensor code.
I checked this part of the code carefully (lines 405-568 in the
qs_linres_epr_ownutils.F file) and checked the called functions, but I
can't find any big changes of these called functions during the period
of interest (Juin-August 2009). There are some modifications but
mostly expantions...
The most important part of the code seems to be
temp_so_gapw(iB,idir1) = temp_so_gapw
(iB,idir1) + &
(-1.0_dp)**(1 + ispin) * ( &
jrho1_atom%jrho_vec_rad_h(idir2,ispin)
%r_coef(ir,ia) * &
vks_ra_idir3 - &
jrho1_atom%jrho_vec_rad_h(idir3,ispin)
%r_coef(ir,ia) * &
vks_ra_idir2 &
) * grid_atom%wr(ir)*grid_atom%wa(ia)
where ispin is certainly constant during different versions. I guess
grid_atom is also the same as before (since the energy etc is the same
in different versions). Also the functions to generate vks_ra_idirX is
not changed that period (that's the Eval_Interp_Spl3_pbc function) and
jrho1_atom is data recieved from the linres cycle and already used for
the GPW part, so I don't see problems there as well.
With this additional information, do you have any idea what could
cause the problem? I am sorry to bother you this much about this
problem but I would really like to sort this out.
Sincerely yours,
Andy Van Yperen-De Deyne
On Nov 3, 9:39 am, Juerg Hutter <hut... at pci.uzh.ch> wrote:
> Hi
>
> there was a change in algorithm for the solution of the
> linear response equations. As you can see it now
> converges much faster. The problem is that the convergence
> criteria has also changed. You should set the EPS value
> in LINRES to 1.e-6 or lower to get similarly converged vectors
> as before.
>
> regards
>
> Juerg
>
> ----------------------------------------------------------
> Juerg Hutter Phone : ++41 44 635 4491
> Physical Chemistry Institute FAX : ++41 44 635 6838
> University of Zurich E-mail: hut... at pci.uzh.ch
> Winterthurerstrasse 190
> CH-8057 Zurich, Switzerland
> ----------------------------------------------------------
>
> On Fri, 30 Oct 2009, Andy Van Yperen-De Deyne wrote:
>
>
>
> > Dear prof. Hutter,
>
> > Thank you for your very quick response.
> > Defining the unit of the cell dimension indeed solves the energy
> > problem (a difference of approximatly 1E-8 between 2008 and 2009), but
> > the g-tensor still is (very) different.
>
> > 2008 output
> > delta_g principal values in ppm
> > -1531.359 X= -0.0000221337 Y= 0.7259087561 Z= 0.6877910128
> > -1530.968 X= -0.0000135688 Y= 0.6877910127 Z= -0.7259087564
> > -31.536 X= 0.9999999997 Y= 0.0000253995 Z= 0.0000053737
>
> > 2009 output
> > delta_g principal values in ppm
> > -3580.849 X= -0.0005164193 Y= 0.5608716207 Z= 0.8279026262
> > -3557.692 X= 0.0002693775 Y= 0.8279027846 Z= -0.5608715599
> > 629.481 X= 0.9999998304 Y= 0.0000666266 Z= 0.0005786312
>
> > The main difference between the two tensors are in the spin-orbit part
> > of the g-tensor (factor 26 for the XX component, factor 1.4 for the YY
> > component and a factor 0.6 for the ZZ component). There's only a
> > little difference between the zeeman-kinetic-energy (zke) term (+/-
> > 3%) and almost no difference for the spin-other-orbit contribution
> > (+/- 0.3%)
>
> > I noticed that the linear response output has changed a lot (8
> > iterations instead of 180 for Lx and so on) so I wondered if this
> > could be the cause of this difference? I have not found conceptual
> > differences in the code for g-tensor (mostly just error=error was
> > added in the subroutines that are being called)...
>
> > Thank you,
>
> > Andy Van Yperen-De Deyne
> > Center for Molecular Modeling
> > Ghent University
> > Technologiepark Zwijnaarde 903
> > Andy.VanYp... at UGent.be
>
> > On Oct 30, 1:15 pm, Juerg Hutter <hut... at pci.uzh.ch> wrote:
> >> Hi
>
> >> the different default that you have is the unit of the
> >> cell dimension.
> >> In the newer version this is now Angstrom, consistent with the
> >> coordinates. You can see this by checking the volume in the
> >> pw_grid output. By given the units explicitely, you should be able
> >> to recover the older results.
>
> >> regards
>
> >> Juerg Hutter
>
> >> ----------------------------------------------------------
> >> Juerg Hutter Phone : ++41 44 635 4491
> >> Physical Chemistry Institute FAX : ++41 44 635 6838
> >> University of Zurich E-mail: hut... at pci.uzh.ch
> >> Winterthurerstrasse 190
> >> CH-8057 Zurich, Switzerland
> >> ----------------------------------------------------------
>
> >> On Fri, 30 Oct 2009, Andy Van Yperen-De Deyne wrote:
>
> >>> Hello,
>
> >>> When I wanted to reproduce some g-tensors of an older version of CP2K,
> >>> using the new version of CP2K, I noticed a (rather large) difference
> >>> (especially for the GAPW).
> >>> Then I used a compilation of an older version of CP2K (2008
> >>> something), I noticed that even the total energy of the single point
> >>> calculation is different in both versions (lets call them for now 2008
> >>> and 2009).
>
> >>> ENERGY_2008 -18.770810474185076
> >>> ENERGY_2009 -18.785104003918622
>
> >>> So it seems logical that the property calculation is different. I used
> >>> the exact same inputfile for both versions. I want to mention that I
> >>> had the idea that the 2009 version was slower then the 2008
> >>> version...
>
> >>> I am trying to sort things out and find the essential difference
> >>> between the two inputfiles.
> >>> I noticed in the 2008 outputfile this line
> >>> CELL| Grid size for subcell
> >>> generation 2.000
> >>> which is not present for the 2009 output. But looking into the manual,
> >>> it seems that the default value for this property in the 2009
> >>> inputfile is also 2.000.
>
> >>> However, when I look at the "PW_GRID:"-section in the output, I see
> >>> that this grid of the 2009 version is different from the 2008 version.
> >>> To give you one example
>
> >>> 2009
> >>> PW_GRID: Information for grid
> >>> number 1
> >>> PW_GRID: Cutoff
> >>> [a.u.] 300.0
> >>> PW_GRID: spherical
> >>> cutoff: NO
> >>> PW_GRID: Bounds 1 -75 74
> >>> Points: 150
> >>> PW_GRID: Bounds 2 -75 74
> >>> Points: 150
> >>> PW_GRID: Bounds 3 -75 74
> >>> Points: 150
> >>> PW_GRID: Volume element (a.u.^3) 0.2000E-02 Volume (a.u.^3)
> >>> 6748.3346
> >>> PW_GRID: Grid span
> >>> FULLSPACE
>
> >>> 2008
> >>> PW_GRID: Information for grid
> >>> number 1
> >>> PW_GRID: Cutoff
> >>> [a.u.] 300.0
> >>> PW_GRID: spherical
> >>> cutoff: NO
> >>> PW_GRID: Bounds 1 -40 39
> >>> Points: 80
> >>> PW_GRID: Bounds 2 -40 39
> >>> Points: 80
> >>> PW_GRID: Bounds 3 -40 39
> >>> Points: 80
> >>> PW_GRID: Volume element (a.u.^3) 0.1953E-02 Volume (a.u.^3)
> >>> 1000.0000
> >>> PW_GRID: Grid span
> >>> FULLSPACE
>
> >>> (for all the other grids there is also a similar difference...)
>
> >>> I guess some default value has changed and I wonder if it is possible
> >>> to change it back to the 2008 values or vice versa? I have not found a
> >>> solution in the manual (I apologize if it is just a trivial keyword
> >>> that I did not found).
>
> >>> Or is there another reason for the big difference in energy between
> >>> the two versions of CP2K?
>
> >>> Thank you for your attention,
>
> >>> Andy Van Yperen-De Deyne
> >>> Center for Molecular Modeling
> >>> Ghent University
> >>> Technologiepark Zwijnaarde 903
> >>> Andy.VanYp... at UGent.be
>
> >>> INPUTFILE
>
> >>> ! G tensor calculation just for a testrun
>
> >>> &GLOBAL
> >>> PRINT_LEVEL MEDIUM
> >>> PROJECT_NAME regtest
> >>> RUN_TYPE LINEAR_RESPONSE !ENERGY
> >>> WALLTIME -1.00
> >>> PREFERRED_FFT_LIBRARY FFTSG
> >>> &END GLOBAL
>
> >>> &FORCE_EVAL
>
> >>> &SUBSYS
>
> >>> &CELL
> >>> ABC 10.0 10.0 10.0
> >>> PERIODIC NONE
> >>> &END CELL
>
> >>> &TOPOLOGY
> >>> CONNECTIVITY OFF
> >>> COORD_FILE_NAME opt.xyz
> >>> COORD_FILE_FORMAT XYZ
> >>> &END TOPOLOGY
>
> >>> &KIND O
> >>> BASIS_SET TZVP-MOLOPT-GTH
> >>> POTENTIAL GTH-PBE-q6
> >>> &END KIND
>
> >>> &KIND B
> >>> BASIS_SET DZVP-MOLOPT-SR-GTH
> >>> POTENTIAL GTH-PBE-q3
> >>> &END KIND
>
> >>> &KIND C
> >>> BASIS_SET TZVP-MOLOPT-GTH
> >>> POTENTIAL GTH-PBE-q4
> >>> &END KIND
>
> >>> &KIND H
> >>> BASIS_SET TZVP-MOLOPT-GTH
> >>> POTENTIAL GTH-PBE-q1
> >>> &END KIND
>
> >>> &KIND N
> >>> BASIS_SET TZVP-MOLOPT-GTH
> >>> POTENTIAL GTH-PBE-q5
> >>> &END KIND
>
> >>> &KIND F
> >>> BASIS_SET TZVP-MOLOPT-GTH
> >>> POTENTIAL GTH-PBE-q7
> >>> &END KIND
>
> >>> &END SUBSYS
>
> >>> &DFT
> >>> LSD
> >>> CHARGE 0
> >>> MULTIPLICITY 2
> >>> BASIS_SET_FILE_NAME BASIS_MOLOPT
> >>> POTENTIAL_FILE_NAME GTH_POTENTIALS
>
> >>> &MGRID
> >>> CUTOFF 300
> >>> NGRIDS 5
> >>> &END MGRID
>
> >>> &QS
> >>> METHOD GAPW
> >>> EXTRAPOLATION PS
> >>> EXTRAPOLATION_ORDER 2
> >>> &END QS
>
> >>> &XC
> >>> &XC_FUNCTIONAL PBE
> >>> &END XC_FUNCTIONAL
> >>> &END XC
>
> >>> &POISSON
> >>> PERIODIC NONE
> >>> POISSON_SOLVER MT
> >>> &END POISSON
>
> >>> &SCF
> >>> EPS_SCF 1.0E-5
> >>> MAX_SCF 50
> >>> SCF_GUESS ATOMIC
> >>> &OUTER_SCF
> >>> EPS_SCF 1.0E-5
> >>> MAX_SCF 10
> >>> &END OUTER_SCF
> >>> &OT
> >>> MINIMIZER DIIS
> >>> PRECONDITIONER FULL_KINETIC
> >>> &END OT
> >>> &END SCF
>
> >>> &PRINT
> >>> &MULLIKEN
> >>> FILENAME regtest-mul.pop
> >>> !&EACH
> >>> ! corresponding_motion 1
> >>> !&END EACH
> >>> &END MULLIKEN
> >>> &END PRINT
> >>> &END DFT
> >>> &PROPERTIES
> >>> &LINRES
> >>> PRECONDITIONER
>
> ...
>
> read more »
More information about the CP2K-user
mailing list