[QE-users] Energy of isolated atom of CaO

Pooja Vyas poojavyas595 at gmail.com
Fri Jun 26 08:39:59 CEST 2020


I also tried to compute separate isolated energies for Ca and O
(example05/PW). For Ca, I used the following script, But I face an error
"strange occupations: number of electrons from occupations is wrong."

#!/bin/sh

# run from directory where this script is
cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname
EXAMPLE_DIR=`pwd`

# check whether echo has the -e option
if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi

$ECHO
$ECHO "$EXAMPLE_DIR : starting"
$ECHO
$ECHO "This example shows how to calculate the total energy of an isolated"
$ECHO "atom in a supercell with fixed occupations."
$ECHO "Energy of Ca"

# set the needed environment variables
. ../../../environment_variables

# required executables and pseudopotentials
BIN_LIST="pw.x"
PSEUDO_LIST=" Ca.pbe-nsp-van.UPF"

$ECHO
$ECHO "  executables directory: $BIN_DIR"
$ECHO "  pseudo directory:      $PSEUDO_DIR"
$ECHO "  temporary directory:   $TMP_DIR"
$ECHO "  checking that needed directories and files exist...\c"

# check for directories
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
    if test ! -d $DIR ; then
        $ECHO
        $ECHO "ERROR: $DIR not existent or not a directory"
        $ECHO "Aborting"
        exit 1
    fi
done
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
    if test ! -d $DIR ; then
        mkdir $DIR
    fi
done
cd $EXAMPLE_DIR/results

# check for executables
for FILE in $BIN_LIST ; do
    if test ! -x $BIN_DIR/$FILE ; then
        $ECHO
        $ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
        $ECHO "Aborting"
        exit 1
    fi
done

# check for pseudopotentials
for FILE in $PSEUDO_LIST ; do
    if test ! -r $PSEUDO_DIR/$FILE ; then
       $ECHO
       $ECHO "Downloading $FILE to $PSEUDO_DIR...\c"
            $WGET $PSEUDO_DIR/$FILE $NETWORK_PSEUDO/$FILE 2> /dev/null
    fi
    if test $? != 0; then
        $ECHO
        $ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
        $ECHO "Aborting"
        exit 1
    fi
done
$ECHO " done"

# how to run executables
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
$ECHO
$ECHO "  running pw.x as: $PW_COMMAND"
$ECHO

# self-consistent calculation for isolated Ca atom
cat > Ca.in << EOF
 &control
    calculation='scf',
    restart_mode='from_scratch',
    pseudo_dir='$PSEUDO_DIR/'
    outdir='$TMP_DIR/'
 /
 &system
   ibrav=1,
   celldm(1)=24.0,
   nat=1,
   ntyp=1,
   nbnd=12,
   nosym=.true.,
   ecutwfc=100.0,
   occupations='from_input',
 /
 &electrons
   mixing_beta=0.7,
   conv_thr=1.0E-8,
 /
ATOMIC_SPECIES
Ca     40.078    Ca.pbe-nsp-van.UPF
ATOMIC_POSITIONS
Ca      0.0   0.0     0.0
K_POINTS  Gamma

OCCUPATIONS
2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
EOF
$ECHO "  running self-consistent calculation for Al atom...\c"
$PW_COMMAND < Ca.in > Ca.out
check_failure $?
$ECHO " done"



# clean TMP_DIR
$ECHO "  cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/pwscf*
$ECHO " done"


$ECHO
$ECHO "$EXAMPLE_DIR: done"

Can anyone suggest how should the occupation number be written in above
case?
Thanks and regards.

On Fri, Jun 26, 2020 at 11:58 AM Pietro Delugas <pdelugas at sissa.it> wrote:

> Hello
>
>
>
> In ATOMIC_POSITIONS  you need to specify the units that you are  using for
> the coordinates, if you don’t put anything he program assumes alat units
> and puts the 2 atoms very far apart.
>
>
>
> If you actually wanted  compute the two separated atoms specifying
> startingwfc=’random’ in the &electrons name list may help.  In this case I
> would also chose calculation=’scf’ in &control.
>
>
>
> Regards - Pietro
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Pooja Vyas <poojavyas595 at gmail.com>
> *Sent: *Friday, June 26, 2020 8:12 AM
> *To: *Quantum ESPRESSO users Forum <users at lists.quantum-espresso.org>
> *Subject: *[QE-users] Energy of isolated atom of CaO
>
>
>
> Dear users,
>
> I want to calculate cohesive energy of CaO. I'm using cluster_example/PW
> which uses assume_isolated = 'martyna_tuckerman' . Following is my input
> script:
>
>
>
> #!/bin/sh
> for a in 30
> do
> cat > ${a}.in << EOF
> &CONTROL
>   calculation  = 'relax'
>   prefix       = "${a}",
>   pseudo_dir   = "/home/user/pv/cohesive/pseudo/",
>   outdir       = "/home/user/pv/cohesive/",
> /
> &SYSTEM
>   ibrav     = 1,
>   celldm(1) = $a,
>   nat       = 2,
>   ntyp      = 2,
>   ecutwfc   = 100.D0,
>   assume_isolated = 'martyna-tuckerman'
> /
> &ELECTRONS
>   conv_thr    = 1.D-8,
>   mixing_beta = 0.7D0,
> /
> &IONS
> /
> ATOMIC_SPECIES
> Ca  40.078  Ca.pbe-nsp-van.UPF
> O  15.999  O.pbe-van_ak.UPF
> ATOMIC_POSITIONS
> Ca 0.0 0.0 0.0
> O  0.5 0.5 0.5
> K_POINTS Gamma
>
> EOF
>
> mpirun -np 40 -machinefile x1 /apps/codes/qe/6.4/bin/pw.x < ${a}.in >
> ${a}.out
> done
> done
>
>
>
> My lattice constant is around 8 a.u , so I assumed the box size to be 3
> times of it. But when I run the script, the convergence was not achieved
> even after 100 iterations. Then I tried to take small box size of about 16
> bohr. That too didn't work. Then I even tried reducing ecutwfc and
> mixing_beta..but same error was obtained. Can anyone suggest what can I do
> to resolve the issue?
>
> Any kind of help is appreciated.
>
> Thanks and regards.
>
>
> _______________________________________________
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
> users mailing list users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20200626/91a34efe/attachment.html>


More information about the users mailing list