From 376cd655ce6755a52645984ead6fecc4c38a28c9 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Tue, 6 Aug 2019 18:03:21 +0200 Subject: [PATCH] correction in gen_rand --- source/unres/CMakeLists.txt | 2 +- source/unres/geometry.F90 | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/unres/CMakeLists.txt b/source/unres/CMakeLists.txt index 9540d68..032dd7d 100644 --- a/source/unres/CMakeLists.txt +++ b/source/unres/CMakeLists.txt @@ -72,7 +72,7 @@ if (Fortran_COMPILER_NAME STREQUAL "ifort") set (CMAKE_Fortran_FLAGS_RELEASE " ") set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g ") # set(FFLAGS0 "-fpp -c -O3 -ip " ) - set(FFLAGS0 "-CB -g -ip -fpp -heap-arrays" ) + set(FFLAGS0 "-O3 -ip -fpp -heap-arrays" ) # set(FFLAGS0 "-O0 -CB -CA -g" ) set(FFLAGS1 "-fpp -c -O " ) set(FFLAGS2 "-fpp -c -g -CA -CB ") diff --git a/source/unres/geometry.F90 b/source/unres/geometry.F90 index 70b6218..1d15584 100644 --- a/source/unres/geometry.F90 +++ b/source/unres/geometry.F90 @@ -826,15 +826,15 @@ integer :: i,nstart,maxsi,nsi,maxnit,nit,niter integer :: it1,it2,it,j !d print *,' CG Processor',me,' maxgen=',maxgen - maxsi=100 -!d write (iout,*) 'Gen_Rand_conf: nstart=',nstart + maxsi=1000 +! write (iout,*) 'Gen_Rand_conf: nstart=',nstart if (nstart.lt.5) then it1=iabs(itype(2,1)) phi(4)=gen_phi(4,iabs(itype(2,1)),iabs(itype(3,1))) ! write(iout,*)'phi(4)=',rad2deg*phi(4) if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2,1)),pi,phi(4)) ! write(iout,*)'theta(3)=',rad2deg*theta(3) - if ((it1.ne.10).and.(it.ne.ntyp1)) then + if ((it1.ne.10).and.(it1.ne.ntyp1)) then nsi=0 fail=.true. do while (fail.and.nsi.le.maxsi) @@ -871,13 +871,14 @@ it1=iabs(itype(i-1,molnum(i-1))) it2=iabs(itype(i-2,molnum(i-2))) it=iabs(itype(i,molnum(i))) -! print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2, -! & ' nit=',nit,' niter=',niter,' maxgen=',maxgen +! print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2,& +! ' nit=',nit,' niter=',niter,' maxgen=',maxgen phi(i+1)=gen_phi(i+1,it1,it) if (back) then phi(i)=gen_phi(i+1,it2,it1) ! print *,'phi(',i,')=',phi(i) theta(i-1)=gen_theta(it2,phi(i-1),phi(i)) +! print *,"theta",theta(i-1),phi(i) if ((it2.ne.10).and.(it2.ne.ntyp1)) then nsi=0 fail=.true. @@ -890,16 +891,19 @@ call locate_next_res(i-1) endif theta(i)=gen_theta(it1,phi(i),phi(i+1)) + write(iout,*) "theta(i),",theta(i) if ((it1.ne.10).and.(it1.ne.ntyp1)) then nsi=0 fail=.true. do while (fail.and.nsi.le.maxsi) call gen_side(it1,theta(i),alph(i-1),omeg(i-1),fail) +! write(iout,*)"alpha,omeg(i-1)",alph(i-1),omeg(i-1),i,nsi,maxsi nsi=nsi+1 enddo if (nsi.gt.maxsi) return 1 endif call locate_next_res(i) + write(iout,*) "overlap,",overlap(i-1) if (overlap(i-1)) then if (nit.lt.maxnit) then back=.true. @@ -918,6 +922,7 @@ endif endif else + write(iout,*) "tu dochodze" back=.false. nit=0 i=i+1 @@ -1062,6 +1067,7 @@ z(2)=0.0D0 endif thet_pred_mean=a0thet(it) + write(iout,*),it,thet_pred_mean,"gen_thet" do k=1,2 thet_pred_mean=thet_pred_mean+athet(k,it,1,1)*y(k) & +bthet(k,it,1,1)*z(k) -- 1.7.9.5