24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1935  |  回复: 6
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

ChemiAndy

木虫 (正式写手)


[求助] DFT Scan之后使用MP2计算能量,如何建立批量输入文件?

如题,使用B3LYP Scan优化了很多构型,然后需要使用MP2依次计算所有构型的结合能。由于点很多,一个一个构型建立输入文件并运行太麻烦。请问有没有简单的办法建立一个输入文件实现上述功能?谢谢。
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ChemiAndy

木虫 (正式写手)


上面第二个脚本生成的gaussian输入文件所带的预设关键词是用PCM模型计算溶剂化自由能的。计算后直接读G(Sol)那一行的数值。
7楼2012-01-16 10:30:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 7 个回答

ChemiAndy

木虫 (正式写手)


谢谢,正在搞Shell
3楼2011-12-31 01:28:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zeozhou

木虫 (小有名气)

【答案】应助回帖

感谢参与,应助指数 +1
ChemiAndy(金币+20): ★★★很有帮助 好主意,我试试 2012-01-02 14:04:16
可以尝试在输入中使用
----link1---
将构型隔开。然后,可以把所有构型都放到一个Input中
注意mp2通常chk文件比较大,如果担心输出文件太大的话,可以均分为几个输入文件完成

不知道这个方法适不适合你?
4楼2011-12-31 17:27:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ChemiAndy

木虫 (正式写手)


★ ★ ★ ★ ★
小红豆(金币+5): 感谢分享 2012-01-16 21:43:23
写了一个bash脚本(只能在linux, bash类型的shell下运行),供参考:

下面的脚本把高斯MP2单点Scan(注意不是Scan优化)生成的输出文件中的结构全部读出,生成DFTB所需的输入文件。你可以修改它实现其它目的。
引用回帖:

#!/bin/bash

#

# 1. Extract 21 configurations from scan-calculation of gaussian

# 2. Create 21 DFTB 'gen' files

# 3. Create 21 tinker 'xyz' files (TBA)

#

# Xijun Wang, Jan. 5, 2012

# xijun(at)cermm.concordia.ca

# Ref:1.Cu G. Phung, Gaustool, http://www.ccl.net/cca/software/UNIX/gaussian-utilities/README



MOL='g-w'   // here you name your system

NATOM=13    // here you control how many atoms in the system

NMOL=21    //  here you control how many configurations will be read from the gaussian file

echo "MOL name is $MOL, NMOL is $MOL, NATOM is $NATOM"



rm $MOL*   // delete residue files of previous running



# Extract configurations from gaussian output file;

# Only Z-matrix orientation coordinates will be extracted;

sed '/Z-Matrix orientation/,/Distance/!d' $1 >> temp1

echo "Gaussian structure has been extracted ..."



# Delete un-useful lines

grep -v 'Num' temp1|grep -v 'Dis'|grep -v '\-\-\-'|grep -v 'Z'|grep -v 'Center' >> temp2

echo "Some lines have been deleted ..."



# Replace element number with their types: 6-C; 7-N; 1-H; 8-O;

# Examine the gaussian file for details of the replace below:

sed -i -e 's/6           0 /C /g' -e 's/7           0 /N /g' \

       -e 's/1           0 /H /g' -e 's/8           0 /O /g'  temp2

echo "Element number has been replaced by element name ..."



# change element type: C-1; N-2; H-3; O-4;

sed -i -e 's/C/1/g' -e 's/N/2/g' -e 's/H/3/g' -e 's/O/4/g' temp2

echo "Element name have been replaced by number in order of C, N, H, O ..."



# Separate temp2 into 21 files with name g-w.xx.gen

for ((IMOL=0;IMOL<$NMOL;IMOL++)); do

  let  m=13*$IMOL+1

  let  n=$m+$NATOM-1

  let  fn=$IMOL+1

# Add the first two lines to the gen file

  echo "  $NATOM C" > $MOL.$fn.gen   

  echo "  C N H O" >> $MOL.$fn.gen

  echo "Print from lines $m to line $n into file $MOL.$fn.gen..."

  sed -n''"$m"','"$n"'p' temp2 >> $MOL.$fn.gen

done

rm temp*

exit



This script only works for gausian output of single-point scan calculations. PAY ATTENTION that it does not work for optimization calc. since all structures during the optimization will be output.

Use of the script: Save it with name like g2gen.sh

$ chmod +x g2gen.sh           // make it executable

$ g2gen.sh gaussianfile.out      // replace "gaussianfile.out" with your gaussian output file

Send me email if you have problem.
[/FONT]

http://hi.baidu.com/xijunw/blog/ ... 6efb5dfbf2c01f.html
5楼2012-01-16 10:21:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见