shankar1729 / jdftx

JDFTx: software for joint density functional theory
http://jdftx.org
79 stars 49 forks source link

Initializing wave functions, file read err #295

Closed Rriccooo closed 6 months ago

Rriccooo commented 10 months ago

When I was calculating a system in solution environment using CANDLE, there was an err in sol.out:

Initializing wave functions: reading from 'pt1_vac.wfns' Length of 'pt1_vac.wfns' was 64394240 instead of the expected 254835200 bytes. Hint: Did you specify the correct nBandsOld, EcutOld and kdepOld?

However, the length of 'pt1_vac.wfns' is 62885, but not 64394240 , I am very confused by this. And these input files works well for small molecules and graphene or doped graphene, but when I applied those file for nanotube(with adjusted parameters), this err showed up, and I don't know why it happens.

And when I calculate potential dependent part, it works well, but it should also read 'pt1_sol.wfns' , but there is no such file exist because of the previous error, so I feel even more confused.

Can you help me to explain this ? I will be really appreciate for your help!

shankar1729 commented 10 months ago

Are you running different calculations in the same directory keeping the dump-name and initial-state the same? Most likely you are getting a situation where you are trying to read the molecule wavefunction for a nanotube calculation etc.

As for the file length, 64394240 bytes happens to be 62885 kilobytes, so the tool you used to check the file size must be reporting it in kilobytes.

Best, Shankar

Rriccooo commented 8 months ago

Hi Shankar,

Thanks for your reply!

I kind of understand the situation, it is caused by reducing k point under symmetry, and I close the symmetry, and applied KPOINTs with 111, it works, however, if I increase the number of KPOINTs, it will somehow reduce the KPOINT again leads to similar error, saying the length doesn't match, how can I fix the KPOINT and avoid the change of it? Thanks a lot!

Best wishes Ricco

Rriccooo commented 8 months ago

Hi Shankar I am also confused by this problem. When I dealed with the calculated energies listed in the bottom of output files (something concerned in the free energy tutorial), like ZPE, the vibrational energy {including Evib, TSvib and Avib}, it was difficult for me to distinguish the meaning of these energies between JDFTx and VASP. In VASP, Gibbs free energy △G =Etot+ZPE-TS, while in JDFTx, I don't know how to calculate it, △G =Etot+ZPE-TSvib or △G =Etot+Avib, or △G =Etot+Avib +Evib -TSvib, and why? I also feel confused by the meaning of 'the vibrational free energy' and ' vibrational energy'. And you have mentioned energy calculated by DFT codes are always electronic only, we need to calculate vibrations (or phonons for periodic systems) to get vibrational contributions. But how to compute this part? Looking forward for your reply. Thanks a lot! Best Regards, Ricco

Rriccooo commented 8 months ago

Sorry to bother you again. There is another question very confusing. I am now calculating a system with 230 atoms, basically nanotube, however, I find it runs very slow, I use KPOINT 113 and with z-spin, elec-cut 30, it runs for 48 hrs for act calculation and stopped, and I have to restart it take maybe another 48hrs to finish scf calculation. But when I apply KPOINT 111, no spin, elec-cut=20, it will run for less than 48hrs and finish both scf and solution environment calculations. Since I want to increase the accuracy of the calculation result, but also want to save time and resources, how can I improve it? Btw, if I increase the elec-cut=50, it just refuses to run and show 'stack error' . However, how can I confirm the energy I should chose for elec-cut, also the elec-smearing Gauss, is there an standard ? And if I really need to use elec-cut=50, what should I do to avoid the error? And why the parameters I changed for KPOINT and elec-cut and spin leads to such a large resource consumption? This is my script:

!/bin/sh

PBS -N test 

PBS -l walltime=48:00:00

PBS -l mem=1000gb

PBS -l ncpus=48

PBS -l wd

PBS -q hugemem

PBS -l storage=gdata/

module load openmpi/4.0.1 export PATH=/g/data/jdftx_app/jdftx-1.7.0/jdftx/build:/g/data/jdftx_app/jdftx-1.7.0/jdftx/scripts:$PATH   mpirun jdftx -i scf.in -o scf.out -d  sleep 5 mpirun jdftx -i sol.in -o sol.out -d  sleep 5 mpirun jdftx -i zpe.in -o zpe.out -d

shankar1729 commented 8 months ago

Most likely you are running many MPI processes without using threads correctly. Please see the Getting Started and frst Solids tutorial page on how to select the number of processes and threads.

alexfangsy commented 6 months ago

When I was calculating a system in solution environment using CANDLE, there was an err in jdftx.log: Initializing wave functions: reading from '4N-Mn-H-Res.wfns' For the wave function initialization section, my input-file reads like this: wavefunction lcao \ read 4N-Mn-H-Res.wfns

The result was miscalculated, and the explanation given is this: Command 'wavefunction' with command line: wavefunction lcao read 4N-Mn-H-Res.wfns failed with message: Extra arguments 'read 4N-Mn-H-Res.wfns' at end of command

I firmly believe that the command of wave function initialization is written in strict accordance with the official example, I do not know what is the problem.

Can you help me to explain this ? I will be really appreciate for your help!

shankar1729 commented 6 months ago

It should be either wavefunction lcao or wavefunction read filename to either use orbitals or the file. Your command is mixing both options.