shankar1729 / jdftx

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

How to improve computing speed and fixed potential #276

Closed fanfan0511 closed 10 months ago

fanfan0511 commented 1 year ago

Dear Shankar,

I tried to calculate fixed potential,I'm currently working on the first vacuum calculation,But it takes a long time. It has been calculated for a week but the calculation has not been completed. The following is my input, output and configuration file. May I ask if some of my parameters were set incorrectly? Or is it just the way it is? Is there any way to improve the speed of calculation? Looking forward to your reply. Thank you very much. Calculation file.zip

shankar1729 commented 1 year ago

You are running a calculation with nStates = 2 on 48 processes. This will lead to only 2 cores being used. See the Getting Started page for more details on this.

You seem to have 12 cores/node. So run with 2 processes, on eon each node, with 12 threads each. In SLURM, this would be -n 2 -c 12 , and you can adapt this to other job submission systems / plain mpirun.

Best, Shankar

fanfan0511 commented 1 year ago

Dear Shankar, Thank you very much for your answer. I also want to confirm with you whether the input file parameters set are reasonable. Another question I would like to ask you is that the task will start from the beginning after I modify the submission file. I saw that setting initial-state parameter in the tutorial could make the calculation continue, but it could not continue after my test. There is no corresponding wave function shown in the output file. May I ask how I can correct this problem? Looking forward to your reply. Thank you very much Calculation file.zip

shankar1729 commented 1 year ago

The calculation parameters seem fine to me, but you may want to consider using coulomb truncation in Slab mode as detailed in the Surface tutorials for better accuracy.

You should not specify wavefunction lcao if you want to use initial-state. Additionally, your calculation did not produce a wavefunction file because it did not reach the first time dump is initiated. If you want to checkpoint every few electronic steps, use dump Electronic State along with dump-frequency Electronic 5, e.g. to output every 5 SCF cycles / minimize steps.

Best, Shankar

fanfan0511 commented 1 year ago

Dear Shankar, Thank you very much for your answer. Now I have several questions to ask you:

  1. According to what you said above, I tried to add coulomb truncation, but there was an error in the operation. I don't quite understand how to correct this error, may I ask how to correct this problem? coulomb is my input/output file. In addition, I also modified my submitted task file to improve the speed of calculation. Thank you very much for your advice.
  2. The configuration I am currently using has been optimized from VASP, so is it reasonable for me to turn off geometric optimization when performing vacuum, solvation and constant-potential calculation? Will this speed up my calculation? Because I want to calculate the potentiostat eventually, according to the tutorial, I need to finish the calculation under vacuum and solvation conditions before I calculate the potentiostat. I don't know whether my understanding is correct?
  3. I added the following parameters according to what you said: wavefunction, lcaoinitial-state, dump Electronic State, dump-frequency Electronic 5. But displaying dump-frequency while calculating is not a valid command. So I changed it to dump-interval Electronic 5 and it worked. However, when I terminate the program and want to continue the operation, it still shows that your calculation has not generated the wave function file. I don't know why this is? The I/O files are in the initial package. Sorry to bother you again. Looking forward to your reply. Thank you very much! coulomb.zip initial.zip
shankar1729 commented 1 year ago

Please see the tutorials that talk about setting up geometries for molecules, slabs etc. You need to pick the embed center to be consistent with the atom positions you specified, so that periodicity is broken at the correct place. The error message you get is telling you that your current choice of the embed center is effectively slicing the unit cell too close to atoms.

You can get a quick estimate by fixing the geometry, but this will of course neglect charge and potential-dependent changes in adsorbate geometry than can be important in electrochemistry. That is one of the key needs for GC-DFT, so you may want to eventually update all the geometries self-consistently.

That's right: it is dump-interval, not dump-frequency. That part worked fine. Your subsequent run input has both initial-state and wavefunction commands. Drop the latter, if you want to use initial-state.

Best, Shankar