* list3(kjishu,imm+8)=Ohydroxy(k,imm) *2110 continue
* templist3(kjishu,3)=int(Ohydroxy(k,1)) * charge(Ohydroxy_SN(k))=2.0 *
*2080 continue *2070 continue *2060 continue
* open(2120,file='list3.car',access='append') *
do 2130 i=1,kjishu
* write(2120,777)int(list3(i,1)),list3(i,2),list3(i,3),list3(i,4), * & templist3(i,1)
* write(2120,777)int(list3(i,5)),list3(i,6),list3(i,7),list3(i,8), * & templist3(i,2)
* write(2120,777)int(list3(i,9)),list3(i,10),list3(i,11),list3(i,12) * & ,templist3(i,3) *
write(2120,*)'' *2130 continue
*777 Format(I4,3X,F12.9,2X,F13.9,3X,F12.9,3X,I4) * close(2120)
*************************************************** * renew hydroxy oxygen list
*************************************************** * do 2135 i=1,nho * *
Ohydroxy_SN(i)=0 do 2136 j=1,4 goto 2061 * endif
* Ohydroxy(i,j)=0 *2136 continue *2135 continue
* kjishu=0
* do 2140 i=1,natom0 * * *
if (charge(i).eq.1.0) then kjishu=kjishu+1 Ohydroxy_SN(kjishu)=i
* Ohydroxy(kjishu,1)=kjishu * * * *
* open(2150,file='hydrogen oxygen-1.car',access='append') * do 2160 i=1,nho *
write(2150,*)(Ohydroxy(i,j),j=1,4),Ohydroxy_SN(i) *2160 continue * close(2150)
* stop
************************************ * choose a initial oxygen atom randomly ************************************
* ron=int(ran2(idum)*nho) * rox=Ohydroxy(nho,2) * roy=Ohydroxy(nho,3) * roz=Ohydroxy(nho,4)
* nOtemp=0 * do 60 i=1,nho * * * * * * *
* kstop=0
* do 70 i=1,nOtemp-1 * *
do 80 j=i+1,nOtemp
distance=sqrt((Ohydroxy(i,2)-Ohydroxy(j,2))**2+
distance=sqrt((rox-Ohydroxy(i,2))**2+(roy-Ohydroxy(i,3))**2+ if(distance.gt.1.0.and.distance.lt.2.6)then Otemp(nOtemp,1)=nOtemp Otemp(nOtemp,2)=Ohydroxy(i,2)
Otemp(nOtemp,3)=Ohydroxy(i,3) Otemp(nOtemp,4)=Ohydroxy(i,4)
* & (roz-Ohydroxy(i,4))**2) * nOtemp=nOtemp+1
Ohydroxy(kjishu,2)=xc(i) Ohydroxy(kjishu,3)=yc(i) Ohydroxy(kjishu,4)=zc(i) endif
*2140 continue
endif
*60 continue
* & (Ohydroxy(i,3)-Ohydroxy(j,3))**2+ * & (Ohydroxy(i,4)-Ohydroxy(j,4))**2)
*
if(distance.gt.1.0.and.distance.lt.2.6)then
************************************************* * Mark of interrupt service routine 2
************************************************* * * * * * * * * * *
goto 90 * endif *80 continue *70 continue
******************************************** * warning 1
******************************************** * if(kstop.eq.0)then * * *
write(*,*)'Warning',kstop,': no tri-grafting any more' stop endif OTb(1)=j
OTb(2)=Otemp(j,2) OTb(3)=Otemp(j,3) OTb(4)=Otemp(j,4) OTa(1)=i
OTa(2)=Otemp(i,2) OTa(3)=Otemp(i,3) OTa(4)=Otemp(i,4) kstop=1
******************************************** * warning 1
********************************************
* kstop=0 *90 search_step=0.01 * do 100 i=-300,300 * do 110 j=-300,300 * * * *
do 120 k=-300,300 temp(1)=rox+search_step*i temp(2)=roy+search_step*j temp(3)=roz+search_step*k
*
dis1=sqrt((temp(1)-rox)**2+ * & (temp(2)-roy)**2+ * & (temp(3)-roz)**2) *
dis2=sqrt((temp(1)-OTa(2))**2+
* & (temp(2)-OTa(3))**2+ * & (temp(3)-OTa(4))**2)
* dis3=sqrt((temp(1)-OTb(2))**2+ * & (temp(2)-OTb(3))**2+ * & (temp(3)-OTb(4))**2)
* if (dis1.gt.1.8.and.dis1.lt.2.0.and. * & dis2.gt.1.8.and.dis1.lt.2.0.and. * & dis3.gt.1.8.and.dis1.lt.2.0)then
* do 130 im=1,natom+natom_add *
distance=sqrt((temp(1)-xc(im))**2+
* & (temp(2)-yc(im))**2+ * & (temp(3)-zc(im))**2) * if(distance.le.3.0)then * *
goto 120 endif
*130 continue
************************************************* * Mark of interrupt service routine 2
************************************************* * kstop=2
* natom_add=natom_add+1 * * * * * * * * * * *
open(140,file='amino.car',access='append') write(140,888)a(Tatom),xc(Tatom), Tatom=natom0+natom_add a(Tatom)='Si' xc(Tatom)=temp(1) yc(Tatom)=temp(2) zc(Tatom)=temp(3) fx(Tatom)='XXXX' occupation(Tatom)=1 fft(Tatom)='Si3' charge(Tatom)=3.000
* atomname(Tatom)='Si'
* & yc(Tatom),zc(Tatom), * & fx(Tatom),occupation(Tatom), * & fft(Tatom),atomname(Tatom), * & charge(Tatom) *
close(140)
****************************************************************** * add C1 atom on the chosen Si atom
****************************************************************** lbond=1.93
xtemp=xc(Tatom) ytemp=yc(Tatom) ztemp=zc(Tatom) Temp_SN=Tatom
call addatom(xtemp,ytemp,ztemp,lbond,Tatom,Temp_SN,
& xfinal,yfinal,zfinal) * * * * * * * * * * *
open(150,file='amino.car',access='append') a(Tatom)='C'//'NC_S'//'NC_CC' xc(Tatom)=xfinal zc(Tatom)=zfinal fx(Tatom)='XXXX' occupation(Tatom)=1 fft(Tatom)='C_3' charge(Tatom)=6.000 a(Tatom)='C' yc(Tatom)=yfinal
if(NC_C.eq.0)NC_CC='' if(NC_C.eq.1)NC_CC='A' if(NC_C.eq.2)NC_CC='B' if(NC_C.eq.3)NC_CC='C' if(NC_C.eq.4)NC_CC='D' if(NC_C.eq.5)NC_CC='E' if(NC_C.eq.6)NC_CC='F' NCT=NCT+1 NC_C=INT(NCT/99) NC_S=NCT-99*NC_C natom_add=natom_add+1
Tatom=natom0+natom_add
atomname(Tatom)='C'