cmake changes for pgf90
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 17 May 2016 23:44:29 +0000 (01:44 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 17 May 2016 23:44:29 +0000 (01:44 +0200)
isnand() used instead of isnan() for pgf90
cleaning of double common files in cluster_wham include_unres

19 files changed:
source/cluster/wham/src-M/CMakeLists.txt
source/cluster/wham/src-M/include_unres/COMMON.CONTACTS [deleted file]
source/cluster/wham/src-M/include_unres/COMMON.FFIELD [deleted file]
source/cluster/wham/src-M/include_unres/COMMON.NAMES [deleted file]
source/cluster/wham/src-M/include_unres/COMMON.SBRIDGE [deleted file]
source/cluster/wham/src-M/include_unres/COMMON.SCCOR [deleted file]
source/cluster/wham/src/CMakeLists.txt
source/cluster/wham/src/include_unres/COMMON.CONTACTS [deleted file]
source/cluster/wham/src/include_unres/COMMON.FFIELD [deleted file]
source/cluster/wham/src/include_unres/COMMON.NAMES [deleted file]
source/cluster/wham/src/include_unres/COMMON.SCCOR [deleted file]
source/lib/isnan_pgi.f [new file with mode: 0644]
source/unres/src_CSA/CMakeLists.txt
source/unres/src_MD-M/CMakeLists.txt
source/unres/src_MD/CMakeLists.txt
source/unres/src_MIN/CMakeLists.txt
source/wham/src-M/CMakeLists.txt
source/wham/src/CMakeLists.txt
source/wham/src/include_unres/COMMON.VAR [deleted file]

index 5dd1379..83b1382 100644 (file)
@@ -112,6 +112,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_CLUSTER_WHAM_M_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 
diff --git a/source/cluster/wham/src-M/include_unres/COMMON.CONTACTS b/source/cluster/wham/src-M/include_unres/COMMON.CONTACTS
deleted file mode 100644 (file)
index d07a0f0..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-C Change 12/1/95 - common block CONTACTS1 included.
-      integer ncont,ncont_ref,icont,icont_ref,num_cont,jcont
-      double precision facont,gacont
-      common /contacts/ ncont,ncont_ref,icont(2,maxcont),
-     &                  icont_ref(2,maxcont)
-      common /contacts1/ facont(maxconts,maxres),
-     &                  gacont(3,maxconts,maxres),
-     &                  num_cont(maxres),jcont(maxconts,maxres)
-C 12/26/95 - H-bonding contacts
-      common /contacts_hb/ 
-     &  gacontp_hb1(3,maxconts,maxres),gacontp_hb2(3,maxconts,maxres),
-     &  gacontp_hb3(3,maxconts,maxres),
-     &  gacontm_hb1(3,maxconts,maxres),gacontm_hb2(3,maxconts,maxres),
-     &  gacontm_hb3(3,maxconts,maxres),
-     &  gacont_hbr(3,maxconts,maxres),
-     &  grij_hb_cont(3,maxconts,maxres),
-     &  facont_hb(maxconts,maxres),ees0p(maxconts,maxres),
-     &  ees0m(maxconts,maxres),d_cont(maxconts,maxres),
-     &  num_cont_hb(maxres),jcont_hb(maxconts,maxres)
-C 9/23/99 Added improper rotation matrices and matrices of dipole-dipole 
-C         interactions     
-C Interactions of pseudo-dipoles generated by loc-el interactions.
-      double precision dip,dipderg,dipderx
-      common /dipint/ dip(4,maxconts,maxres),dipderg(4,maxconts,maxres),
-     &  dipderx(3,5,4,maxconts,maxres)
-C 10/30/99 Added other pre-computed vectors and matrices needed 
-C          to calculate three - six-order el-loc correlation terms
-      double precision Ug,Ugder,Ug2,Ug2der,obrot,obrot2,obrot_der,
-     &  obrot2_der,Ub2,Ub2der,mu,muder,EUg,EUgder,CUg,CUgder,
-     &  DUg,DUgder,DtUg2,DtUg2der,Ctobr,Ctobrder,Dtobr2,Dtobr2der
-      common /rotat/ Ug(2,2,maxres),Ugder(2,2,maxres),Ug2(2,2,maxres),
-     &  Ug2der(2,2,maxres),obrot(2,maxres),obrot2(2,maxres),
-     &  obrot_der(2,maxres),obrot2_der(2,maxres)
-C This common block contains vectors and matrices dependent on a single
-C amino-acid residue.
-      common /precomp1/ Ub2(2,maxres),Ub2der(2,maxres),mu(2,maxres),
-     &  EUg(2,2,maxres),EUgder(2,2,maxres),CUg(2,2,maxres),
-     &  CUgder(2,2,maxres),DUg(2,2,maxres),Dugder(2,2,maxres),
-     &  DtUg2(2,2,maxres),DtUg2der(2,2,maxres),Ctobr(2,maxres),
-     &  Ctobrder(2,maxres),Dtobr2(2,maxres),Dtobr2der(2,maxres)
-C This common block contains vectors and matrices dependent on two
-C consecutive amino-acid residues.
-      double precision Ug2Db1t,Ug2Db1tder,CUgb2,CUgb2der,EUgC,
-     &  EUgCder,EUgD,EUgDder,DtUg2EUg,DtUg2EUgder
-      common /precomp2/ Ug2Db1t(2,maxres),Ug2Db1tder(2,maxres),
-     &  CUgb2(2,maxres),CUgb2der(2,maxres),EUgC(2,2,maxres),
-     &  EUgCder(2,2,maxres),EUgD(2,2,maxres),EUgDder(2,2,maxres),
-     &  DtUg2EUg(2,2,maxres),DtUg2EUgder(2,2,2,maxres),
-     &  Ug2DtEUg(2,2,maxres),Ug2DtEUgder(2,2,2,maxres)
-      double precision costab,sintab,costab2,sintab2
-      common /rotat_old/ costab(maxres),sintab(maxres),
-     &  costab2(maxres),sintab2(maxres),muder(2,maxres)
-C This common block contains dipole-interaction matrices and their 
-C Cartesian derivatives.
-      double precision a_chuj,a_chuj_der
-      common /dipmat/ a_chuj(2,2,maxconts,maxres),
-     &  a_chuj_der(2,2,3,5,maxconts,maxres)
-      double precision AEA,AEAderg,AEAderx,AECA,AECAderg,AECAderx,
-     &  ADtEA,ADtEAderg,ADtEAderx,AEAb1,AEAb1derg,AEAb1derx,
-     &  AEAb2,AEAb2derg,AEAb2derx
-      common /diploc/ AEA(2,2,2),AEAderg(2,2,2),AEAderx(2,2,3,5,2,2),
-     &  EAEA(2,2,2), EAEAderg(2,2,2,2), EAEAderx(2,2,3,5,2,2),
-     &  AECA(2,2,2),AECAderg(2,2,2),AECAderx(2,2,3,5,2,2),
-     &  ADtEA(2,2,2),ADtEAderg(2,2,2,2),ADtEAderx(2,2,3,5,2,2),
-     &  ADtEA1(2,2,2),ADtEA1derg(2,2,2,2),ADtEA1derx(2,2,3,5,2,2),
-     &  AEAb1(2,2,2),AEAb1derg(2,2,2),AEAb1derx(2,3,5,2,2,2),
-     &  AEAb2(2,2,2),AEAb2derg(2,2,2,2),AEAb2derx(2,3,5,2,2,2),
-     &  g_contij(3,2),ekont
diff --git a/source/cluster/wham/src-M/include_unres/COMMON.FFIELD b/source/cluster/wham/src-M/include_unres/COMMON.FFIELD
deleted file mode 100644 (file)
index 0c169f7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-C-----------------------------------------------------------------------
-C The following COMMON block selects the type of the force field used in
-C calculations and defines weights of various energy terms.
-C 12/1/95 wcorr added
-C-----------------------------------------------------------------------
-      double precision wsc,wscp,welec,wstrain,wtor,wtor_d,wang,wscloc,
-     &    wcorr,wcorr4,wcorr5,wcorr6,wsccor,wel_loc,wturn3,wturn4,
-     &    wturn6,wvdwpp,wbond,weights,scal14,cutoff_corr,delt_corr,
-     &    r0_corr
-      integer ipot,n_ene_comp
-      common /ffield/ wsc,wscp,welec,wstrain,wtor,wtor_d,wang,wscloc,
-     &    wcorr,wcorr4,wcorr5,wcorr6,wsccor,wel_loc,wturn3,wturn4,
-     &    wturn6,wvdwpp,wbond,weights(max_ene),
-     &    scal14,cutoff_corr,delt_corr,r0_corr,ipot,n_ene_comp
-      common /potentials/ potname(5)
-      character*3 potname
-C-----------------------------------------------------------------------
-C wlong,welec,wtor,wang,wscloc are the weight of the energy terms 
-C corresponding to side-chain, electrostatic, torsional, valence-angle,
-C and local side-chain terms.
-C
-C IPOT determines which SC...SC interaction potential will be used:
-C 1 - LJ:  2n-n Lennard-Jones
-C 2 - LJK: 2n-n Kihara type (shifted Lennard-Jones) 
-C 3 - BP;  Berne-Pechukas (angular dependence)
-C 4 - GB;  Gay-Berne (angular dependence)
-C 5 - GBV; Gay-Berne-Vorobjev; angularly-dependent Kihara potential
-C------------------------------------------------------------------------
diff --git a/source/cluster/wham/src-M/include_unres/COMMON.NAMES b/source/cluster/wham/src-M/include_unres/COMMON.NAMES
deleted file mode 100644 (file)
index a266339..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-      character*3 restyp
-      character*1 onelet
-      common /names/ restyp(ntyp+1),onelet(ntyp+1)
-      character*10 ename,wname
-      integer nprint_ene,print_order
-      common /namterm/ ename(max_ene),wname(max_ene),nprint_ene,
-     &   print_order(max_ene)
diff --git a/source/cluster/wham/src-M/include_unres/COMMON.SBRIDGE b/source/cluster/wham/src-M/include_unres/COMMON.SBRIDGE
deleted file mode 100644 (file)
index 5c87412..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-      double precision ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,dhpb,
-     & forcon,weidis
-      integer ns,nss,nfree,iss,ihpb,jhpb,nhpb,link_start,link_end
-      common /sbridge/ ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,ns,nss,
-     &  nfree,iss(maxss)
-      common /links/ dhpb(maxdim),forcon(maxdim),ihpb(maxdim),
-     & jhpb(maxdim),nhpb
-      common /restraints/ weidis
-      common /links_split/ link_start,link_end
diff --git a/source/cluster/wham/src-M/include_unres/COMMON.SCCOR b/source/cluster/wham/src-M/include_unres/COMMON.SCCOR
deleted file mode 100644 (file)
index 5217de7..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-C Parameters of the SCCOR term
-      double precision v1sccor,v2sccor
-      integer nterm_sccor
-      common/torsion/v1sccor(maxterm_sccor,20,20),
-     &    v2sccor(maxterm_sccor,20,20),
-     &    nterm_sccor
index 758582d..e20baf4 100644 (file)
@@ -66,6 +66,8 @@ if (Fortran_COMPILER_NAME STREQUAL "ifort")
   set(FFLAGS0 "-mcmodel=medium -shared-intel -ip -w -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres " ) 
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   set(FFLAGS0 "-std=legacy -mcmodel=medium -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres " ) 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(FFLAGS0 "-mcmodel=medium -Mlarge_arrays -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" )
 else ()
   set(FFLAGS0 "-mcmodel=medium -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres " ) 
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
@@ -113,6 +115,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_CLUSTER_WHAM_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
+  set(CMAKE_EXE_LINKER_FLAGS "-Bdynamic")
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 
diff --git a/source/cluster/wham/src/include_unres/COMMON.CONTACTS b/source/cluster/wham/src/include_unres/COMMON.CONTACTS
deleted file mode 100644 (file)
index d07a0f0..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-C Change 12/1/95 - common block CONTACTS1 included.
-      integer ncont,ncont_ref,icont,icont_ref,num_cont,jcont
-      double precision facont,gacont
-      common /contacts/ ncont,ncont_ref,icont(2,maxcont),
-     &                  icont_ref(2,maxcont)
-      common /contacts1/ facont(maxconts,maxres),
-     &                  gacont(3,maxconts,maxres),
-     &                  num_cont(maxres),jcont(maxconts,maxres)
-C 12/26/95 - H-bonding contacts
-      common /contacts_hb/ 
-     &  gacontp_hb1(3,maxconts,maxres),gacontp_hb2(3,maxconts,maxres),
-     &  gacontp_hb3(3,maxconts,maxres),
-     &  gacontm_hb1(3,maxconts,maxres),gacontm_hb2(3,maxconts,maxres),
-     &  gacontm_hb3(3,maxconts,maxres),
-     &  gacont_hbr(3,maxconts,maxres),
-     &  grij_hb_cont(3,maxconts,maxres),
-     &  facont_hb(maxconts,maxres),ees0p(maxconts,maxres),
-     &  ees0m(maxconts,maxres),d_cont(maxconts,maxres),
-     &  num_cont_hb(maxres),jcont_hb(maxconts,maxres)
-C 9/23/99 Added improper rotation matrices and matrices of dipole-dipole 
-C         interactions     
-C Interactions of pseudo-dipoles generated by loc-el interactions.
-      double precision dip,dipderg,dipderx
-      common /dipint/ dip(4,maxconts,maxres),dipderg(4,maxconts,maxres),
-     &  dipderx(3,5,4,maxconts,maxres)
-C 10/30/99 Added other pre-computed vectors and matrices needed 
-C          to calculate three - six-order el-loc correlation terms
-      double precision Ug,Ugder,Ug2,Ug2der,obrot,obrot2,obrot_der,
-     &  obrot2_der,Ub2,Ub2der,mu,muder,EUg,EUgder,CUg,CUgder,
-     &  DUg,DUgder,DtUg2,DtUg2der,Ctobr,Ctobrder,Dtobr2,Dtobr2der
-      common /rotat/ Ug(2,2,maxres),Ugder(2,2,maxres),Ug2(2,2,maxres),
-     &  Ug2der(2,2,maxres),obrot(2,maxres),obrot2(2,maxres),
-     &  obrot_der(2,maxres),obrot2_der(2,maxres)
-C This common block contains vectors and matrices dependent on a single
-C amino-acid residue.
-      common /precomp1/ Ub2(2,maxres),Ub2der(2,maxres),mu(2,maxres),
-     &  EUg(2,2,maxres),EUgder(2,2,maxres),CUg(2,2,maxres),
-     &  CUgder(2,2,maxres),DUg(2,2,maxres),Dugder(2,2,maxres),
-     &  DtUg2(2,2,maxres),DtUg2der(2,2,maxres),Ctobr(2,maxres),
-     &  Ctobrder(2,maxres),Dtobr2(2,maxres),Dtobr2der(2,maxres)
-C This common block contains vectors and matrices dependent on two
-C consecutive amino-acid residues.
-      double precision Ug2Db1t,Ug2Db1tder,CUgb2,CUgb2der,EUgC,
-     &  EUgCder,EUgD,EUgDder,DtUg2EUg,DtUg2EUgder
-      common /precomp2/ Ug2Db1t(2,maxres),Ug2Db1tder(2,maxres),
-     &  CUgb2(2,maxres),CUgb2der(2,maxres),EUgC(2,2,maxres),
-     &  EUgCder(2,2,maxres),EUgD(2,2,maxres),EUgDder(2,2,maxres),
-     &  DtUg2EUg(2,2,maxres),DtUg2EUgder(2,2,2,maxres),
-     &  Ug2DtEUg(2,2,maxres),Ug2DtEUgder(2,2,2,maxres)
-      double precision costab,sintab,costab2,sintab2
-      common /rotat_old/ costab(maxres),sintab(maxres),
-     &  costab2(maxres),sintab2(maxres),muder(2,maxres)
-C This common block contains dipole-interaction matrices and their 
-C Cartesian derivatives.
-      double precision a_chuj,a_chuj_der
-      common /dipmat/ a_chuj(2,2,maxconts,maxres),
-     &  a_chuj_der(2,2,3,5,maxconts,maxres)
-      double precision AEA,AEAderg,AEAderx,AECA,AECAderg,AECAderx,
-     &  ADtEA,ADtEAderg,ADtEAderx,AEAb1,AEAb1derg,AEAb1derx,
-     &  AEAb2,AEAb2derg,AEAb2derx
-      common /diploc/ AEA(2,2,2),AEAderg(2,2,2),AEAderx(2,2,3,5,2,2),
-     &  EAEA(2,2,2), EAEAderg(2,2,2,2), EAEAderx(2,2,3,5,2,2),
-     &  AECA(2,2,2),AECAderg(2,2,2),AECAderx(2,2,3,5,2,2),
-     &  ADtEA(2,2,2),ADtEAderg(2,2,2,2),ADtEAderx(2,2,3,5,2,2),
-     &  ADtEA1(2,2,2),ADtEA1derg(2,2,2,2),ADtEA1derx(2,2,3,5,2,2),
-     &  AEAb1(2,2,2),AEAb1derg(2,2,2),AEAb1derx(2,3,5,2,2,2),
-     &  AEAb2(2,2,2),AEAb2derg(2,2,2,2),AEAb2derx(2,3,5,2,2,2),
-     &  g_contij(3,2),ekont
diff --git a/source/cluster/wham/src/include_unres/COMMON.FFIELD b/source/cluster/wham/src/include_unres/COMMON.FFIELD
deleted file mode 100644 (file)
index 0c169f7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-C-----------------------------------------------------------------------
-C The following COMMON block selects the type of the force field used in
-C calculations and defines weights of various energy terms.
-C 12/1/95 wcorr added
-C-----------------------------------------------------------------------
-      double precision wsc,wscp,welec,wstrain,wtor,wtor_d,wang,wscloc,
-     &    wcorr,wcorr4,wcorr5,wcorr6,wsccor,wel_loc,wturn3,wturn4,
-     &    wturn6,wvdwpp,wbond,weights,scal14,cutoff_corr,delt_corr,
-     &    r0_corr
-      integer ipot,n_ene_comp
-      common /ffield/ wsc,wscp,welec,wstrain,wtor,wtor_d,wang,wscloc,
-     &    wcorr,wcorr4,wcorr5,wcorr6,wsccor,wel_loc,wturn3,wturn4,
-     &    wturn6,wvdwpp,wbond,weights(max_ene),
-     &    scal14,cutoff_corr,delt_corr,r0_corr,ipot,n_ene_comp
-      common /potentials/ potname(5)
-      character*3 potname
-C-----------------------------------------------------------------------
-C wlong,welec,wtor,wang,wscloc are the weight of the energy terms 
-C corresponding to side-chain, electrostatic, torsional, valence-angle,
-C and local side-chain terms.
-C
-C IPOT determines which SC...SC interaction potential will be used:
-C 1 - LJ:  2n-n Lennard-Jones
-C 2 - LJK: 2n-n Kihara type (shifted Lennard-Jones) 
-C 3 - BP;  Berne-Pechukas (angular dependence)
-C 4 - GB;  Gay-Berne (angular dependence)
-C 5 - GBV; Gay-Berne-Vorobjev; angularly-dependent Kihara potential
-C------------------------------------------------------------------------
diff --git a/source/cluster/wham/src/include_unres/COMMON.NAMES b/source/cluster/wham/src/include_unres/COMMON.NAMES
deleted file mode 100644 (file)
index a266339..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-      character*3 restyp
-      character*1 onelet
-      common /names/ restyp(ntyp+1),onelet(ntyp+1)
-      character*10 ename,wname
-      integer nprint_ene,print_order
-      common /namterm/ ename(max_ene),wname(max_ene),nprint_ene,
-     &   print_order(max_ene)
diff --git a/source/cluster/wham/src/include_unres/COMMON.SCCOR b/source/cluster/wham/src/include_unres/COMMON.SCCOR
deleted file mode 100644 (file)
index 5217de7..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-C Parameters of the SCCOR term
-      double precision v1sccor,v2sccor
-      integer nterm_sccor
-      common/torsion/v1sccor(maxterm_sccor,20,20),
-     &    v2sccor(maxterm_sccor,20,20),
-     &    nterm_sccor
diff --git a/source/lib/isnan_pgi.f b/source/lib/isnan_pgi.f
new file mode 100644 (file)
index 0000000..19e6816
--- /dev/null
@@ -0,0 +1,7 @@
+        logical function isnan(a)
+        logical isnand
+        double precision a
+        isnan=isnand(a)
+        return
+        end
+        
\ No newline at end of file
index c0a3592..3caa356 100644 (file)
@@ -176,6 +176,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_CSA_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 #=========================================
index 9c3491b..fdcdd4f 100644 (file)
@@ -226,6 +226,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_MDM_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 
index 499cfcb..a3d755f 100644 (file)
@@ -197,7 +197,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
-  set(CPPFLAGS "${CPPFLAGS} -DG77") 
+  set(CPPFLAGS "${CPPFLAGS} -DG77")
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_MD_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 #=========================================
index 9c26942..6ba42de 100644 (file)
@@ -172,6 +172,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_MIN_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 
index a2dbc43..dddb2b1 100644 (file)
@@ -155,6 +155,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_WHAM_M_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
+  set(CMAKE_EXE_LINKER_FLAGS "-Bdynamic")
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 #=========================================
index f17a4b4..51ed5be 100644 (file)
@@ -97,6 +97,8 @@ if (Fortran_COMPILER_NAME STREQUAL "ifort")
   set(FFLAGS0 "-mcmodel=medium -shared-intel  -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) 
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   set(FFLAGS0 "-std=legacy -mcmodel=medium -g -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(FFLAGS0 "-mcmodel=medium -Mlarge_arrays -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" )
 else ()
   set(FFLAGS0 "-g -mcmodel=medium -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" )   
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
@@ -156,6 +158,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_WHAM_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
+  set(CMAKE_EXE_LINKER_FLAGS "-Bdynamic")
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 #=========================================
diff --git a/source/wham/src/include_unres/COMMON.VAR b/source/wham/src/include_unres/COMMON.VAR
deleted file mode 100644 (file)
index d560c87..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-C Store the geometric variables in the following COMMON block.
-      integer ntheta,nphi,nside,nvar,Origin,nstore,ialph,ivar,
-     &        mask_theta,mask_phi,mask_side
-      double precision theta,phi,alph,omeg,varsave,esave,varall,vbld,
-     &          thetaref,phiref,costtab,sinttab,cost2tab,sint2tab,
-     &          xxtab,yytab,zztab,xxref,yyref,zzref
-      common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
-     &          omicron(2,maxres),tauangle(3,maxres),
-     &          vbld(2*maxres),thetaref(maxres),phiref(maxres),
-     &          costtab(maxres), sinttab(maxres), cost2tab(maxres),
-     &          sint2tab(maxres),xxtab(maxres),yytab(maxres),
-     &          zztab(maxres),xxref(maxres),yyref(maxres),zzref(maxres),
-     &          ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
-C Store the angles and variables corresponding to old conformations (for use
-C in MCM).
-      common /oldgeo/ varsave(maxvar,maxsave),esave(maxsave),
-     &  Origin(maxsave),nstore
-C freeze some variables
-      logical mask_r
-      common /restr/ varall(maxvar),mask_r,mask_theta(maxres),
-     &               mask_phi(maxres),mask_side(maxres)