From 6b89829f68ffbc5aeed198357f172a48cf8ded60 Mon Sep 17 00:00:00 2001 From: Adam Liwo Date: Wed, 17 Oct 2012 01:36:46 -0400 Subject: [PATCH 1/1] 10/17/2012 by Adam: Implemented sideadd correction in Bartek's DiL source (readrtns_CSA.F and readpdb.F) --- source/unres/src_CSA_DiL/Makefile | 2 +- .../unres/src_CSA_DiL/Makefile-DFA-NEWPARM.matrix | 108 ++++++++++++++++++++ source/unres/src_CSA_DiL/readpdb.F | 3 + source/unres/src_CSA_DiL/readrtns_csa.F | 8 ++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 source/unres/src_CSA_DiL/Makefile-DFA-NEWPARM.matrix diff --git a/source/unres/src_CSA_DiL/Makefile b/source/unres/src_CSA_DiL/Makefile index 74b5dd0..def0aff 120000 --- a/source/unres/src_CSA_DiL/Makefile +++ b/source/unres/src_CSA_DiL/Makefile @@ -1 +1 @@ -Makefile-DFA-NEWPARM.piasek \ No newline at end of file +Makefile-DFA-NEWPARM.matrix \ No newline at end of file diff --git a/source/unres/src_CSA_DiL/Makefile-DFA-NEWPARM.matrix b/source/unres/src_CSA_DiL/Makefile-DFA-NEWPARM.matrix new file mode 100644 index 0000000..adcfcc0 --- /dev/null +++ b/source/unres/src_CSA_DiL/Makefile-DFA-NEWPARM.matrix @@ -0,0 +1,108 @@ +CPPFLAGS = -DPROCOR -DLINUX -DPGI -DISNAN -DMP -DMPI -DUNRES \ + -DSPLITELE -DAMD64 -DLANG0 +# -DCRYST_BOND -DCRYST_THETA -DCRYST_SC +#-DCRYST_TOR +# -DPROCOR +# -DTSCSC +#-DTIMING \ +# -DMOMENT +#-DPARVEC +#-DPARINT -DPARINTDER + +#INSTALL_DIR = /usr/local/mpich-1.2.0 +INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh/ +#INSTALL_DIR = /opt/mpi/mvapich +#INSTALL_DIR = /users/local/mpi64/mpich-1.2.7p1/ +# +#FC= /usr/local/opt/intel/compiler60/ia32/bin/ifc +FC= ifort +#FCL = ${INSTALL_DIR}/bin/mpif77 +#CC = cc + +OPT = -O3 -ip -w + +FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include +FFLAGS1 = -c -w -g -O0 -d2 -CA -CB -I$(INSTALL_DIR)/include +FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include +FFLAGS3 = -c -w -O3 -mp +FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report -I$(INSTALL_DIR)/include + +BIN = ../../../bin/unres/CSA/unres_dfa_csa-Yi.exe +#BIN = ../../../bin/unres/CSA/unres_csa_ifort_mpich-1.2.7p1.exe +#LIBS = -L$(INSTALL_DIR)/lib -lmpich +LIBS = -lpthread -L$(INSTALL_DIR)/lib -lmpich + +ARCH = LINUX +PP = /lib/cpp -P + +#all: unresCSA +all: unres + +.SUFFIXES: .F +.F.o: + ${FC} ${FFLAGS} ${CPPFLAGS} $*.F + + +object = unres_csa.o arcos.o cartprint.o chainbuild.o initialize_p.o \ + matmult.o readrtns_csa.o parmread.o \ + pinorm.o randgens.o rescode.o intcor.o timing.o misc.o intlocal.o \ + cartder.o checkder_p.o econstr_local.o energy_p_new_barrier.o \ + gradient_p.o minimize_p.o sumsld.o \ + cored.o rmdd.o geomout_min.o readpdb.o \ + intcartderiv.o \ + MP.o printmat.o convert.o int_to_cart.o \ + dfa.o \ + together.o csa.o minim_jlee.o shift.o diff12.o bank.o newconf.o ran.o \ + indexx.o prng_32.o contact.o gen_rand_conf.o \ + sc_move.o test.o local_move.o rmsd.o fitsq.o elecont.o djacob.o \ + distfit.o banach.o TMscore_subroutine.o minim_mult.o + +#unresCSA: ${object} +unres: ${object} +# cc -o compinfo compinfo.c +# ./compinfo + ${FC} ${FFLAGS} cinfo.f +# ${FCL} -static-libcxa ${OPT} ${object} cinfo.o ${LIBS} -o ${BIN} + ${FC} ${OPT} ${object} cinfo.o ${LIBS} -o ${BIN} + +clean: + /bin/rm *.o *.il + +chainbuild.o: chainbuild.F + ${FC} ${FFLAGS} ${CPPFLAGS} chainbuild.F + +matmult.o: matmult.f + ${FC} ${FFLAGS} ${CPPFLAGS} matmult.f + +parmread.o : parmread.F + ${FC} ${FFLAGS} ${CPPFLAGS} parmread.F + +intcor.o : intcor.f + ${FC} ${FFLAGS} ${CPPFLAGS} intcor.f + +cartder.o : cartder.F + ${FC} ${FFLAGS} ${CPPFLAGS} cartder.F + +readpdb.o : readpdb.F + ${FC} ${FFLAGS2} ${CPPFLAGS} readpdb.F + +sumsld.o : sumsld.f + ${FC} ${FFLAGS} ${CPPFLAGS} sumsld.f + +cored.o : cored.f + ${FC} ${FFLAGS3} ${CPPFLAGS} cored.f + +rmdd.o : rmdd.f + ${FC} ${FFLAGS} ${CPPFLAGS} rmdd.f + +energy_p_new_barrier.o : energy_p_new_barrier.F + ${FC} ${FFLAGSE} ${CPPFLAGS} energy_p_new_barrier.F + +gradient_p.o : gradient_p.F + ${FC} ${FFLAGSE} ${CPPFLAGS} gradient_p.F + +dfa.o : dfa.F + ${FC} -mp ${FFLAGS3} ${CPPFLAGS} dfa.F + + + diff --git a/source/unres/src_CSA_DiL/readpdb.F b/source/unres/src_CSA_DiL/readpdb.F index dacd12d..69ec3e1 100644 --- a/source/unres/src_CSA_DiL/readpdb.F +++ b/source/unres/src_CSA_DiL/readpdb.F @@ -258,6 +258,9 @@ c endif enddo iti=itype(i) di=dist(i,nres+i) +C 10/03/12 Adam: Correction for zero SC-SC bond length + if (itype(i).ne.10 .and. itype(i).ne.21. and. di.eq.0.0d0) + & di=dsc(itype(i)) vbld(i+nres)=di if (itype(i).ne.10) then vbld_inv(i+nres)=1.0d0/di diff --git a/source/unres/src_CSA_DiL/readrtns_csa.F b/source/unres/src_CSA_DiL/readrtns_csa.F index 4511d33..a6ed1f8 100644 --- a/source/unres/src_CSA_DiL/readrtns_csa.F +++ b/source/unres/src_CSA_DiL/readrtns_csa.F @@ -455,6 +455,9 @@ c print *,'Finished reading pdb data' call contact(.false.,ncont_ref,icont_ref,co) if (sideadd) then +C Following 2 lines for diagnostics; comment out if not needed + write (iout,*) "Before sideadd" + call intout if(me.eq.king.or..not.out1file) & write(iout,*)'Adding sidechains' maxsi=1000 @@ -472,6 +475,11 @@ c call gen_side(iti,theta(i+1),alph(i),omeg(i),fail) endif enddo endif +C 10/03/12 Adam: Recalculate coordinates with new side chain positions + call chainbuild +C Following 2 lines for diagnostics; comment out if not needed + write (iout,*) "After sideadd" + call intout endif if (indpdb.eq.0) then -- 1.7.9.5