From 1a2fa7f9c1e5cb97c4cd9adef9b745dfd01e93df Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Fri, 4 Aug 2017 08:52:32 +0200 Subject: [PATCH] debug for etube for too long wheightcard --- PARAM/tube_carbonano2.parm | 25 +++++++++++++++++++++++++ source/unres/CMakeLists.txt | 1 + source/unres/energy.f90 | 18 +++++++++++++----- source/unres/io.f90 | 2 +- 4 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 PARAM/tube_carbonano2.parm diff --git a/PARAM/tube_carbonano2.parm b/PARAM/tube_carbonano2.parm new file mode 100644 index 0000000..ea98cb1 --- /dev/null +++ b/PARAM/tube_carbonano2.parm @@ -0,0 +1,25 @@ +1.1970470 5.3667307 0 0 0 0 3.0000000 +1.5539975 5.6438808 0 0 0 0 3.0000000 +1.6679316 5.6689787 0 0 0 0 3.0000000 +1.6606077 5.9381499 0 0 0 0 3.0000000 +1.7428987 5.8625088 0 0 0 0 3.0000000 +1.7310307 5.9950466 0 0 0 0 3.0000000 +1.6322831 5.8318806 0 0 0 0 3.0000000 +1.5348705 5.4955850 0 0 0 0 3.0000000 +1.3603992 5.3937664 0 0 0 0 3.0000000 +1.3228511 5.4371481 0 0 0 0 3.0000000 +1.1970470 5.3667307 0 0 0 0 3.0000000 +1.0325602 5.5439558 0 0 0 0 3.0000000 +0.98513186 5.3780737 0 0 0 0 3.0000000 +0.97556829 5.3995867 0 0 0 0 3.0000000 +0.90197319 5.4184709 0 0 0 0 3.0000000 +0.77024281 5.4679136 0 0 0 0 3.0000000 +0.75456488 5.4686551 0 0 0 0 3.0000000 +1.1983876 5.3466215 0 0 0 0 3.0000000 +0.96779823 5.2968884 0 0 0 0 3.0000000 +0.92065424 5.3752089 0 0 0 0 3.0000000 +1.1218165 5.6721835 0 0 0 0 3.0000000 +1.6679316 5.7029562 0 0 0 0 3.0000000 +1.6606077 5.9355397 0 0 0 0 3.0000000 +1.3228511 5.4343948 0 0 0 0 3.0000000 +1.3228511 5.4343948 0 0 0 0 3.0000000 diff --git a/source/unres/CMakeLists.txt b/source/unres/CMakeLists.txt index 2a48eda..fd62a89 100644 --- a/source/unres/CMakeLists.txt +++ b/source/unres/CMakeLists.txt @@ -72,6 +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" ) set(FFLAGS1 "-fpp -c -O " ) set(FFLAGS2 "-fpp -c -g -CA -CB ") set(FFLAGS3 "-fpp -c -g -O0 " ) diff --git a/source/unres/energy.f90 b/source/unres/energy.f90 index 565c695..4065e96 100644 --- a/source/unres/energy.f90 +++ b/source/unres/energy.f90 @@ -45,6 +45,7 @@ real(kind=8),dimension(:,:,:),allocatable :: gacont !(3,maxconts,maxres) integer,dimension(:),allocatable :: ishield_list integer,dimension(:,:),allocatable :: shield_list + real(kind=8),dimension(:),allocatable :: enetube,enecavtube ! ! 12/26/95 - H-bonding contacts ! common /contacts_hb/ @@ -5184,6 +5185,9 @@ usumsqder=usumsqder+ud(j)*uprod2 enddo estr=estr+uprod/usum + if (energy_dec) write (iout,*) & + "estr sc",i,iti,vbld(i+nres),vbldsc0(1,iti),diff,& + AKSC(1,iti),AKSC(1,iti)*diff*diff do j=1,3 gradbx(j,i)=usumsqder/(usum*usum)*dc(j,i+nres)/vbld(i+nres) enddo @@ -18327,7 +18331,7 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' !C and r0 is the excluded size of nanotube (can be set to 0 if we want just a !C simple Kihara potential subroutine calctube(Etube) - real(kind=8) :: vectube(3),enetube(nres*2) + real(kind=8),dimension(3) :: vectube real(kind=8) :: Etube,xtemp,xminact,yminact,& ytemp,xmin,ymin,tub_r,rdiff,rdiff6,fac,positi, & sc_aa_tube,sc_bb_tube @@ -18488,7 +18492,7 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' !C and r0 is the excluded size of nanotube (can be set to 0 if we want just a !C simple Kihara potential subroutine calctube2(Etube) - real(kind=8) :: vectube(3),enetube(nres*2) + real(kind=8),dimension(3) :: vectube real(kind=8) :: Etube,xtemp,xminact,yminact,& ytemp,xmin,ymin,tub_r,rdiff,rdiff6,fac,positi,fracinbuf,& sstube,ssgradtube,sc_aa_tube,sc_bb_tube @@ -18725,8 +18729,8 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' end subroutine calctube2 !===================================================================================================================================== subroutine calcnano(Etube) - real(kind=8) :: vectube(3),enetube(nres*2), & - enecavtube(nres*2) + real(kind=8),dimension(3) :: vectube + real(kind=8) :: Etube,xtemp,xminact,yminact,& ytemp,xmin,ymin,tub_r,rdiff,rdiff6,fac,denominator,faccav,& sc_aa_tube,sc_bb_tube,zmin,ztemp,zminact @@ -18826,7 +18830,7 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' !C fac=fac+faccav !C 667 continue endif - + if (energy_dec) write(iout,*),i,rdiff,enetube(i),enecavtube(i) do j=1,3 gg_tube(j,i-1)=gg_tube(j,i-1)+vectube(j)*fac/2.0d0 gg_tube(j,i)=gg_tube(j,i)+vectube(j)*fac/2.0d0 @@ -18929,6 +18933,7 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' gg_tube_SC(j,i)=gg_tube_SC(j,i)+vectube(j)*fac gg_tube(j,i-1)=gg_tube(j,i-1)+vectube(j)*fac enddo + if (energy_dec) write(iout,*),i,rdiff,enetube(i+nres),enecavtube(i+nres) enddo @@ -19552,6 +19557,9 @@ write(iout,*) 'Calling CHECK_ECARTIN else.' allocate(shield_list(50,nres)) allocate(dyn_ss_mask(nres)) allocate(fac_shield(nres)) + allocate(enetube(nres*2)) + allocate(enecavtube(nres*2)) + !(maxres) dyn_ss_mask(:)=.false. !---------------------- diff --git a/source/unres/io.f90 b/source/unres/io.f90 index 379978e..9c72f87 100644 --- a/source/unres/io.f90 +++ b/source/unres/io.f90 @@ -720,7 +720,7 @@ ! integer :: rescode ! double precision x(maxvar) character(len=256) :: pdbfile - character(len=320) :: weightcard + character(len=480) :: weightcard character(len=80) :: weightcard_t!,ucase ! integer,dimension(:),allocatable :: itype_pdb !(maxres) ! common /pizda/ itype_pdb -- 1.7.9.5