From f4000c1d129f8c0d52e1e0112221aa8d1afa7a74 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Sep 2022 17:11:08 +0800 Subject: [PATCH] Docs: add the readme and running scripts for examples/md --- examples/md/README | 11 +++++++++++ examples/md/lcao_gammaonly_Sn64/run.sh | 23 +++++++++++++++++++++++ examples/md/runall.sh | 11 +++++++++++ 3 files changed, 45 insertions(+) create mode 100644 examples/md/README create mode 100644 examples/md/lcao_gammaonly_Sn64/run.sh create mode 100644 examples/md/runall.sh diff --git a/examples/md/README b/examples/md/README new file mode 100644 index 0000000000..917d775e47 --- /dev/null +++ b/examples/md/README @@ -0,0 +1,11 @@ +/*******************************************************************************/ +/ +/ These are the examples of ABACUS program. +/ +/*******************************************************************************/ + +These examples show how to do a md calculation. +One can set 'calculation' to be 'md' or 'sto-md' to do the MD calculation. + +More detail introduction can be found in ../../docs/advanced/md.md + diff --git a/examples/md/lcao_gammaonly_Sn64/run.sh b/examples/md/lcao_gammaonly_Sn64/run.sh new file mode 100644 index 0000000000..8094800f17 --- /dev/null +++ b/examples/md/lcao_gammaonly_Sn64/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +ABACUS_PATH=$(awk -F "=" '$1=="ABACUS_PATH"{print $2}' ../../SETENV) +ABACUS_NPROCS=$(awk -F "=" '$1=="ABACUS_NPROCS"{print $2}' ../../SETENV) +ABACUS_THREADS=$(awk -F "=" '$1=="ABACUS_THREADS"{print $2}' ../../SETENV) + +cp INPUT_0 INPUT +OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee md0.output +cp OUT.ABACUS/running_md.log running_md0.log +cp INPUT_1 INPUT +OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee md1.output +cp OUT.ABACUS/running_md.log running_md1.log +cp INPUT_2 INPUT +OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee md2.output +cp OUT.ABACUS/running_md.log running_md2.log +cp INPUT_3 INPUT +OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee md3.output +cp OUT.ABACUS/running_md.log running_md3.log +cp INPUT_4 INPUT +OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee md4.output +cp OUT.ABACUS/running_md.log running_md4.log + +rm INPUT diff --git a/examples/md/runall.sh b/examples/md/runall.sh new file mode 100644 index 0000000000..014c2cd5b2 --- /dev/null +++ b/examples/md/runall.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +for ii in * +do + if [ -d $ii ];then + cd ${ii} + echo "RUN: ${ii}" + bash run.sh + cd .. + fi +done