24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 3466  |  回复: 17
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

风雨同周113

金虫 (初入文坛)


[交流] 【求助】求产生变形后POSCAR的 defvector.f 程序的源文件

最近刚学习使用VASP软件,看侯博的说明书中提到计算弹性常数要用到defvector.f,请问这个程序在哪里可以找到呢?望大家给指导指导,不胜感激啊
回复此楼

» 猜你喜欢

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

» 抢金币啦!回帖就可以得到:

查看全部散金贴

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

songdewang

金虫 (小有名气)


风雨同周113(金币+16): 2011-07-16 21:39:37
C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C >this simple program to get the primitive vectors after
C $\delta$ strain, in order to calculate the independent
C elastic constants of solids.
C usage: C!!!!! Please first prepare the undeformed POSCAR in OLDPOS
C >defvector.x
C >type defvector.x > create new POSCAR in file fort.3
C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
      program defvector
      real*8 privect,strvect,delta,strten,strain,pos, alat
      dimension privect(3,3),strvect(3,3),strten(3,3),strain(6)
      dimension pos(50,3)
      character*10 bravlat, title, direct
      integer i,j,k,ntype, natomi, nn
      dimension natomi(10)
C%%%%%%%%% Read the undeformed primitive vector and atomic postion %%%%%%%
      open(7,file='OLDPOS')
C%% In first line of OLDPOS, please add the number
C%% of the type of atoms after the title
      read(7,*) title, ntype
      read(7,*) alat
      do i=1,3
      read(7,*) (privect(i,j),j=1,3)
      write(*,*) (privect(i,j),j=1,3)
      enddo
      read(7,*) (natomi(i),i=1,ntype)
      nn=0
      do i =1, ntype
      nn=nn+natomi(i)
      enddo
      read(7,*) direct
      do i=1, nn
      read(7,*) (pos(i,j),j=1,3)
      enddo
C%%%%%%%%% Read the amti of strain %%%%%%%%%%%%%%%
      read(*,*) delta
C%%%%%%%%% Define the strain %%%%%%%%%%%%%%
      strain(1)=0.0
      strain(2)=delta
      strain(3)=delta
      strain(4)=0.0
      strain(5)=0.0
      strain(6)=0.0
C%%%%%%%%% Define the strain tensor %%%%%%%%%%%%%%%%%%%%%%%%
      strten(1,1)=strain(1)+1.0
      strten(1,2)=0.5*strain(6)
      strten(1,3)=0.5*strain(5)
      strten(2,1)=0.5*strain(6)
      strten(2,2)=strain(2)+1.0
      strten(2,3)=0.5*strain(4)
      strten(3,1)=0.5*strain(5)
      strten(3,2)=0.5*strain(4)
      strten(3,3)=strain(3)+1.0
C%%%%%%%%% Transform the primitive vector to the new vector under strain%%%%%
C strvect(i,j)=privect(i,j)*(I+strten(i,j))
      do k=1,3
      do i=1,3
      strvect(i,k)=0.0
      do j=1,3
      strvect(i,k)=strvect(i,k)+privect(i,j)*strten(j,k)
      enddo
      enddo
      enddo
C%%%%%%%% Write the new vector under strain%%%%%%%%%%%%
      do i=1,3
      write(*,100)(strvect(i,j),j=1,3)
      enddo
100   format(3f20.15)
C%%%%%%%%% Create the POSCAR for total energy calculation %%%%%%%%%%%%%%5
      write(3,'(A10)') title
      write(3,'(f15.10)') alat
      do i=1,3
      write(3,100)(strvect(i,j),j=1,3)
      enddo
      write(3,'(10I4)') (natomi(i), i=1,ntype)
      write(3,'(A6)') Direct
      do i=1, nn
      write(3,100) (pos(i,j),j=1,3)
      enddo
C%%%%%%%
      end
4楼2011-04-12 10:27:42
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 18 个回答

babaleo

木虫 (正式写手)



sunyang1988(金币+1): 谢谢提示 2011-04-10 00:04:45
风雨同周113(金币+2): 2011-04-10 12:53:42
打开指南,剪/贴一下defvector.f,编译.

直接给侯博士发邮件索取.
2楼2011-04-09 23:40:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ufo991

铁虫 (正式写手)



小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
620225楼: Originally posted by songdewang at 2011-04-12 10:27:42
C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C >this simple program to get the primitive vectors after
C $\delta$ strain, in order to calculate the independent
C elastic co ...

为何我编译能通过,运行的时候出现invalid number:incomprehensible list input apparent state: unit 7 named OLDPOS
last format: list io
lately reading direct formatted external IO
或者apparent state: unit 5 (unnamed)
last format: list io
lately reading direct formatted external IO
list in: end of file
的问题呢?
5楼2012-05-30 10:31:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

c03185

新虫 (小有名气)



小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
1265813楼: Originally posted by ufo991 at 2012-05-30 10:31:31
为何我编译能通过,运行的时候出现invalid number:incomprehensible list input apparent state: unit 7 named OLDPOS
last format: list io
lately reading direct formatted external IO
或者apparent state: ...

请问怎么解决的阿?我也遇到了同样的问题。是不是拷贝的输入文件的格式的问题呢?
6楼2012-06-07 06:00:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 环境专硕调剂 +7 会说话的肘子 2026-04-06 7/350 2026-04-07 06:46 by guanxin1001
[考研] 085600,321分求调剂 +14 大馋小子 2026-04-04 15/750 2026-04-06 22:58 by qlm5820
[考研] 材料调剂 +12 一样YWY 2026-04-05 13/650 2026-04-06 15:38 by lin-da
[考研] 求调剂 +8 张zic 2026-04-05 9/450 2026-04-06 13:03 by 猪会飞
[考研] 一志愿南昌大学,085600,344分求调剂 +9 调剂上岸玘 2026-04-05 10/500 2026-04-06 09:30 by dongzh2009
[考研] 315求调剂 +14 欣喜777 2026-04-04 15/750 2026-04-06 06:25 by houyaoxu
[考研] 322求调剂 +3 嗯哼哼恒 2026-04-05 3/150 2026-04-05 19:52 by nepu_uu
[考研] 材料0856 英一数二 323 求调剂 +14 袁sy 2026-04-01 14/700 2026-04-05 18:18 by cql1109
[考研] 292分,材料与化工,申请调剂 +22 程晴之 2026-04-01 26/1300 2026-04-04 22:03 by hemengdong
[考研] 333求调剂 +12 wfh030413@ 2026-04-03 13/650 2026-04-04 21:02 by jj987
[考研] 怎么删帖子啊 +3 缝曦1000 2026-04-04 3/150 2026-04-04 14:20 by 土木硕士招生
[考研] 求调剂,一志愿南京航空航天大学 ,080500材料科学与工程学硕 +10 @taotao 2026-04-03 10/500 2026-04-04 09:01 by T可可西里T
[考研] 281求调剂 +10 aaawhy 2026-04-03 10/500 2026-04-03 21:42 by lbsjt
[考研] 338求调剂 +4 zzz,,r 2026-04-03 4/200 2026-04-03 16:39 by lijunpoly
[考研] 085501一志愿天工大,机械专硕求调剂,跨材料 +3 33上 2026-04-03 3/150 2026-04-03 14:08 by 1753564080
[考研] 372分材料与化工(085600)一志愿湖南大学求调剂 +5 蓝笺片 2026-04-02 6/300 2026-04-02 21:37 by dongzh2009
[考研] 318求调剂,计算材料方向 +10 吸喵有害笙命 2026-04-01 11/550 2026-04-02 16:29 by oooqiao
[考研] 270调剂 +7 maxjxbsk 2026-04-02 7/350 2026-04-02 09:50 by yulian1987
[考研] 085602化学工程268分蹲调剂 +8 月照花林。 2026-04-01 8/400 2026-04-01 22:08 by 无际的草原
[考研] 江苏科技大学招材料研究生 +4 Su032713. 2026-04-01 5/250 2026-04-01 22:03 by cccchenso
信息提示
请填处理意见