JDFTx  1.0.0
Ionic minimization of a water molecule
water-200.png

Electronic minimization is a good first step, but you probably want to optimize the geometry of the water molecule. To turn on ionic minimization, add something similar to the following lines to your water.in:

#Ionic minimization:
ionic-minimize \
    nIterations 10 \
    energyDiffThreshold 1e-6 \
    knormThreshold 1e-4  #Threshold on RMS cartesian force

Now, rerun jdftx.

Once your new water calculation has finished, you can visualize the ionic minimize steps. To do this, locate the "scripts" directory of JDFTx, and look inside. This directory contains tools for postprocessing, for example. createXSF is one such script- this creates an XcrySDen structure file from JDFTx output, which can be viewed in a visualization program such as VESTA or XcrySDen.

Run: [path to scripts]/createXSF water.out water.axsf Animated

Now open XcrySDen, for instance, and open the water.axsf. You should be able to click through a number of slides corresponding to the geometry optimization steps. To visualize the water molecule as a molecule, rather than at the corners of the box, change the unit of repetition (Display -> Unit of Repetition -> Translational asymmetric unit)

Look through the beginning of the output file for various defaults that you might want to tweak next. Here follow some of the most likely candidates:

elec-ex-corr hyb-PBE0  # Why not mix in exact exchange? (gga-PBE by default)
elec-cutoff 30.0      # Plane-wave cutoff in Hartrees (20 by default)
wavefunction LCAO     # Initialize state from atomic orbitals (random by default)

#Customize electronic minimization:
electronic-minimize \
    nIterations 50 \
    energyDiffThreshold 1e-8  # who needs 16 digits?

dump End State            # Output wavefunctions etc. at end of run
dump-name water.$VAR      # with filenames water.wfns etc
initial-state water.$VAR  # and perhaps use them to start the next run