CP2K

CP2K是一个量子化学和固态物理软件包,可以对固态、液态、分子、周期性、材料、晶体和生物系统进行原子模拟。CP2K为不同的建模方法提供了通用框架。支持的理论水平包括DFTB、LDA、GGA、MP2、RPA、半经验方法(AM1,PM3,PM6,RM1,MNDO等)和经典力场(AMBER,CHARMM等)。CP2K可以使用NEB或二聚体方法进行分子动力学、元动力学、蒙特卡洛、埃伦菲斯特动力学、振动分析、核心能谱、能量最小化和过渡态优化的模拟。

关于CP2K的更多信息请访问CP2K官网

一、作业提交参数说明

用户可通过公共模板提交CP2K作业,与CP2K相关的作业参数如下:

参数 描述
input inp 运行实例的配置文件
depend file 实例运行的相关依赖参数文件

二、CP2K作业运行参考

1.输入文件

H2O.inp

BASIS_SET

POTENTIAL

2.slurm文件

#!/bin/bash
#SBATCH --job-name=cp2k
#SBATCH --partition=dell_intel
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH -N 2
#SBATCH --ntasks-per-node=30

ulimit -s unlimited
ulimit -l unlimited

# 导入运行环境
source  /opt/ohpc/pub/apps/cp2k/cp2k-7.1/tools/toolchain/install/setup
source /opt/ohpc/pub/apps/intel/setvars.sh
module load gnu8/8.3.0
module load plumed/3.3.8
module load cp2k/7.1<br>
module load intel/mpi-2021.1.1

mpirun -np 60 cp2k.popt -o H2O.out H2O.inp

3.输出文件

H2O-1.restart、H2O-1.restart.bak-1、H2O-1.restart.bak-2、H2O-1.restart.bak-3、 H2O.out、H2O-pos-1.xyz

查看H2O.out文件:

input文件:

#job_name=lmp
#run_time=24:00:00
work_dir=/home/liupeng/CP2K
partition=dell_intel
node_num=2
task_per_node=30
input_inp=/home/wushiming/CP2K/H2O.inp
depend_file=(/home/wushiming/CP2K/BASIS_SET /home/wushiming/CP2K/POTENTIAL)

cp2k.sh脚本:

#!/bin/sh
set -x
source /home/wushiming/CP2K/input
time=`date +%m%d_%H%M%S`
if [ "x$job_name" == "x" ];then
sbatch_job_name="YHPC_$time "
else
sbatch_job_name=$job_name
fi
if [ "x$partition" == "x" ];then
sbatch_partition=""
else
sbatch_partition=$partition
fi
if [ "x$work_dir" == "x" ];then
mkdir -p ~/yhpc/YHPC_$time
sbatch_work_dir=~/yhpc/YHPC_$time
else
sbatch_work_dir=$work_dir
fi
if [ "x$run_time" == "x" ];then
sbatch_run_time=03:00:00
else
sbatch_run_time=$run_time
fi
if [ "x$input_inp" == "x" ];then
echo "The analysis_file cannot be empty."
exit 1
else
input_inp_file=$input_inp
fi
if [ "x$depend_file" == "x" ];then
continue
else
for i in ${depend_file[*]};do cp $i $sbatch_work_dir;done
fi
sbatch_node_num=$node_num
sbatch_task_per_node=$task_per_node
sbatch_err_log=$sbatch_work_dir/%j.err
sbatch_out_log=$sbatch_work_dir/%j.out
#mkdir $sbatch_work_dir &> /dev/null
#slurm文件
cat > $sbatch_work_dir/cp2k.slurm <<EOF
#!/bin/bash
#SBATCH --chdir=$sbatch_work_dir
#SBATCH --ntasks-per-node=$sbatch_task_per_node
#SBATCH --job-name $sbatch_job_name
#SBATCH --nodes=$sbatch_node_num
#SBATCH --mail-type=ALL
#SBATCH --partition $sbatch_partition
#SBATCH -e $sbatch_err_log
#SBATCH -o $sbatch_out_log
ulimit -s unlimited
ulimit -l unlimited
# 导入运行环境


source /opt/ohpc/pub/apps/cp2k/cp2k-7.1/tools/toolchain/install/setup
source /opt/ohpc/pub/apps/intel/setvars.sh
module load gnu8/8.3.0
module load plumed/3.3.8
module load cp2k/7.1
module load intel/mpi-2021.1.1
export I_MPI_OFI_PROVIDER=Verbs
export FI_VERBS_IFACE=team1.282
echo -e "The start time is: `date +"%Y-%m-%d %H:%M:%S"`"
echo -e "My job ID is: SLURM_JOB_ID"
echo -e "The total cores is: SLURM_NPROCS"
echo -e "The SLURM_JOB_ID Job info:"
scontrol show job SLURM_JOB_ID
#执行命令
cd $sbatch_work_dir
cp $input_inp_file .
mpirun -genv I_MPI_FABRICS ofi cp2k.popt -o `basename $input_inp_file`.out `basename $input_inp_file`
echo -e "The end time is: `date +"%Y-%m-%d %H:%M:%S"` \n"
EOF
sed -i 's/SLURM*/\$SLURM/g' $sbatch_work_dir/cp2k.slurm
/usr/bin/sbatch $sbatch_work_dir/cp2k.slurm
# --mail-type=ALL \
# $sbatch_work_dir \
# $sbatch_task_per_node \
# $sbatch_job_name \
# $sbatch_node_num \
# $sbatch_partition \
# $work_dir/job.sh

results matching ""

    No results matching ""