Re: [Wien] threaded run with SLURM

2018-05-17 Thread Gavin Abo
I believe that is usually controlled with the OMP_NUM_THREADS 
environment variable:


https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg05475.html
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg03997.html

However, I have never really tried using the multiple threads.

On 5/17/2018 3:56 PM, Sabry Moustafa wrote:

Hi;


I am trying to run jobs with one node, with multicores, in a threaded 
mode in slurm. I tried to run the serial benchmark problem as given here:


http://susi.theochem.tuwien.ac.at/reg_user/benchmark/

But, did not get difference in CPU time with using any number of cores 
(ntasks-per-node). Here is the most important parts of my serial slurm 
script:


***

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4

x lapw1



The CPU time should decrease with increasing number of threads as 
shown in the benchmark page above.


So, is just setting "ntasks-per-node=x" makes WIEN2k run in threaded, 
not just serial?



Thanks;

Sabry


___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] 'ifort' and 'mkl libraries

2018-05-17 Thread Gavin Abo
Just installed WIEN2k 17.1 on Ubuntu 18.04 LTS using Intel Fortran 
Composer XE 2013 (ifort version 14.0.1).


It didn't seem too bad.  I had to make a few adjustments when following 
Intel's instructions at:


https://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu

After a fresh install of Ubuntu 18.04 using a "Normal" (not the minimal) 
installation, I had to run:


sudo apt update

Had to install typically packages needed for WIEN2k like:

sudo apt install tcsh ghostscript octave gnuplot

To remove, the "No compatible python found", I had to install python 2.7 
(since python3 is now installed instead as the default) using:


sudo apt install python

To remove, the "32-bit libraries not found", I just deselected the 
32-bit Fortran to tell it not to install it on the 64-bit OS.  Or maybe 
that could also still be resolved using "sudo apt install ia32-libs", 
but I didn't try it.


The "missing system commands", I was able to resolve using the same 
commands given in Intel's instructions:


sudo apt install build-essential gcc-multilib rpm

I encountered a "No compatible JAVA Runtime Environment (JRE) found".  
Instead of "apt-get install openjdk-6-jre-headless", I had to use:


sudo apt install default-jre-headless

The JAVA error does not go away, but with the default-jre-headless 
installed, I just ignored (skipped) the prerequisite and continued.  
Everything appeared to go smoothly.


I added the one single source line to my .bashrc following the 
instructions at:


https://software.intel.com/en-us/articles/setting-up-the-build-environment-for-using-intel-c-or-fortran-compilers

In other words, the:

source /compilervars.sh intel64

where  on my system was:

/opt/intel/composerxe/bin

Installed autoconf and libtool for installing libxc:

sudo apt install autoconf libtool

Installed libxc based on the instructions at

https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15254.html

but used instead the new libxc 4.1.1 at 
http://octopus-code.org/wiki/Libxc:download


I did the usually steps for a serial install:

tar -xvf WIEN2k_17.1.tar
gunzip *.gz
chmod +x ./expand_lapw
./expand_lapw
Installed some patches [ 
https://github.com/gsabo/WIEN2k-Patches/tree/master/17.1 ]

./siteconfig_lapw
   For MPI, ScaLAPACK, ELPA, or FFTW, typed N and pressed enter
./userconfig_lapw
w2web

Finally, a quick test was ran with the TiC example in the userguide, 
which seems to have finished without any problems:


username@computername:~$ cd ~/wiendata/TiC
username@computername:~/wiendata/TiC$ ls
TiC.struct
username@computername:~/wiendata/TiC$ init_lapw -b
...
init_lapw finished ok
username@computername:~/wiendata/TiC$ run_lapw
...
in cycle 11 ETEST: .000476205000 CTEST: .010728
LAPW0 END
LAPW1 END
LAPW2 END
CORE END
MIXER END
ec cc and fc_conv 1 1 1
> stop

So the 2018 ifort version, one would hope, should install with even less 
problems.  Though with the 2013 ifort version, it might be why I haven't 
encountered myself the I/O chaos [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17023.html 
].


On 5/14/2018 12:18 AM, Victor Zenou wrote:


I decided to upgrade to Wien2k_17.1 , as was suggested*.*

I installed the last version of Ubuntu, 18.04, (supposed to be 64 bit) 
on PC with intel Xeon processor. I have 2 drives: 256 GB SSD and 500 
SATA HDD.


First question: Its known that SSD is much faster than SATA or any 
HDD, and usually operating systems are installed on SSD. Is it 
important to install wien2k on SSD, as I definitely want my wien2k 
data to be on the bigger drive (500 GB)?


Second question: In order to use 'ifort' and 'mkl libraries' I tried 
to install Parallel studio xe 2018, but got some errors regarding to 
"Missing optional prerequisites":

-- Unsupported OS
-- Intel(R) Trace Analyzer and Collector 2018 for Linux* OS: 
Unsupported OS

-- Intel(R) Cluster Checker 2018 Update 3 for Linux* OS: Unsupported OS
-- Intel(R) VTune(TM) Amplifier XE 2018 update 2: Unsupported OS
-- Intel(R) Inspector 2018: Unsupported OS
-- Intel(R) Advisor 2018: Unsupported OS
-- Driver build options are incomplete. Drivers cannot be built.

I also got:

missing system commands

No compatible python found

32-bit libraries not found (libstdc++ (including libstdc++6), glibc 
and libgcc). Without these libraries the compiler will not function 
properly.


Are these "missing optional prerequisites" important to wien2k 
installation?


Thanks,Victor



___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


[Wien] threaded run with SLURM

2018-05-17 Thread Sabry Moustafa

Hi;


I am trying to run jobs with one node, with multicores, in a threaded 
mode in slurm. I tried to run the serial benchmark problem as given here:


http://susi.theochem.tuwien.ac.at/reg_user/benchmark/

But, did not get difference in CPU time with using any number of cores 
(ntasks-per-node). Here is the most important parts of my serial slurm 
script:


***

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4

x lapw1



The CPU time should decrease with increasing number of threads as shown 
in the benchmark page above.


So, is just setting "ntasks-per-node=x" makes WIEN2k run in threaded, 
not just serial?



Thanks;

Sabry



___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Finite temperature DFT: electronic free energy

2018-05-17 Thread Laurence Marks
Converge first with a lower temperature (and relevant compression), do rm
*.bro* and increase the temperature in case.in2. Increase the upper energy
bound in case.in1 so it is at least 6 times |TS| above the T=0 Fermi energy
(you might need more).

And...check the literature to see if PBE or similar is valid at these
temperatures, it may be but I am not sure.

_
Professor Laurence Marks
"Research is to see what everybody else has seen, and to think what nobody
else has thought", Albert Szent-Gyorgi
www.numis.northwestern.edu

On Thu, May 17, 2018, 4:48 PM Sabry Moustafa  wrote:

> Hi;
>
> I am actually using fermits to get electronic free energy, not as a
> smearing method (see my initial email). We are doing high
> pressure/temperature calculations (300 GPa and up to 7000 K). So, any
> help on letting WIEN2k accept that?
>
> Thanks;
> Sabry
>
>
> On 05/15/2018 03:34 AM, Peter Blaha wrote:
> >
> > Thanks for the bug report in init_lapw.
> >
> > Please note: when the temperature (broadening) is set to zero, it will
> > use automatically "room temperature" (0.0018 Ry).
> >
> > On 05/15/2018 06:40 AM, Gavin Abo wrote:
> >> I think you found a bug in init_lapw.  The fix seems like it should
> >> be simple though.  On line 498 in the init_lapw script in the sed
> >> command, it looks like $fermit just needs changed to $fermits.
> >>
> >> I made a patch file called init_lapw.patch [
> >>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_gsabo_WIEN2k-2DPatches_tree_master_17.1&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=Hn5eIySND1IkkC8SenMTlUEYgU3nny253vK7bDy-L0g&s=pchq-sckwiEtPKCc3NjC8McQxlngga41TZlRpVbB0x4&e=
> ], which you
> >> should be able to apply and try simply using:
> >>
> >> username@computername:~/Desktop$ cd $WIENROOT
> >> username@computername:~/WIEN2k$ wget
> >>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_gsabo_WIEN2k-2DPatches_master_17.1_init-5Flapw.patch&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=Hn5eIySND1IkkC8SenMTlUEYgU3nny253vK7bDy-L0g&s=6LnxjU7LcuE_qQ14bQf2bAVhfWK2JagDPwsg463SAcU&e=
> >> username@computername:~/WIEN2k$ patch -b init_lapw init_lapw.patch
> >> patching file init_lapw
> >>
> >> Maybe F is the :ENE (TOTAL ENERGY) in case.scf.
> >>
> >> I tried following what a previous user did [
> >>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg10319.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=Hn5eIySND1IkkC8SenMTlUEYgU3nny253vK7bDy-L0g&s=-UMXEb4CU6-5g1bj24XAeH9V_U93yjUI01EDvqtB2pE&e=
> >> ] but with a quick TiC calculation using run_lapw in WIEN2k 17.1:
> >>
> >> T = 1000 K = 0.00633 Ry
> >> init_lapw -b -fermits 0.00633
> >> TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.95041939
> >> TiC.output2:  Kb * T=   0.00633000
> >> TiC.output2:  -T*Entr   =  -0.00054181
> >>
> >> T = 0 K = 0.0 Ry
> >> init_lapw -b -fermits 0.0
> >> TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.94928338
> >> TiC.output2:  Kb * T=   0.0018
> >> TiC.output2:  -T*Entr   =  -0.5329
> >>
> >> F_1000K - F_0K = (E - T*S) - (E - 0) = -T*S = -1783.95041939 -
> >> (-1783.94928338) = -0.001136 => -T*S = -0.001136
> >>
> >> If -T*S divided by 2:
> >>
> >> -T*S = -0.001136/2 = - 0.000568 <- This seems reasonably close to the
> >> above -0.00054181 for T = 1000 K.
> >>
> >> As I recall, the -T*S term was doubled in WIEN2k versions after 2014
> >> [
> >>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg10319.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=Hn5eIySND1IkkC8SenMTlUEYgU3nny253vK7bDy-L0g&s=-UMXEb4CU6-5g1bj24XAeH9V_U93yjUI01EDvqtB2pE&e=
> >> ].
> >>
> >> Though, there may be a flaw in my above calculation.
> >>
> >> On 5/14/2018 5:35 PM, Sabry Moustafa wrote:
> >>>
> >>> Hi;
> >>>
> >>> I am interested in the electronic free energy (F=E-TS) using the
> >>> finite temperature DFT using Fermi-Dirac statistics (i.e., Mermin's
> >>> extension to 0 K DFT) -- i.e., I am not just looking for Fermi-Dirac
> >>> as a broadening/smearing technique. So,how this can be done in WIEN2k?
> >>>
> >>> It looks like I have to define "-fermits X" in the init_lapw command
> >>> (where X= kT, in Ry). But when I did (T=1000K in my case):
> >>>
> >>> init_lapw -b -fermits 0.00633
> >>>
> >>> I got "fermit: Undefined variable." at the end. This is fixed though
> >>> when defined fermit as well:
> >>>
> >>> init_lapw -b -fermit 0.00633 -fermits 0.00633
> >>>
> >>> So, do I have to define both?
> >>>
> >>>
> >>> Also, where can I find this "free energy F". It does not seem to be
> >>> the "TOTAL ENERGY" in case.scf. Seems like 

Re: [Wien] Finite temperature DFT: electronic free energy

2018-05-17 Thread Sabry Moustafa

Hi;

I am actually using fermits to get electronic free energy, not as a 
smearing method (see my initial email). We are doing high 
pressure/temperature calculations (300 GPa and up to 7000 K). So, any 
help on letting WIEN2k accept that?


Thanks;
Sabry


On 05/15/2018 03:34 AM, Peter Blaha wrote:


Thanks for the bug report in init_lapw.

Please note: when the temperature (broadening) is set to zero, it will 
use automatically "room temperature" (0.0018 Ry).


On 05/15/2018 06:40 AM, Gavin Abo wrote:
I think you found a bug in init_lapw.  The fix seems like it should 
be simple though.  On line 498 in the init_lapw script in the sed 
command, it looks like $fermit just needs changed to $fermits.


I made a patch file called init_lapw.patch [ 
https://github.com/gsabo/WIEN2k-Patches/tree/master/17.1 ], which you 
should be able to apply and try simply using:


username@computername:~/Desktop$ cd $WIENROOT
username@computername:~/WIEN2k$ wget 
https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/init_lapw.patch

username@computername:~/WIEN2k$ patch -b init_lapw init_lapw.patch
patching file init_lapw

Maybe F is the :ENE (TOTAL ENERGY) in case.scf.

I tried following what a previous user did [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html 
] but with a quick TiC calculation using run_lapw in WIEN2k 17.1:


T = 1000 K = 0.00633 Ry
init_lapw -b -fermits 0.00633
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.95041939
TiC.output2:  Kb * T    =   0.00633000
TiC.output2:  -T*Entr   =  -0.00054181

T = 0 K = 0.0 Ry
init_lapw -b -fermits 0.0
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.94928338
TiC.output2:  Kb * T    =   0.0018
TiC.output2:  -T*Entr   =  -0.5329

F_1000K - F_0K = (E - T*S) - (E - 0) = -T*S = -1783.95041939 - 
(-1783.94928338) = -0.001136 => -T*S = -0.001136


If -T*S divided by 2:

-T*S = -0.001136/2 = - 0.000568 <- This seems reasonably close to the 
above -0.00054181 for T = 1000 K.


As I recall, the -T*S term was doubled in WIEN2k versions after 2014 
[ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html 
].


Though, there may be a flaw in my above calculation.

On 5/14/2018 5:35 PM, Sabry Moustafa wrote:


Hi;

I am interested in the electronic free energy (F=E-TS) using the 
finite temperature DFT using Fermi-Dirac statistics (i.e., Mermin's 
extension to 0 K DFT) -- i.e., I am not just looking for Fermi-Dirac 
as a broadening/smearing technique. So,how this can be done in WIEN2k?


It looks like I have to define "-fermits X" in the init_lapw command 
(where X= kT, in Ry). But when I did (T=1000K in my case):


init_lapw -b -fermits 0.00633

I got "fermit: Undefined variable." at the end. This is fixed though 
when defined fermit as well:


init_lapw -b -fermit 0.00633 -fermits 0.00633

So, do I have to define both?


Also, where can I find this "free energy F". It does not seem to be 
the "TOTAL ENERGY" in case.scf. Seems like I need to add this "TOTAL 
ENERGY" (E) to "-T*Entr" (-TS) in case.output2 file to get F?



Thanks ;

Sabry


:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-: 



Sabry G. Moustafa, Ph.D.
Department of Chemical and Biological Engineering,
University at Buffalo, The State University of New York.
511 Furnas Hall
Buffalo, NY 14260-4200
716-645-1186 (office)
716-239-8543 (cell)

E-mail: sabry...@buffalo.edu 



___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at: 
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html






___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Finite temperature DFT: electronic free energy

2018-05-17 Thread Laurence Marks
On Thu, May 17, 2018 at 2:38 PM, Sabry Moustafa 
wrote:

>
> (0) PROBLEM:
> WIEN2k did not accept lage temperatures (>~4000 K). I always get this
> error "FERMI5 - Error" in the job error file. No complain in the
> init_lapw step; only after run_lapw finishes. Any help here?
>

No great surprise! If you are using this to improve convergence -- don't.
With the Wien2k mixer I have found little evidence that this helps in most
cases and in many cases it degrades convergence. Be careful about
transferring "lore" from Vasp to Wien2k.

If you want to calculate real parameters at 4000K or higher then you need
to look at real high-temperature functionals (which may be in LIBXC, or may
not).


>
>
> (1) Thanks Blaha and Gavin for your help -- I tried it and worked fine.
> Gavin, please note that in Fermi-Dirac statistics the energy is
> temperature dependent. See for example Marzari's thesis (e.g., Fig 4.2):
> https://urldefense.proofpoint.com/v2/url?u=http-3A__
> theossrv1.epfl.ch_Main_Theses-3Faction-3Ddownload-26upname-
> 3DMarzari-5Fthesis-5F1996.pdf&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNX
> t_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=
> QWFxBxDVokCVrWNwIw0tPvBInPWUpwTiF5I7NxLxYpY&s=
> cdlLD1tVxFmf0KY08zyP2A64jvG2mBpWzj8mZLsI9Qw&e=
>
> Of course.

>
> (2) Actually, the "TOTAL ENERGY IN Ry" in case.scf is the free energy
> F(T); i.e., F(T)=E(T) - T*S(T). This is written explicitly in the UG,
> when talking about "TEMPS" (Sec. 7.8.3):
> "The total energy is corrected by -TS ..."
> So, E(T) can be obtained from F(T) and -T*S(T), i.e., E = F + TS.
>
> The energy output using TEMPS is E = F + TS, no entropy corrections are
appropriate for the Mermin functional. (The UG is a little ambiguous.)

For reference, TEMP is not recommended for PORT, TEMPS should be used.
(TEMP can lead to erroneous results as the energy and forces are not
completely consistent.) It does not matter with MSR1a since this does not
use the energies.


> (3) Since I am beginner and familiar more with VASP at this point, I
> checked (using hcp-Fe crystal) both F(T) and -T*S(T) from both and found
> them to be consistent!
>
> I am not sure what this means. TEMPS is the Mermin functional with the
electronic entropy correctly included.

>
> Thanks;
> Sabry
>
> On 05/15/2018 03:34 AM, Peter Blaha wrote:
> >
> > Thanks for the bug report in init_lapw.
> >
> > Please note: when the temperature (broadening) is set to zero, it will
> > use automatically "room temperature" (0.0018 Ry).
> >
> > On 05/15/2018 06:40 AM, Gavin Abo wrote:
> >> I think you found a bug in init_lapw.  The fix seems like it should
> >> be simple though.  On line 498 in the init_lapw script in the sed
> >> command, it looks like $fermit just needs changed to $fermits.
> >>
> >> I made a patch file called init_lapw.patch [
> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
> com_gsabo_WIEN2k-2DPatches_tree_master_17.1&d=DwIGaQ&c=
> yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_
> T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QWFxBxDVokCVrWNwIw0tPvBInPWUpw
> TiF5I7NxLxYpY&s=4eJpf4P5rc-owCyY2z0A6f4LwLXfyV53RoirzxKM0Ng&e= ], which
> you
> >> should be able to apply and try simply using:
> >>
> >> username@computername:~/Desktop$ cd $WIENROOT
> >> username@computername:~/WIEN2k$ wget
> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.
> githubusercontent.com_gsabo_WIEN2k-2DPatches_master_17.1_
> init-5Flapw.patch&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNX
> t_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=
> QWFxBxDVokCVrWNwIw0tPvBInPWUpwTiF5I7NxLxYpY&s=JTU0K_
> FuSjQMbKJ3T_PkRcYRnJeSFWlJ4r-I9glbang&e=
> >> username@computername:~/WIEN2k$ patch -b init_lapw init_lapw.patch
> >> patching file init_lapw
> >>
> >> Maybe F is the :ENE (TOTAL ENERGY) in case.scf.
> >>
> >> I tried following what a previous user did [
> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.
> mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_
> msg10319.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_
> T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QWFxBxDVokCVrWNwIw0tPvBInPWUpw
> TiF5I7NxLxYpY&s=RrAVLEV5tqysZLt_rsnLOkoND5UV7q-Ef1ZnXC3d0yk&e=
> >> ] but with a quick TiC calculation using run_lapw in WIEN2k 17.1:
> >>
> >> T = 1000 K = 0.00633 Ry
> >> init_lapw -b -fermits 0.00633
> >> TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.95041939
> >> TiC.output2:  Kb * T=   0.00633000
> >> TiC.output2:  -T*Entr   =  -0.00054181
> >>
> >> T = 0 K = 0.0 Ry
> >> init_lapw -b -fermits 0.0
> >> TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.94928338
> >> TiC.output2:  Kb * T=   0.0018
> >> TiC.output2:  -T*Entr   =  -0.5329
> >>
> >> F_1000K - F_0K = (E - T*S) - (E - 0) = -T*S = -1783.95041939 -
> >> (-1783.94928338) = -0.001136 => -T*S = -0.001136
> >>
> >> If -T*S divided by 2:
> >>
> >> -T*S = -0.001136/2 = - 0.000568 <- This seems reasonably cl

Re: [Wien] Finite temperature DFT: electronic free energy

2018-05-17 Thread Sabry Moustafa


(0) PROBLEM:
WIEN2k did not accept lage temperatures (>~4000 K). I always get this 
error "FERMI5 - Error" in the job error file. No complain in the 
init_lapw step; only after run_lapw finishes. Any help here?



(1) Thanks Blaha and Gavin for your help -- I tried it and worked fine. 
Gavin, please note that in Fermi-Dirac statistics the energy is 
temperature dependent. See for example Marzari's thesis (e.g., Fig 4.2):
http://theossrv1.epfl.ch/Main/Theses?action=download&upname=Marzari_thesis_1996.pdf 




(2) Actually, the "TOTAL ENERGY IN Ry" in case.scf is the free energy 
F(T); i.e., F(T)=E(T) - T*S(T). This is written explicitly in the UG, 
when talking about "TEMPS" (Sec. 7.8.3):

"The total energy is corrected by -TS ..."
So, E(T) can be obtained from F(T) and -T*S(T), i.e., E = F + TS.

(3) Since I am beginner and familiar more with VASP at this point, I 
checked (using hcp-Fe crystal) both F(T) and -T*S(T) from both and found 
them to be consistent!



Thanks;
Sabry

On 05/15/2018 03:34 AM, Peter Blaha wrote:


Thanks for the bug report in init_lapw.

Please note: when the temperature (broadening) is set to zero, it will 
use automatically "room temperature" (0.0018 Ry).


On 05/15/2018 06:40 AM, Gavin Abo wrote:
I think you found a bug in init_lapw.  The fix seems like it should 
be simple though.  On line 498 in the init_lapw script in the sed 
command, it looks like $fermit just needs changed to $fermits.


I made a patch file called init_lapw.patch [ 
https://github.com/gsabo/WIEN2k-Patches/tree/master/17.1 ], which you 
should be able to apply and try simply using:


username@computername:~/Desktop$ cd $WIENROOT
username@computername:~/WIEN2k$ wget 
https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/init_lapw.patch

username@computername:~/WIEN2k$ patch -b init_lapw init_lapw.patch
patching file init_lapw

Maybe F is the :ENE (TOTAL ENERGY) in case.scf.

I tried following what a previous user did [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html 
] but with a quick TiC calculation using run_lapw in WIEN2k 17.1:


T = 1000 K = 0.00633 Ry
init_lapw -b -fermits 0.00633
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.95041939
TiC.output2:  Kb * T    =   0.00633000
TiC.output2:  -T*Entr   =  -0.00054181

T = 0 K = 0.0 Ry
init_lapw -b -fermits 0.0
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry = -1783.94928338
TiC.output2:  Kb * T    =   0.0018
TiC.output2:  -T*Entr   =  -0.5329

F_1000K - F_0K = (E - T*S) - (E - 0) = -T*S = -1783.95041939 - 
(-1783.94928338) = -0.001136 => -T*S = -0.001136


If -T*S divided by 2:

-T*S = -0.001136/2 = - 0.000568 <- This seems reasonably close to the 
above -0.00054181 for T = 1000 K.


As I recall, the -T*S term was doubled in WIEN2k versions after 2014 
[ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html 
].


Though, there may be a flaw in my above calculation.

On 5/14/2018 5:35 PM, Sabry Moustafa wrote:


Hi;

I am interested in the electronic free energy (F=E-TS) using the 
finite temperature DFT using Fermi-Dirac statistics (i.e., Mermin's 
extension to 0 K DFT) -- i.e., I am not just looking for Fermi-Dirac 
as a broadening/smearing technique. So,how this can be done in WIEN2k?


It looks like I have to define "-fermits X" in the init_lapw command 
(where X= kT, in Ry). But when I did (T=1000K in my case):


init_lapw -b -fermits 0.00633

I got "fermit: Undefined variable." at the end. This is fixed though 
when defined fermit as well:


init_lapw -b -fermit 0.00633 -fermits 0.00633

So, do I have to define both?


Also, where can I find this "free energy F". It does not seem to be 
the "TOTAL ENERGY" in case.scf. Seems like I need to add this "TOTAL 
ENERGY" (E) to "-T*Entr" (-TS) in case.output2 file to get F?



Thanks ;

Sabry


:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-: 



Sabry G. Moustafa, Ph.D.
Department of Chemical and Biological Engineering,
University at Buffalo, The State University of New York.
511 Furnas Hall
Buffalo, NY 14260-4200
716-645-1186 (office)
716-239-8543 (cell)

E-mail: sabry...@buffalo.edu 



___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at: 
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html






___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Problems when trying to plot E vs c/a

2018-05-17 Thread Fecher, Gerhard
Hallo Peter,
thanks for the files.
unforunately, the otimize.pl still doesn't show the result of the fit (plot is 
there)
output is in a shortened version:

Fit of:  E = a1 + a2*x + a3*x^2 + a4*x^3 + a5*x^4
a1  1.000 
a2  0.000  1.000 
a3 -0.725 -0.000  1.000 
a4 -0.000 -0.930  0.000  1.000 
a5  0.648  0.000 -0.985 -0.000  1.000 

the line 174 should contain at least   tail -15(instead of -5)what 
results in the output of the parameters and the correlation matrix 

Fit of:  E = a1 + a2*x + a3*x^2 + a4*x^3 + a5*x^4
Final set of parametersAsymptotic Standard Error
=====
a1  = -5573.9  +/- 3.634e-06(6.519e-08%)
a2  = 4.23124e-06  +/- 9.205e-06(217.5%)
a3  = 0.000137795  +/- 2.93e-05 (21.26%)
a4  = 7.61902e-06  +/- 1.037e-05(136.1%)
a5  = -1.43164e-05 +/- 2.725e-05(190.3%)

correlation matrix of the fit parameters:
a1 a2 a3 a4 a5 
a1  1.000 
a2  0.000  1.000 
a3 -0.725 -0.000  1.000 
a4 -0.000 -0.930  0.000  1.000 
a5  0.648  0.000 -0.985 -0.000  1.000

or shorter versuion is to use  tail -15 fit.log  | head -7   because I don't 
think that the correlation matrix is needed in the w2web output (it's found in 
fit.log anyway)
the result is then only
 
Fit of:  E = a1 + a2*x + a3*x^2 + a4*x^3 + a5*x^4
Final set of parametersAsymptotic Standard Error
=====
a1  = -5573.9  +/- 3.634e-06(6.519e-08%)
a2  = 4.23124e-06  +/- 9.205e-06(217.5%)
a3  = 0.000137795  +/- 2.93e-05 (21.26%)
a4  = 7.61902e-06  +/- 1.037e-05(136.1%)
a5  = -1.43164e-05 +/- 2.725e-05(190.3%)

the optimize.pl file changed in the latter way is attached


Ciao
Gerhard

DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."


Dr. Gerhard H. Fecher
Institut of Inorganic and Analytical Chemistry
Johannes Gutenberg - University
55099 Mainz
and
Max Planck Institute for Chemical Physics of Solids
01187 Dresden

Von: Wien [wien-boun...@zeus.theochem.tuwien.ac.at] im Auftrag von Peter Blaha 
[pbl...@theochem.tuwien.ac.at]
Gesendet: Donnerstag, 17. Mai 2018 12:32
An: wien@zeus.theochem.tuwien.ac.at
Betreff: Re: [Wien] Problems when trying to plot E vs c/a

Thanks for the report.

Modified   eplot_lapw
and
SRC_w2web/htdocs/exec/optimize.pl

attached.

On 05/16/2018 04:20 PM, Fecher, Gerhard wrote:
> Dear c/a fitters,
> This concerns the latest Wien2k version
> I receive only the content of
> test_opt.analysis
> when I try with w2web to plot E vs c/a
> but neither the result of the fit nor the plot are shown,
> this seems to be a problem with the present version of the
>  eplot
> script
>
> when I use the eplot script of version 14.2 it is nearly ok, however,
> there are still two issues: instead of the result of the fit, the 
> "correlation matrix of the fit parameters" is shown
> and the figure is missing.
> Reason is that eplot and optimize.pl do not work well together:
>   optimize.pl
> prints the last 5 lines of fit.log (but the result is before these lines) and 
> expects the graph as case.c_over_a.png (but has a different name .coa.)
>
> this can be solved by changing the two lines
> line 169change "CASE.c_over_a.png"
>   $umps = qx(cp $DIR/$CASE.coa.png $tempdir/$SID-$$.png);
> line 173change "tail -5"
>   $OUT .= qx(cd $DIR;echo '  ';echo "Fit of:  E = a1 + a2*x + a3*x^2 
> + a4*x^3 + a5*x^4";tail -15 fit.log);
>
> or indeed, by changing eplot (I just did not find fast how to supress the 
> output of the correlation matrix)
>
> It would also nice to have the minimum (should be prepared by findmincoa 
> called in eplot) in the fit.log and w2web output.
>
>
>
> Ciao
> Gerhard
>
> DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
> "I think the problem, to be quite honest with you,
> is that you have never actually known what the question is."
>
> 
> Dr. Gerhard H. Fecher
> Institut of Inorganic and Analytical Chemistry
> Johannes Gutenberg - University
> 55099 Mainz
> and
> Max Planck Institute for Chemical Physics of Solids
> 01187 Dresden
> 
> Von: Wien [wien-boun...@zeus.theochem.tuwien.ac.at] im Auftrag von Gavin Abo 
> [gs...@crimson.ua.edu]
> Gesendet: Dienstag, 15. Mai 2018 06:40
> An: wien@zeus.theochem.tuwien.ac.at
> Betreff: Re: [Wien] Finite temperature DFT: electronic free energy
>
> I think you found a bug in init_lapw.  The 

Re: [Wien] Problems when trying to plot E vs c/a

2018-05-17 Thread Peter Blaha

Thanks for the report.

Modified   eplot_lapw
and
SRC_w2web/htdocs/exec/optimize.pl

attached.

On 05/16/2018 04:20 PM, Fecher, Gerhard wrote:

Dear c/a fitters,
This concerns the latest Wien2k version
I receive only the content of
test_opt.analysis
when I try with w2web to plot E vs c/a
but neither the result of the fit nor the plot are shown,
this seems to be a problem with the present version of the
 eplot
script

when I use the eplot script of version 14.2 it is nearly ok, however,
there are still two issues: instead of the result of the fit, the "correlation 
matrix of the fit parameters" is shown
and the figure is missing.
Reason is that eplot and optimize.pl do not work well together:
  optimize.pl
prints the last 5 lines of fit.log (but the result is before these lines) and 
expects the graph as case.c_over_a.png (but has a different name .coa.)

this can be solved by changing the two lines
line 169change "CASE.c_over_a.png"
$umps = qx(cp $DIR/$CASE.coa.png $tempdir/$SID-$$.png);
line 173change "tail -5"
$OUT .= qx(cd $DIR;echo '  ';echo "Fit of:  E = a1 + a2*x + a3*x^2 + 
a4*x^3 + a5*x^4";tail -15 fit.log);

or indeed, by changing eplot (I just did not find fast how to supress the 
output of the correlation matrix)

It would also nice to have the minimum (should be prepared by findmincoa called 
in eplot) in the fit.log and w2web output.



Ciao
Gerhard

DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."


Dr. Gerhard H. Fecher
Institut of Inorganic and Analytical Chemistry
Johannes Gutenberg - University
55099 Mainz
and
Max Planck Institute for Chemical Physics of Solids
01187 Dresden

Von: Wien [wien-boun...@zeus.theochem.tuwien.ac.at] im Auftrag von Gavin Abo 
[gs...@crimson.ua.edu]
Gesendet: Dienstag, 15. Mai 2018 06:40
An: wien@zeus.theochem.tuwien.ac.at
Betreff: Re: [Wien] Finite temperature DFT: electronic free energy

I think you found a bug in init_lapw.  The fix seems like it should be simple 
though.  On line 498 in the init_lapw script in the sed command, it looks like 
$fermit just needs changed to $fermits.

I made a patch file called init_lapw.patch [ 
https://github.com/gsabo/WIEN2k-Patches/tree/master/17.1 ], which you should be 
able to apply and try simply using:

username@computername:~/Desktop$ cd $WIENROOT
username@computername:~/WIEN2k$ wget 
https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/init_lapw.patch
username@computername:~/WIEN2k$ patch -b init_lapw init_lapw.patch
patching file init_lapw

Maybe F is the :ENE (TOTAL ENERGY) in case.scf.

I tried following what a previous user did [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html ] 
but with a quick TiC calculation using run_lapw in WIEN2k 17.1:

T = 1000 K = 0.00633 Ry
init_lapw -b -fermits 0.00633
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry =-1783.95041939
TiC.output2:  Kb * T=   0.00633000
TiC.output2:  -T*Entr   =  -0.00054181

T = 0 K = 0.0 Ry
init_lapw -b -fermits 0.0
TiC.scf::ENE  : ** TOTAL ENERGY IN Ry =-1783.94928338
TiC.output2:  Kb * T=   0.0018
TiC.output2:  -T*Entr   =  -0.5329

F_1000K - F_0K = (E - T*S) - (E - 0) = -T*S = -1783.95041939 - (-1783.94928338) = 
-0.001136 => -T*S = -0.001136

If -T*S divided by 2:

-T*S = -0.001136/2 = - 0.000568 <- This seems reasonably close to the above 
-0.00054181 for T = 1000 K.

As I recall, the -T*S term was doubled in WIEN2k versions after 2014 [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg10319.html ].

Though, there may be a flaw in my above calculation.

On 5/14/2018 5:35 PM, Sabry Moustafa wrote:

Hi;

I am interested in the electronic free energy (F=E-TS) using the finite 
temperature DFT using Fermi-Dirac statistics (i.e., Mermin's extension to 0 K 
DFT) -- i.e., I am not just looking for Fermi-Dirac as a broadening/smearing 
technique. So,how this can be done in WIEN2k?

It looks like I have to define "-fermits X" in the init_lapw command (where X= 
kT, in Ry). But when I did (T=1000K in my case):

init_lapw -b -fermits 0.00633

I got "fermit: Undefined variable." at the end. This is fixed though when 
defined fermit as well:

init_lapw -b -fermit 0.00633 -fermits 0.00633

So, do I have to define both?


Also, where can I find this "free energy F". It does not seem to be the "TOTAL ENERGY" in case.scf. 
Seems like I need to add this "TOTAL ENERGY" (E) to "-T*Entr" (-TS) in case.output2 file to get F?


Thanks ;

Sabry

:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
Sabry G. Moustafa, Ph.D.
Department of Chemical and Biological Engineering,
University at Buffalo, The State University of New York.
511 Furnas H

Re: [Wien] error in symmetry step (not seen by sgroup)

2018-05-17 Thread Peter Blaha

Probably the same change should be made there.

One problem: It could be that for some weired structures this lower tol 
value leads to other problems 


On 05/17/2018 10:59 AM, Gavin Abo wrote:
In WIEN2k 17.1, is tol=1.e-3 in SRC_symmetso/symmetso.f on line 110 okay 
or does the same change need to be made too?  Thanks in advance.


On 5/15/2018 11:43 AM, Peter Blaha wrote:

Of course the error occurs always, also when running   x symmetry.
In init_lapw in batch mode, the error is catched automatically and 
init stops, while in the step-by-step initialization you are supposed 
to examine case.outputs by yourself and find the problem on your own.


Just check the case.outputs file.

The problem is that this site has "almost"  C3v symmetry and not only 
C3i. The mirror planes and C2 operations are only slightly invalid and 
the test in symmetry was not accurate enough.


Edit symmetry.f in SRC_symmetry and search for "tol".

Change the value of tol from 1.d-3 to 1.d-4:

  tol=1.e-3    -->    tol=1.e-4

and recompile.

Thanks for reporting the problem.


___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


--

  P.Blaha
--
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300 FAX: +43-1-58801-165982
Email: bl...@theochem.tuwien.ac.atWIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at/TC_Blaha
--
___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] error in symmetry step (not seen by sgroup)

2018-05-17 Thread Gavin Abo
In WIEN2k 17.1, is tol=1.e-3 in SRC_symmetso/symmetso.f on line 110 okay 
or does the same change need to be made too?  Thanks in advance.


On 5/15/2018 11:43 AM, Peter Blaha wrote:

Of course the error occurs always, also when running   x symmetry.
In init_lapw in batch mode, the error is catched automatically and 
init stops, while in the step-by-step initialization you are supposed 
to examine case.outputs by yourself and find the problem on your own.


Just check the case.outputs file.

The problem is that this site has "almost"  C3v symmetry and not only 
C3i. The mirror planes and C2 operations are only slightly invalid and 
the test in symmetry was not accurate enough.


Edit symmetry.f in SRC_symmetry and search for "tol".

Change the value of tol from 1.d-3 to 1.d-4:

  tol=1.e-3    -->    tol=1.e-4

and recompile.

Thanks for reporting the problem.


___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html