From 8da4e143c6c61df2ac63c502a74b277293bfed6f Mon Sep 17 00:00:00 2001 From: hotwa Date: Tue, 19 Dec 2023 12:58:45 +0800 Subject: [PATCH] upate --- process_xtc.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/process_xtc.sh b/process_xtc.sh index 952162f..399466e 100755 --- a/process_xtc.sh +++ b/process_xtc.sh @@ -14,7 +14,19 @@ mkdir -p "$OUTPUT_FOLDER" # 文件路径 INDEX_FILE="${INPUT_FOLDER}/index.ndx" TPR_FILE="${INPUT_FOLDER}/md.tpr" -XTC_FILE="${INPUT_FOLDER}/md.xtc" + +# 提取索引文件 +echo "q" | gmx_mpi make_ndx -f ${PDB_FILE} -o index.ndx + +# step 0: Remove water and output a new XTC file +echo "Remove water and output a new XTC file" | gmx_mpi trjconv -s ${TPR_FILE} -f ${XTC_FILE} -o ${TEMP_FOLDER}/no_water.xtc -pbc mol + +# Center the protein in the trajectory +echo "Protein" | gmx_mpi trjconv -s ${TPR_FILE} -f ${TEMP_FOLDER}/no_water.xtc -o ${TEMP_FOLDER}/centered.xtc -center -pbc mol + +# Extract frames every 1000 ps from the centered trajectory and output to a PDB file +echo "Protein" | gmx_mpi trjconv -s ${TPR_FILE} -f ${TEMP_FOLDER}/centered.xtc -o ${OUTPUT_FOLDER}/${MDRUN_NAME}.pdb -dt ${EXTRACT_EVERY_PS} -pbc mol -center + # 提取ndx文件 echo -e "Protein\nq\n" | gmx make_ndx -f 5sws_fixer.pdb -o index.ndx