[Pw_forum] Problems with CPMD Program

Amos Leffler amos at errno.com
Tue Oct 23 06:47:04 CEST 2007


Dear Forum,
      I am having trouble running the first stage of the CPMD program 
for CO.  I should state that I was able to run the example21 program 
successfully so I know the compilation was successful.
I copied the input for that program and made what I think are the proper 
changes to run CO using the INPUT_HOWTO file.
The output is shown below.
 

/home/amos/Desktop/espresso-3.2/examples/example40 : starting

This example shows how to use cp.x to perform molecular dynamics
simulation of medium to large systems.

 executables directory: /home/amos/Desktop/espresso-3.2/bin
 pseudo directory:      /home/amos/Desktop/espresso-3.2/pseudo
 temporary directory:   /home/amos/tmp
 checking that needed directories and files exist... done

 running cp.x as:  /home/amos/Desktop/espresso-3.2/bin/cp.x

 cleaning /home/amos/tmp... done

/home/amos/Desktop/espresso-3.2/examples/example40 : done

where example40 is a new example.  Note that the program simply ignores 
all of the input data and terminates.  It should be noted that line 69 
had to be changed to FPMD_COMMAND
from  CP_COMMAND to get the "running cp.x to give an output.
      Hopefully someone will see something missing or incorrect.
                                                                        
  With thanks
                                                                        
  Amos Leffler

                                                                  
        unaffiliated

------------------------------------------------------------------------
CPMD Input File

#!/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 use cp.x to perform molecular dynamics"
$ECHO "simulation of medium to large systems."

# set the needed environment variables 
. ../environment_variables

# required executables and pseudopotentials
BIN_LIST="cp.x"
PSEUDO_LIST="O.pz-rrkjus.UPF C.pz-vbc.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 "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
        $ECHO "Aborting"
        exit 1
    fi
done
$ECHO " done"

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

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

# molecular dynamics calculation
cat > co-14.in << EOF
 &control
    title = ' CO 14 molecules ',
    calculation = 'cp',
    restart_mode = 'from_scratch', ! 'restart',
    ndr = 50,
    ndw = -1,
    nstep  = 10,
    iprint = 10, 
    isave  = 100,
    tstress = .TRUE.,
    tprnfor = .TRUE.,
    dt    = 5.0d0,
    etot_conv_thr = 1.d-8,
    prefix = 'cp',
    pseudo_dir='$PSEUDO_DIR/',
    outdir='$TMP_DIR/',
 /
 &system
    ibrav = 2, 
    celldm(1) = 6.244, 
    celldm(2) = 0.0, 
    celldm(3) = 0.0, 
    celldm(4) = 0.0, 
    celldm(5) = 0.0, 
    celldm(6) = 0.0, 
    nat = 28,
    ntyp = 2,
    nbnd = 70,
    nelec = 140,
    ecutwfc = 40.0,
    ecfixed = 68.0,
    qcutz = 68.0,
    q2sigma = 8.0,
    xc_type = 'PZ',
 /
 &electrons
    emass = 400.d0,
    emass_cutoff = 2.5d0,
    orthogonalization = 'ortho',
    ortho_eps = 5.d-8,
    ortho_max = 20,
    electron_dynamics = 'sd',
    electron_velocities = 'zero',
    electron_temperature = 'not_controlled',
    TFOR=.false,
    TNOSEP=.false,
    DELTAT=10,
    EMAEC=2,
    FRICE=0.05,
 /
 &ions
    ion_dynamics = 'none',
!    ion_radius(1) = 0.8d0,
!    ion_radius(2) = 0.5d0,
!    ion_velocities = 'zero',
    ion_temperature = 'not_controlled'
 /
 &cell
    cell_dynamics = 'none',
    cell_velocities = 'zero',
    press = 0.0d0,
    wmass = 70000.0d0
 /
ATOMIC_SPECIES
C  12.0d0   C.pz-vbc.UPF 
O  16.0d0   O.pz-rrkjus.UPF
 
 	ATOMIC_POSITIONS  (Angstroms)
	C	-0.307	-0.307	-0.307
	C	 5.323	-0.307	-0.307
	C	-0.307	 5.323	-0.307	
	C	 5.323	 5.323	-0.307
	C	-0.307	-0.307	 5.323
	C	 5.323	-0.307	 5.323
	C	-0.307	 5.323	 5.323
	C	 5.323	 5.323	 5.323
	C	 3.122	 0.307	 2.815
	C	 3.122	 5.937	 2.815
	C	 0.307	 2.508   3.122
	C	 5.937	 2.508   3.122
	C	 2.508	 2.508   5.937
	C	 2.508	 2.508	 0.307
	O        0.307	 0.307	 0.307
	O	 5.937	 0.307	 0.307
	O	 0.307	 5.937	 0.307
	O	 5.937	 5.937	 0.307
	O	 0.307	 0.307	 5.937
	O	 5.937	 0.307	 5.937
	O	 0.307	 5.937	 5.937
	O	 5.937	 5.937	 5.937
	O	 2.508	-0.307   3.122
	O	 2.508	 5.323	 3.122
	O 	-0.307	 3.122	 2.508
	O	 5.937	 3.122	 2.508
	O	 3.122	 3.122	 5.323
	O	 3.122	 3.122	-0.307
EOF

$ECHO
$ECHO "$EXAMPLE_DIR : done"




More information about the users mailing list