24小时热门版块排行榜    

查看: 761  |  回复: 3
当前主题已经存档。

zhxd1028

禁虫 (小有名气)

本帖内容被屏蔽

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

zdd2008

金虫 (职业作家)

zhxd1028(金币+10):太感谢了! 2010-04-19 21:40
楼主给个QQ吧,我传给你,纳米盘坏了!!!
2楼2010-04-19 20:22:15
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

zdd2008

金虫 (职业作家)


qli0218(金币+1):谢谢 2010-04-19 20:50
以下是getcif.pl文件的内容,楼主自己再建一个文件吧,呵呵


eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' if 0;
#;-*- Perl -*-

# 13-05-2005

# Makes a linear interpolation between to POSCARs with N points

use FindBin qw($Bin) ;
use lib "$Bin" ;
use Vasp ;

(@ARGV<3) || die "USAGE: getcif.pl \n" ;
# Defaults
$poscarfilename="CONTCAR";
$potcar="POTCAR";
# Read input variables
if(@ARGV>0){
  $poscarfilename=$ARGV[0];
}
if(@ARGV>1){
  $poscarfilename=$ARGV[0];
  $potcar=$ARGV[1];
}
(-e "$poscarfilename" || die (" $poscarfilename does not exist\n";
(-e "$potcar" || die (" $potcar does not exist\n";
($coordinates,$basis,$lattice,$num_atoms,$total_atoms,$selectiveflag,$selective,$description)
= read_poscar($poscarfilename);
$coms=`grep 'TITEL' $potcar`;
@coms=split /\n/, $coms;
$num_coms=@coms;
(@{$num_atoms}==$num_coms) || die (" POSCAR and POTCAR files should have the same types of atoms\n";
for($i=0;$i<$total_atoms;$i++){
  for($j=0;$j<3;$j++){
  if($coordinates->[$i][$j]<0) {
    $coordinates->[$i][$j]+=1;}
if($coordinates->[$i][$j]>=1) {
    $coordinates->[$i][$j]-=1;  }}}
open OUT, ">out.cif";
printf"data_\n_audit_creation_method    ''\n";
printf OUT "data_\n_audit_creation_method    ''\n";
$lengtha=sqrt($basis->[0][0]*$basis->[0][0]+$basis->[1][0]*$basis->[1][0]+$basis->[2][0]*$basis->[2][0]);
$lengthb=sqrt($basis->[0][1]*$basis->[0][1]+$basis->[1][1]*$basis->[1][1]+$basis->[2][1]*$basis->[2][1]);
$lengthc=sqrt($basis->[0][2]*$basis->[0][2]+$basis->[1][2]*$basis->[1][2]+$basis->[2][2]*$basis->[2][2]);
$cos_alpha=($basis->[0][1]*$basis->[0][2]+$basis->[1][1]*$basis->[1][2]+$basis->[2][1]*$basis->[2][2])/$lengthb/$lengthc;
$sin_alpha=sqrt(1-$cos_alpha*$cos_alpha);
$alpha=atan2($sin_alpha,$cos_alpha)*180/3.141592653589793;
$cos_beta=($basis->[0][0]*$basis->[0][2]+$basis->[1][0]*$basis->[1][2]+$basis->[2][0]*$basis->[2][2])/$lengtha/$lengthc;
$sin_beta=sqrt(1-$cos_beta*$cos_beta);
$beta=atan2($sin_beta,$cos_beta)*180/3.141592653589793;
$cos_gamma=($basis->[0][0]*$basis->[0][1]+$basis->[1][0]*$basis->[1][1]+$basis->[2][0]*$basis->[2][1])/$lengtha/$lengthb;
$sin_gamma=sqrt(1-$cos_gamma*$cos_gamma);
$gamma=atan2($sin_gamma,$cos_gamma)*180/3.141592653589793;
printf"_cell_length_a%20.6f\n",$lengtha;
printf OUT "_cell_length_a%20.6f\n",$lengtha;
printf"_cell_length_b%20.6f\n",$lengthb;
printf OUT "_cell_length_b%20.6f\n",$lengthb;
printf"_cell_length_c%20.6f\n",$lengthc;
printf OUT "_cell_length_c%20.6f\n",$lengthc;
printf"_cell_angle_alpha     %.4f\n",$alpha;
printf OUT "_cell_angle_alpha     $.4f\n",$alpha;
printf"_cell_angle_beta      %.4f\n",$beta;
printf OUT "_cell_angle_beta      $.4f\n",$beta;
printf"_cell_angle_gamma     %.4f\n",$gamma;
printf OUT "_cell_angle_gamma     %.4f\n",$gamma;
printf"_symmetry_space_group_name_H-M  'T'\n";
printf OUT "_symmetry_space_group_name_H-M  'T'\n";
printf"loop_\n";
printf OUT "loop_\n";
printf"_atom_site_type_symbol\n_atom_site_label\n";
printf OUT "_atom_site_type_symbol\n_atom_site_label\n";
printf"_atom_site_fract_x\n_atom_site_fract_y\n_atom_site_fract_z\n";
printf OUT "_atom_site_fract_x\n_atom_site_fract_y\n_atom_site_fract_z\n";
$index=0;
for($j=0;$j<@{$num_atoms};$j++){  
     $line=$coms[$j];
     chomp($line) ;
     $line=~s/^\s+//g;
     @line=split /\s+/,$line;
     $c[$j]=$line[3];
    if($j != 0){$num_atoms->[$j]+=$num_atoms->[$j-1];}  
for($m=$index;$m<$num_atoms->[$j];$m++){
printf "%5s%5s%d\t",$c[$j],$c[$j],$m+1;
printf OUT  "%5s%5s%d\t",$c[$j],$c[$j],$m+1;
printf "%12.8f%12.8f%12.8f\n",$coordinates->[$m][0],$coordinates->[$m][1],$coordinates->[$m][2];
printf OUT  "%12.8f%12.8f%12.8f\n",$coordinates->[$m][0],$coordinates->[$m][1],$coordinates->[$m][2];
}
$index=$num_atoms->[$j];
}
3楼2010-04-19 20:44:01
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

fanchen021

铁杆木虫 (正式写手)

晕~~~~~~~
4楼2010-04-20 00:03:10
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zhxd1028 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:39 by 9i7PCSZyMzot
[论文投稿] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:27 by 9i7PCSZyMzot
[硕博家园] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:27 by 9i7PCSZyMzot
[公派出国] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:15 by 9i7PCSZyMzot
[博后之家] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:15 by 9i7PCSZyMzot
[考博] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 01:03 by 9i7PCSZyMzot
[论文投稿] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 E4V9bALS54sj 2026-09-19 3/150 2026-09-20 00:51 by 9i7PCSZyMzot
[考研] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 4pRyVGCVerAA 2026-09-19 3/150 2026-09-20 00:15 by 9i7PCSZyMzot
[硕博家园] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 4pRyVGCVerAA 2026-09-19 3/150 2026-09-20 00:03 by 9i7PCSZyMzot
[找工作] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +4 4pRyVGCVerAA 2026-09-19 4/200 2026-09-20 00:03 by 9i7PCSZyMzot
[基金申请] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 4pRyVGCVerAA 2026-09-19 4/200 2026-09-19 23:39 by 9i7PCSZyMzot
[考研] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 4pRyVGCVerAA 2026-09-19 4/200 2026-09-19 23:27 by 9i7PCSZyMzot
[论文投稿] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 4pRyVGCVerAA 2026-09-19 4/200 2026-09-19 23:27 by 9i7PCSZyMzot
[公派出国] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 4pRyVGCVerAA 2026-09-19 4/200 2026-09-19 23:03 by 9i7PCSZyMzot
[考博] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 4pRyVGCVerAA 2026-09-19 4/200 2026-09-19 23:03 by 9i7PCSZyMzot
[公派出国] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 4pRyVGCVerAA 2026-09-18 7/350 2026-09-19 21:03 by 9i7PCSZyMzot
[教师之家] 现代”学阀”该如何界定 +3 iaeyuan 2026-09-19 3/150 2026-09-19 20:52 by 没昵称呀
[基金申请] 国社科系统bug了,是不是要放榜了? +7 kynobel 2026-09-16 9/450 2026-09-19 14:52 by 接好运婷
[考博] 上海工程技术大学激光智能制造课题组|2027级博士研究生招生公告 +7 水士口 2026-09-16 8/400 2026-09-16 13:47 by kkklens
[考博] 上海工程技术大学激光智能制造课题组招收博士研究生 +8 两三岁ss 2026-09-14 8/400 2026-09-16 09:46 by 水士口
信息提示
请填处理意见