dodanie parametrow do nanotube
[unres.git] / source / unres / src_MD-M / readrtns_CSA.F
index fa4c75a..577c1ee 100644 (file)
@@ -424,6 +424,14 @@ c      call reada(controlcard,"R_CUT",r_cut,2.0d0)
 c      call reada(controlcard,"LAMBDA",rlamb,0.3d0)
       rest = index(controlcard,"REST").gt.0
       tbf = index(controlcard,"TBF").gt.0
+      tnp = index(controlcard,"NOSEPOINCARE99").gt.0
+      tnp1 = index(controlcard,"NOSEPOINCARE01").gt.0
+      tnh = index(controlcard,"NOSEHOOVER96").gt.0
+      if (RESPA.and.tnh)then
+        xiresp = index(controlcard,"XIRESP").gt.0
+      endif
+      write(iout,*) "tnh",tnh
+      call reada(controlcard,"Q_NP",Q_np,0.1d0)
       usampl = index(controlcard,"USAMPL").gt.0
 
       mdpdb = index(controlcard,"MDPDB").gt.0
@@ -546,6 +554,43 @@ c Calculate friction coefficients and bounds of stochastic forces
      &    "Velocities will be reset at random every",count_reset_vel,
      &   " steps"
         endif
+      else if (tnp .or. tnp1 .or. tnh) then
+        if (tnp .or. tnp1) then
+           write (iout,'(a)') "Nose-Poincare bath calculation"
+           if (tnp) write (iout,'(a)')
+     & "J.Comput.Phys. 151 114 (1999) S.D.Bond B.J.Leimkuhler B.B.Laird"
+           if (tnp1) write (iout,'(a)') "JPSJ 70 75 (2001) S. Nose"
+        else
+           write (iout,'(a)') "Nose-Hoover bath calculation"
+           write (iout,'(a)') "Mol.Phys. 87 1117 (1996) Martyna et al."
+              nresn=1
+              nyosh=1
+              nnos=1
+              do i=1,nnos
+               qmass(i)=Q_np
+               xlogs(i)=1.0
+               vlogs(i)=0.0
+              enddo
+              do i=1,nyosh
+               WDTI(i) = 1.0*d_time/nresn
+               WDTI2(i)=WDTI(i)/2
+               WDTI4(i)=WDTI(i)/4
+               WDTI8(i)=WDTI(i)/8
+              enddo
+              if (RESPA) then
+               if(xiresp) then
+                 write (iout,'(a)') "NVT-XI-RESPA algorithm"
+               else
+                 write (iout,'(a)') "NVT-XO-RESPA algorithm"
+               endif
+               do i=1,nyosh
+                WDTIi(i) = 1.0*d_time/nresn/ntime_split
+                WDTIi2(i)=WDTIi(i)/2
+                WDTIi4(i)=WDTIi(i)/4
+                WDTIi8(i)=WDTIi(i)/8
+               enddo
+              endif
+        endif
       else
         if(me.eq.king.or..not.out1file)
      &   write (iout,'(a31)') "Microcanonical mode calculation"