-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding templates for running and getting V-scans; adjusting the E-fie…
…ld procedute
- Loading branch information
1 parent
9380965
commit 3038211
Showing
8 changed files
with
216 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
module load gcc/9.3.0 openmpi/4.0.3 cp2k/7.1-omp | ||
export OMP_NUM_THREADS=1 | ||
ulimit -s unlimited | ||
export ppath=/scratch/project_2003835/programs_KPFM | ||
export PYTHONPATH=$PYTHONPATH:$ppath/CP2k_mtools3:$ppath/DFT_gridIO3:$ppath/KPFM_FEM3:$ppath/KPFM_sim3 | ||
KPFM_GLOBAL_SCRIPTS=$ppath/KPFM_sim3/scripts | ||
|
||
# **************************************************************************************************** # | ||
# # | ||
# script for putting all the results from all the KPFM workers to be saved in the global results db # | ||
# # | ||
# **************************************************************************************************** # | ||
|
||
echo "start combining results from different workers" | ||
|
||
GR='glob_res/afm_copy.db' # adjust the global results name # | ||
bu=$GR | ||
bu+='.bak' | ||
|
||
echo $GR $bu | ||
|
||
cp $GR $bu | ||
|
||
# adjust the voltages, where it was calculated # | ||
vol="0.31 0.2 -0.2 -0.31 -2.0 -1.7 -1.5 -1.3 -1 -0.7 -0.5 -0.3 -0.1 -0.05 -0.01 0.01 0.05 0.1 0.3 0.5 0.7 1 1.3 1.5 1.7 2.0" | ||
vol+=" 1000.0" | ||
|
||
|
||
for i in {0..0}; # adjust amount of y points # | ||
do | ||
for j in {0..0}; # adjust amout of x points # | ||
do | ||
for vi in $vol; | ||
do | ||
ar=kpfm_res_$i | ||
ar+=_$j | ||
ar+=_$vi.db # adjust the input db file name(s) # | ||
echo $ar | ||
wr=worker_$i | ||
wr+=_$j | ||
wr+=_$vi | ||
python3 $KPFM_GLOBAL_SCRIPTS/copy_scan_points_and_wfn_files.py -i $ar -o $GR # -w $vi wfn_data # -k ## -k -- if kpts are necessary ## | ||
done | ||
done | ||
done | ||
|
||
echo "Done, done" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
|
||
## to creat input and running files for 2 tip-descents and multiple Voltages ## | ||
# first try whatever point (in this nomenclature it will be 0 0 )) # | ||
# to prepare files for the first y line then have - true - in the if # | ||
grdb=glob_res/kpfm.db | ||
#global results db file# | ||
cpdb=false | ||
# copy database # | ||
dbf="kpfm_res_" | ||
if true ; then | ||
b=0 | ||
Af=0 | ||
#Vf="2.0 1.7 1.5 1.3 1.0 0.7 0.5 0.3 -0.3 -0.5 -0.7 -1.0 -1.3 -1.5 -1.7 -2.0" | ||
Vf="1000.0 2.0 1.7 1.5 1.3 1 0.7 0.5 0.31 0.3 0.2 0.1 0.05 0.01 -0.01 -0.05 -0.1 -0.2 -0.3 -0.31 -0.5 -0.7 -1 -1.3 -1.5 -1.7 -2.0" | ||
for Vi in $Vf; do | ||
echo $b $Af $Vi | ||
y="`echo $b`"; | ||
x="`echo $Af`"; | ||
V="`echo $Vi`" | ||
#sed "s/BBB/$y/g" pdtt_V.template > pdtt.tmp ; | ||
#sed "s/AAA/$x/g" pdtt.tmp > pdtt_$b.$Af.tmp ; | ||
#sed "s/CCC/$V/g" pdtt_$b.$Af.tmp > pdtt_$b.$Af.$Vi.py; | ||
#rm pdtt.tmp pdtt_$b.$Af.tmp | ||
sed "s/BBB/$y/g" pdtt_V_run.template > pdtt_run.tmp ; | ||
sed "s/AAA/$x/g" pdtt_run.tmp > rw_$b.$Af.tmp ; | ||
sed "s/CCC/$V/g" rw_$b.$Af.tmp > rw_$b.$Af.$Vi.slrm; | ||
rm pdtt_run.tmp rw_$b.$Af.tmp | ||
if $cpdb; then | ||
tdbf=$dbf | ||
tdbf+=$b | ||
tdbf+=_$Af | ||
tdbf+=_$Vi | ||
tdbf+=.db | ||
echo $tdbf | ||
cp $grdb $tdbf | ||
fi | ||
done | ||
fi | ||
if false ; then | ||
b=0 | ||
Af=1 | ||
Vf="2.0 1.7 1.5 1.3 1.0 0.7 0.5 0.3 -0.3 -0.5 -0.7 -1.0 -1.3 -1.5 -1.7 -2.0" | ||
#Vf="2.0 1.7 1.5 1.3 0.7 0.5 0.3 -0.3 -0.5 -0.7 -1.3 -1.5 -1.7 -2.0" | ||
for Vi in $Vf; do | ||
echo $b $Af $Vi | ||
y="`echo $b`"; | ||
x="`echo $Af`"; | ||
V="`echo $Vi`" | ||
sed "s/BBB/$y/g" pdtt_V.template > pdtt.tmp ; | ||
sed "s/AAA/$x/g" pdtt.tmp > pdtt_$b.$Af.tmp ; | ||
sed "s/CCC/$V/g" pdtt_$b.$Af.tmp > pdtt_$b.$Af.$Vi.py; | ||
rm pdtt.tmp pdtt_$b.$Af.tmp | ||
sed "s/BBB/$y/g" pdtt_V_run.template > pdtt_run.tmp ; | ||
sed "s/AAA/$x/g" pdtt_run.tmp > rw_$b.$Af.tmp ; | ||
sed "s/CCC/$V/g" rw_$b.$Af.tmp > rw_$b.$Af.$Vi.slrm; | ||
rm pdtt_run.tmp rw_$b.$Af.tmp | ||
if $cpdb; then | ||
tdbf=$dbf | ||
tdbf+=$b | ||
tdbf+=_$Af | ||
tdbf+=_$Vi | ||
tdbf+=.db | ||
echo $tdbf | ||
cp $grdb $tdbf | ||
fi | ||
done | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# check modules.txt for updating following lines: # module purge | ||
#module load gcc/9.3.0 openmpi/4.0.3 cp2k/7.1-omp | ||
export OMP_NUM_THREADS=1 | ||
ulimit -s unlimited | ||
export ppath=./programs_KPFM # | ||
export PYTHONPATH=$PYTHONPATH:$ppath/CP2k_mtools3:$ppath/DFT_gridIO3:$ppath/KPFM_FEM3:$ppath/KPFM_sim3 #:$ppath/pycp2k | ||
export PYTHONPATH=$PYTHONPATH:/u/88/krejcio1/unix/WORK/lib_cp2k_copy/ | ||
KPFM_GLOBAL_SCRIPTS=$ppath/KPFM_sim3/scripts | ||
ORIG_DIR=`pwd` | ||
|
||
## after adjust the modules above and PYTHONPATH, this script will allow to get Mulliken charges from the descent tip scan (style metallic) with different voltage ## | ||
|
||
if true ; then | ||
y=0.0 ## adjust /x/ and /y/ as well as voltages /Vf/ <- for chanrges those which are lower than -100 and larges than +100 makes sense ## | ||
x=0.0 ## look at wiki for more details ## | ||
Vf="102.0 101.7 101.5 101.3 101.0 100.7 100.5 100.3 100.1 100.05 100.01 -100.01 -100.05 -100.01 -100.1 -100.3 -100.5 -100.7 -101.0 -101.3 -101.5 -101.7 -102.0" | ||
Vf+=" -100.31 -100.2 100.2 100.31 1000.0" | ||
for Vi in $Vf; do | ||
python3 $KPFM_GLOBAL_SCRIPTS/extract_descend_tip_charges.py -i glob_res/afm.db -p $x $y -V $Vi | ||
done | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# check modules.txt for updating following lines: # module purge | ||
#module load gcc/9.3.0 openmpi/4.0.3 cp2k/7.1-omp | ||
export OMP_NUM_THREADS=1 | ||
ulimit -s unlimited | ||
export ppath=./programs_KPFM # | ||
export PYTHONPATH=$PYTHONPATH:$ppath/CP2k_mtools3:$ppath/DFT_gridIO3:$ppath/KPFM_FEM3:$ppath/KPFM_sim3 #:$ppath/pycp2k | ||
export PYTHONPATH=$PYTHONPATH:/u/88/krejcio1/unix/WORK/lib_cp2k_copy/ | ||
KPFM_GLOBAL_SCRIPTS=$ppath/KPFM_sim3/scripts | ||
ORIG_DIR=`pwd` | ||
|
||
## after adjust the modules above and PYTHONPATH, this script will allow to get energies and forces (and also atomic forces) for predefined voltages in Vf ## | ||
|
||
if true ; then | ||
y=0.0 ## adjust /x/ and /y/ as well as voltages /Vf/ <- for chanrges those which are around 0 should be the most important (other left here for cross-checking) ## | ||
x=0.0 ## look at wiki for more details ## | ||
Vf="1000.0" | ||
Vf+=" -0.31 -0.2 0.2 0.31 -100.31 -100.2 100.2 100.31" | ||
Vf+=" 0.1 0.05 0.01 -0.01 -0.05 -0.1 100.1 100.05 100.01 -100.01 -100.05 -100.1" | ||
Vf+=" 102.0 101.7 101.5 101.3 101.0 100.7 100.5 100.3 -100.3 -100.5 -100.7 -101.0 -101.3 -101.5 -101.7 -102.0" | ||
Vf+=" 2.0 1.7 1.5 1.3 1.0 0.7 0.5 0.3 -0.3 -0.5 -0.7 -1.0 -1.3 -1.5 -1.7 -2.0" | ||
for Vi in $Vf; do | ||
echo "x y V:" $x $y $Vi | ||
python3 $KPFM_GLOBAL_SCRIPTS/extract_descend_tip_data.py -i glob_res/afm.db -p $x $y -V $Vi -n -N # -n -- no atomic forces -N -- no geometry | ||
done | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
## to creat input and running files for 2 tip-descents with different voltages ## | ||
# first try whatever point (in this nomenclature it will be 0 0 )) # | ||
# to prepare files for the first y line then have - true - in the if # | ||
if true ; then | ||
b=0 | ||
Af=0 | ||
Vf="1000.0 2.0 1.7 1.5 1.3 1 0.7 0.5 0.31 0.3 0.2 0.1 0.05 0.01 -0.01 -0.05 -0.1 -0.2 -0.3 -0.31 -0.5 -0.7 -1 -1.3 -1.5 -1.7 -2.0" | ||
for Vi in $Vf; do | ||
sbatch rw_$b.$Af.$Vi.slrm ; | ||
done | ||
fi | ||
if false ; then | ||
b=0 | ||
Af=1 | ||
Vf="2.0 1.7 1.5 1.3 1 0.7 0.5 0.3 -0.3 -0.5 -0.7 -1.0 -1.3 -1.5 -1.7 -2.0" | ||
for Vi in $Vf; do | ||
echo rw_$b.$Af.$Vi.slrm ; | ||
sbatch rw_$b.$Af.$Vi.slrm ; | ||
done | ||
fifi |