unres_package_Oct_2016 from emilial
[unres4.git] / source / unres / energy_data.f90
diff --git a/source/unres/energy_data.f90 b/source/unres/energy_data.f90
deleted file mode 100644 (file)
index 39f7d20..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-      module energy_data
-!-----------------------------------------------------------------------------
-      use names
-!-----------------------------------------------------------------------------
-! Max. number of energy intervals
-      integer,parameter :: max_ene=10
-!-----------------------------------------------------------------------------
-! Maximum number of terms in SC bond-stretching potential
-      integer,parameter :: maxbondterm=3
-!-----------------------------------------------------------------------------
-! Max. number of derivatives of virtual-bond and side-chain vectors in theta
-! or phi.
-      integer :: maxdim
-!-----------------------------------------------------------------------------
-! Max. number of contacts per residue
-      integer :: maxconts
-!-----------------------------------------------------------------------------
-! Max. number of SC contacts
-      integer :: maxcont
-!-----------------------------------------------------------------------------
-! commom.contacts
-!      common /contacts/
-      integer :: ncont,ncont_ref
-      integer,dimension(:,:),allocatable :: icont,icont_ref !(2,maxcont)
-#ifdef WHAM_RUN
-      integer,dimension(:),allocatable :: nsccont_frag_ref !(mmaxfrag) !wham
-      integer,dimension(:,:,:),allocatable :: isccont_frag_ref !(2,maxcont,mmaxfrag) !wham
-#endif
-! 12/13/2008 (again Poland-Jaruzel war anniversary)
-!   RE: Parallelization of 4th and higher order loc-el correlations
-!      common /contdistrib/
-      integer,dimension(:),allocatable :: iat_sent !(maxres)
-! iat_sent - zainicjowane w initialize_p.F;
-      integer,dimension(:,:,:),allocatable :: iint_sent,iint_sent_local !(4,maxres,maxres)
-      integer,dimension(:,:),allocatable :: iturn3_sent,iturn4_sent,&
-       iturn3_sent_local,iturn4_sent_local     !(4,maxres),
-      integer,dimension(:),allocatable :: itask_cont_from,itask_cont_to !(0:max_fg_procs-1),
-      integer :: nat_sent,ntask_cont_from,ntask_cont_to
-!-----------------------------------------------------------------------------
-! commom.deriv;
-!      common /derivat/ 
-      real(kind=8),dimension(:,:),allocatable :: dcdv,dxdv !(6,maxdim)
-      real(kind=8),dimension(:,:),allocatable :: dxds !(6,maxres)
-      real(kind=8),dimension(:,:,:),allocatable :: gradx,gradc !(3,maxres,2)
-      real(kind=8),dimension(:,:),allocatable :: gvdwx !(3,maxres)
-      real(kind=8),dimension(:,:),allocatable :: gloc,gloc_x !(maxvar,2)   ,gloc_x  !!! nie używane
-      real(kind=8),dimension(:,:,:),allocatable :: dtheta      !(3,2,maxres)
-      real(kind=8),dimension(:,:,:),allocatable :: dphi,dalpha,domega !(3,3,maxres)
-      integer :: nfl,icg
-
-!      common /derivat/   wham
-      logical :: calc_grad
-!      common /mpgrad/
-      integer :: igrad_start,igrad_end
-      integer,dimension(:),allocatable :: jgrad_start,jgrad_end !(maxres)
-!-----------------------------------------------------------------------------
-! The following COMMON block selects the type of the force field used in
-! calculations and defines weights of various energy terms.
-! 12/1/95 wcorr added
-!-----------------------------------------------------------------------------
-! common.ffield
-!      common /ffield/
-      integer :: n_ene_comp
-      integer :: rescale_mode
-      real(kind=8) :: wsc,wscp,welec,wbond,wstrain,wtor,wtor_d,wang,&
-       wscloc,wcorr,wcorr4,wcorr5,wcorr6,wsccor,wel_loc,wturn3,wturn4,&
-       wturn6,wvdwpp
-      real(kind=8),dimension(:),allocatable :: weights !(n_ene)
-      real(kind=8) :: temp0,scal14,cutoff_corr,delt_corr,r0_corr
-      integer :: ipot
-!      common /potentials/
-      character(len=3),dimension(5) :: potname = &
-        (/'LJ ','LJK','BP ','GB ','GBV'/)
-!-----------------------------------------------------------------------------
-! wlong,welec,wtor,wang,wscloc are the weight of the energy terms 
-! corresponding to side-chain, electrostatic, torsional, valence-angle,
-! and local side-chain terms.
-!
-! IPOT determines which SC...SC interaction potential will be used:
-! 1 - LJ:  2n-n Lennard-Jones
-! 2 - LJK: 2n-n Kihara type (shifted Lennard-Jones) 
-! 3 - BP;  Berne-Pechukas (angular dependence)
-! 4 - GB;  Gay-Berne (angular dependence)
-! 5 - GBV; Gay-Berne-Vorobjev; angularly-dependent Kihara potential
-!-----------------------------------------------------------------------------
-! common.interact
-!      common /interact/
-      real(kind=8),dimension(:,:),allocatable :: aa,bb,augm !(ntyp,ntyp)
-      real(kind=8),dimension(:,:),allocatable :: aad,bad !(ntyp,2)
-      real(kind=8),dimension(2,2) :: app,bpp,ael6,ael3
-      integer :: expon,expon2, nnt,nct,itypro
-      integer,dimension(:,:),allocatable :: istart,iend !(maxres,maxint_gr)
-      integer,dimension(:),allocatable :: nint_gr,itype,itel,&
-       ielstart,ielend,ielstart_vdw,ielend_vdw,nscp_gr !(maxres)
-      integer,dimension(:,:),allocatable :: iscpstart,iscpend !(maxres,maxint_gr)
-      integer :: iatsc_s,iatsc_e,iatel_s,iatel_e,iatel_s_vdw,&
-       iatel_e_vdw,iatscp_s,iatscp_e,ispp,iscp
-! 12/1/95 Array EPS included in the COMMON block.
-!      common /body/
-      real(kind=8),dimension(:,:),allocatable :: sigma !(0:ntyp1,0:ntyp1)
-      real(kind=8),dimension(:,:),allocatable :: eps,sigmaii,&
-       rs0,chi,r0,r0e  !(ntyp,ntyp) r0e !!! nie używane
-      real(kind=8),dimension(:),allocatable :: chip,alp,sigma0,&
-       sigii,rr0       !(ntyp)
-      real(kind=8),dimension(2,2) :: rpp,epp,elpp6,elpp3
-      real(kind=8),dimension(:,:),allocatable :: r0d,eps_scp,rscp !(ntyp,2)  r0d  !!! nie używane
-! 12/5/03 modified 09/18/03 Bond stretching parameters.
-!      common /stretch/
-      real(kind=8) :: vbldp0,akp,distchainmax
-      real(kind=8),dimension(:,:),allocatable :: vbldsc0,aksc,abond0 !(maxbondterm,ntyp)
-      integer,dimension(:),allocatable :: nbondterm    !(ntyp)
-!-----------------------------------------------------------------------------
-! common.local
-! Parameters of ab initio-derived potential of virtual-bond-angle bending
-!      common /theta_abinitio/
-      integer :: nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,&
-       ndouble,nntheterm
-      integer,dimension(:),allocatable :: ithetyp !(-ntyp1:ntyp1)
-      real(kind=8),dimension(:,:,:,:),allocatable :: aa0thet
-!(-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,2)
-      real(kind=8),dimension(:,:,:,:,:),allocatable :: aathet
-      real(kind=8),dimension(:,:,:,:,:,:),allocatable :: bbthet,&
-       ccthet,ddthet,eethet
-!(maxsingle,maxtheterm2,-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,2)
-      real(kind=8),dimension(:,:,:,:,:,:,:),allocatable :: ffthet,ggthet
-!(maxdouble,maxdouble,maxtheterm3,-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,-maxthetyp1:maxthetyp1,2)
-! Parameters of the virtual-bond-angle probability distribution
-!      common /thetas/ 
-      real(kind=8),dimension(:),allocatable :: a0thet,theta0,&
-       sig0,sigc0      !(-ntyp:ntyp)
-      real(kind=8),dimension(:,:,:,:),allocatable :: athet,bthet !(2,-ntyp:ntyp,-1:1,-1:1)
-      real(kind=8),dimension(:,:),allocatable :: polthet       !(0:3,-ntyp:ntyp)
-      real(kind=8),dimension(:,:),allocatable :: gthet !(3,-ntyp:ntyp)
-! Parameters of the side-chain probability distribution
-!      common /sclocal/
-      real(kind=8),dimension(:),allocatable :: dsc,dsc_inv,dsc0 !(ntyp1)
-      real(kind=8),dimension(:,:),allocatable :: bsc !(maxlob,ntyp)
-      real(kind=8),dimension(:,:,:),allocatable :: censc !(3,maxlob,-ntyp:ntyp)
-      real(kind=8),dimension(:,:,:,:),allocatable :: gaussc !(3,3,maxlob,-ntyp:ntyp)
-      integer,dimension(:),allocatable :: nlob !(ntyp1)
-! Virtual-bond lenghts
-!      common /peptbond/
-      real(kind=8) :: vbl,vblinv,vblinv2,vbl_cis,vbl0
-!      common /indices/
-      integer :: loc_start,loc_end,ithet_start,ithet_end,iphi_start,&
-       iphi_end,iphid_start,iphid_end,ibond_start,ibond_end,&
-       ibondp_start,ibondp_end,ivec_start,ivec_end,iset_start,iset_end,&
-       iturn3_start,iturn3_end,iturn4_start,iturn4_end,iint_start,&
-       iint_end,iphi1_start,iphi1_end,itau_start,itau_end
-      integer,dimension(:),allocatable :: ibond_displ,ibond_count,&
-       ithet_displ,ithet_count,iphi_displ,iphi_count,iphi1_displ,&
-       iphi1_count,ivec_displ,ivec_count,iset_displ,iset_count,&
-       iint_count,iint_displ   !(0:max_fg_procs-1)
-!-----------------------------------------------------------------------------
-! common.MD
-!      common /mdgrad/
-      real(kind=8),dimension(:,:),allocatable :: gcart,gxcart !(3,0:MAXRES)
-      real(kind=8),dimension(:,:),allocatable :: gradcag,gradxag !(3,MAXRES)  !!! nie używane
-!      common /back_constr/
-      integer :: nfrag_back
-      real(kind=8) :: uconst_back
-      real(kind=8),dimension(:),allocatable :: utheta,ugamma,uscdiff !(maxfrag_back)
-      real(kind=8),dimension(:,:,:),allocatable :: wfrag_back !(3,maxfrag_back,maxprocs/20)
-      integer,dimension(:,:,:),allocatable :: ifrag_back !(3,maxfrag_back,maxprocs/20)
-!      common /qmeas/
-      real(kind=8),dimension(50) :: qfrag
-      real(kind=8),dimension(100) :: qpair
-      real(kind=8),dimension(:,:),allocatable :: qinfrag,wfrag !(50,maxprocs/20)
-      real(kind=8),dimension(:,:),allocatable :: qinpair,wpair !(100,maxprocs/20)
-      real(kind=8) :: eq_time,Uconst
-      integer :: iset,nset
-      integer,dimension(:),allocatable :: mset !(maxprocs/20)
-      integer,dimension(:,:,:),allocatable :: ifrag !(2,50,maxprocs/20)
-      integer,dimension(:,:,:),allocatable :: ipair !(2,100,maxprocs/20)
-      integer :: nfrag,npair
-      logical :: usampl
-!-----------------------------------------------------------------------------
-! common.sbridge
-!      common /sbridge/
-      real(kind=8) :: ss_depth,ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss
-      integer :: ns,nss,nfree
-      integer,dimension(:),allocatable :: iss  !(maxss)
-!      common /links/
-      real(kind=8),dimension(:),allocatable :: dhpb,forcon,dhpb1 !(maxdim) !el dhpb1 !!! nie używane
-      integer :: nhpb
-      integer,dimension(:),allocatable :: ihpb,jhpb,ibecarb !(maxdim) !el ibecarb !!! nie używane
-!      common /restraints/
-      real(kind=8) :: weidis
-!      common /links_split/
-      integer :: link_start,link_end
-!      common /dyn_ssbond/
-      real(kind=8) :: Ht
-      integer,dimension(:),allocatable :: idssb,jdssb !(maxdim)
-      logical :: dyn_ss
-      logical,dimension(:),allocatable :: dyn_ss_mask !(maxres)
-!-----------------------------------------------------------------------------
-! common.sccor
-! Parameters of the SCCOR term
-!      common/sccor/
-      real(kind=8),dimension(:,:,:,:),allocatable :: v1sccor,v2sccor !(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp)
-      real(kind=8),dimension(:,:,:),allocatable :: v0sccor !(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp)
-      integer :: nsccortyp
-      integer,dimension(:),allocatable :: isccortyp !(-ntyp:ntyp)
-      integer,dimension(:,:),allocatable :: nterm_sccor,nlor_sccor !(-ntyp:ntyp,-ntyp:ntyp)
-      real(kind=8),dimension(:,:,:),allocatable :: vlor1sccor,&
-       vlor2sccor,vlor3sccor   !(maxterm_sccor,20,20)
-      real(kind=8),dimension(:,:,:),allocatable :: gloc_sc !(3,0:maxres2,10)
-      real(kind=8),dimension(:,:,:,:),allocatable :: dtauangle !(3,3,3,maxres2)
-!-----------------------------------------------------------------------------
-! common.scrot
-! Parameters of the SC rotamers (local) term
-!      common/scrot/
-      real(kind=8),dimension(:,:),allocatable :: sc_parmin !(maxsccoef,ntyp)
-!-----------------------------------------------------------------------------
-! common.torcnstr
-!      common /torcnstr/
-      integer :: ndih_constr,ndih_nconstr
-      integer,dimension(:),allocatable :: idih_constr,idih_nconstr !(maxdih_constr)
-      integer :: idihconstr_start,idihconstr_end
-      real(kind=8) :: ftors
-      real(kind=8),dimension(:),allocatable :: drange !(maxdih_constr)
-      real(kind=8),dimension(:),allocatable :: phi0 !(maxdih_constr)
-!-----------------------------------------------------------------------------
-! common.torsion
-! Torsional constants of the rotation about virtual-bond dihedral angles
-!      common/torsion/
-      real(kind=8),dimension(:,:,:),allocatable :: v0 !(-maxtor:maxtor,-maxtor:maxtor,2)
-#ifdef CRYST_TOR
-      real(kind=8),dimension(:,:,:),allocatable :: v1,v2 !(maxterm,-maxtor:maxtor,-maxtor:maxtor)
-#else
-      real(kind=8),dimension(:,:,:,:),allocatable :: v1,v2 !(maxterm,-maxtor:maxtor,-maxtor:maxtor,2)
-#endif
-      real(kind=8),dimension(:,:,:),allocatable :: vlor1 !(maxlor,-maxtor:maxtor,-maxtor:maxtor)
-      real(kind=8),dimension(:,:,:),allocatable :: vlor2,vlor3 !(maxlor,maxtor,maxtor)
-      integer,dimension(:),allocatable :: itortyp !(-ntyp1:ntyp1)
-      integer,dimension(:,:,:),allocatable :: nterm,nlor !(-maxtor:maxtor,-maxtor:maxtor,2)
-      integer :: ntortyp,nterm_old
-! 6/23/01 - constants for double torsionals
-!      common /torsiond/ 
-      real(kind=8),dimension(:,:,:,:,:,:),allocatable :: v1c,v1s 
-        !(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
-      real(kind=8),dimension(:,:,:,:,:,:),allocatable :: v2c,v2s
-        !(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
-      integer,dimension(:,:,:,:),allocatable :: ntermd_1,ntermd_2
-        !(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
-! 9/18/99 - added Fourier coeffficients of the expansion of local energy 
-!           surfacecommon
-!      common/fourier/
-      real(kind=8),dimension(:,:),allocatable :: b1,b2,&
-       b1tilde !(2,-maxtor:maxtor),
-      real(kind=8),dimension(:,:,:),allocatable :: cc,dd,ee,&
-       ctilde,dtilde !(2,2,-maxtor:maxtor)
-      integer :: nloctyp
-!      common/fourier/  z wham
-      real(kind=8),dimension(:,:),allocatable :: b !(13,0:maxtor)
-!-----------------------------------------------------------------------------
-! common.var
-! Store the geometric variables in the following COMMON block.
-!      common /var/ in module geometry_data
-! Store the angles and variables corresponding to old conformations (for use
-! in MCM).
-!      common /oldgeo/
-!el      real(kind=8),dimension(:,:),allocatable :: varsave !(maxvar,maxsave)
-!      real(kind=8),dimension(:),allocatable :: esave !(maxsave)
-!      integer,dimension(:),allocatable :: Origin !(maxsave)
-!      integer :: nstore
-! freeze some variables
-!      common /restr/
-      real(kind=8),dimension(:),allocatable :: varall !(maxvar)
-      integer,dimension(:),allocatable :: mask_theta,&
-       mask_phi,mask_side !(maxres)
-      logical :: mask_r
-!-----------------------------------------------------------------------------
-!-----------------------------------------------------------------------------
-      end module energy_data