[e40e335] | 1 | # Makefile: smmp
|
---|
| 2 |
|
---|
| 3 | #.SILENT:
|
---|
| 4 |
|
---|
| 5 | %_p.o : %_p.f
|
---|
| 6 | $(MPIF90) $(F_FLAGS) $<
|
---|
| 7 |
|
---|
| 8 | .SUFFIXES: .o .f
|
---|
| 9 | .f.o:
|
---|
| 10 | $(F90) $(F_FLAGS) $<
|
---|
| 11 |
|
---|
| 12 | .SUFFIXES: .o .f90
|
---|
| 13 | .f90.o:
|
---|
| 14 | $(F90) $(F_FLAGS) $<
|
---|
| 15 |
|
---|
| 16 | # ==================================== Variables for compiling and linking
|
---|
| 17 | # L_FLAGS=-g
|
---|
| 18 | # Linker flags
|
---|
| 19 | # Default flags, e.g., for gfortran, g77
|
---|
| 20 | L_FLAGS=-O2 -g
|
---|
| 21 |
|
---|
| 22 | # Flags for Intel's ifort
|
---|
| 23 | # L_FLAGS=-O3 -axW -g
|
---|
| 24 |
|
---|
| 25 | # FLAGS for Cray
|
---|
| 26 | # L_FLAGS=-fastsse -Mipa
|
---|
| 27 |
|
---|
| 28 | # Flags for xlf
|
---|
| 29 | # L_FLAGS=-O3 -qhot -q64 -qipa -qextname=flush
|
---|
| 30 |
|
---|
| 31 | # Optimized flag for gfortran on an i686 platform
|
---|
| 32 | # L_FLAGS=-fPIC -O3 -funroll-loops -mmmx -msse2 -msse -march=i686 -malign-double -fomit-frame-pointer
|
---|
| 33 |
|
---|
| 34 | # Compiler flags
|
---|
| 35 | # Default flags, e.g., for gfortran, g77
|
---|
| 36 | F_FLAGS=-c -O2 -g
|
---|
| 37 | # Flags for Intel's ifort
|
---|
| 38 | # F_FLAGS=-c -O3 -axW -g
|
---|
| 39 | # Flags for debugging build
|
---|
| 40 | # F_FLAGS=-c -O0 -g
|
---|
| 41 | # FLAGS for Cray
|
---|
| 42 | # F_FLAGS=-c -fastsse -Mipa
|
---|
| 43 | # Flags for xlf
|
---|
| 44 | #F_FLAGS=-c -O3 -qhot -q64 -qipa -qextname=flush
|
---|
| 45 |
|
---|
| 46 | # Optimized flag for gfortran on an i686 platform
|
---|
| 47 | # F_FLAGS=-c -fPIC -O3 -funroll-loops -mmmx -msse2 -msse -march=i686 -malign-double -fomit-frame-pointer
|
---|
| 48 |
|
---|
| 49 | # Select your compiler
|
---|
| 50 | F90=gfortran
|
---|
| 51 | #F90=ifort
|
---|
| 52 | #F90=pgf90
|
---|
| 53 | #F90=xlf
|
---|
| 54 | MPIF90=mpif90
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | # ______________________________________________ Name of program
|
---|
| 58 | PROG=smmp
|
---|
| 59 | # ______________________________________________ Objects
|
---|
| 60 | OBJ=redseq.o bldmol.o getmol.o redvar.o setvar.o \
|
---|
| 61 | difang.o setmvs.o mklist.o redstr.o dihedr.o enyflx.o addend.o opeflx.o opeshe.o minim.o minqsn.o\
|
---|
| 62 | contacts.o hbond.o helix.o anneal.o metropolis.o rgyr.o zimmer.o \
|
---|
| 63 | canon.o mulcan_par_mod.o outvar.o outpdb.o \
|
---|
| 64 | pdbread.o rmsdfun.o enyreg.o opereg.o mincjg.o cnteny.o \
|
---|
| 65 | init_energy.o init_molecule.o gradient.o energy.o \
|
---|
| 66 | regul.o nursvr.o twister.o eninteract.o bgs.o eyabgn.o enylun.o utilities.o\
|
---|
| 67 | partem_s.o esolan.o opesol.o
|
---|
| 68 | #_________Serial implementation of ECEPP/3 and solvent
|
---|
| 69 | SOBJ=enyshe.o enysol.o
|
---|
| 70 | #_________Parallel implementation of ECEPP/3 and solvent
|
---|
| 71 | POBJ=enyshe_p.o enysol_p.o partem_p.o
|
---|
| 72 |
|
---|
| 73 | FILES=metropolis.f energy.f enyflx.f enyreg.f enyshe.f enysol.f redseq.f bldmol.f \
|
---|
| 74 | getmol.f redvar.f setvar.f difang.f setmvs.f mklist.f redstr.f dihedr.f addend.f \
|
---|
| 75 | opeflx.f opeshe.f minim.f minqsn.f contacts.f hbond.f helix.f anneal.f rgyr.f \
|
---|
| 76 | zimmer.f canon.f outvar.f outpdb.f \
|
---|
| 77 | pdbread.f rmsdfun.f opereg.f mincjg.f cnteny.f init_energy.f init_molecule.f \
|
---|
| 78 | gradient.f regul.f nursvr.f twister.f eninteract.f bgs.f eyabgn.f enylun.f \
|
---|
| 79 | mulcan_par_mod.f90 esolan.f opesol.f
|
---|
| 80 | # partem_s.f
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 | pyInterface=init_molecule init_energy mulcan_par mulcan_sim \
|
---|
| 84 | init_lund sgrnd energy helix zimmer rgyr rmsdfun \
|
---|
| 85 | anneal canon outpdb minim regul contacts interhbond hbond
|
---|
| 86 | # metropolis
|
---|
| 87 | # ============================================== Linking
|
---|
| 88 |
|
---|
| 89 | $(PROG): $(OBJ) $(SOBJ) main.o
|
---|
| 90 | $(F90) -o $(PROG) $(L_FLAGS) main.o $(OBJ) $(SOBJ)
|
---|
| 91 |
|
---|
| 92 | # Build parallel version of SMMP.
|
---|
| 93 | parallel: $(OBJ) $(POBJ) main_p.o
|
---|
| 94 | $(MPIF90) -o $(PROG) $(L_FLAGS) main_p.o $(OBJ) $(POBJ)
|
---|
| 95 |
|
---|
| 96 | # Cross compile for BlueGene/P
|
---|
| 97 | bgl: BGL_L_FLAGS = -L$(BGLSYS)/lib -lmpich.rts -lfmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -qextname=flush
|
---|
| 98 | bgl: F_FLAGS = -c -O5 -qhot -g -I$(BGLSYS)/include -L$(BGLSYS)/lib -qarch=440 -qtune=440 -qextname=flush
|
---|
| 99 | bgl: BGL_F90 = blrts_xlf
|
---|
| 100 | bgl: F90 = $(BGL_F90)
|
---|
| 101 | bgl: MPIF90 = $(BGL_F90)
|
---|
| 102 | bgl: CC = blrts_xlc
|
---|
| 103 | bgl: LIBSF_MPI=-lmpich.rts -lfmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts
|
---|
| 104 |
|
---|
| 105 | bgl: $(OBJ) $(POBJ) main_bgl_p.o
|
---|
| 106 | $(BGL_F90) -o $(PROG).rts $(BGL_L_FLAGS) main_bgl_p.o $(OBJ) $(POBJ) $(LIBSF_MPI)
|
---|
| 107 |
|
---|
| 108 | # Build the python bindings
|
---|
| 109 | pybind: $(FILES)
|
---|
| 110 | #./rmexclpoint.py $(FILES)
|
---|
| 111 | f2py -c -m smmp smmp.pyf $(FILES) --f90exec=$(F90) --f77exec=$(F90)
|
---|
| 112 | #./restoreexclpoint.py $(FILES)
|
---|
| 113 |
|
---|
| 114 | newpybind: $(FILES)
|
---|
| 115 | ./rmexclpoint.py $(FILES)
|
---|
| 116 | mv smmp.pyf smmp.pyf.bak
|
---|
| 117 | f2py -h smmp.pyf -m smmp only: ${pyInterface} : $(FILES)
|
---|
| 118 | ./restoreexclpoint.py $(FILES)
|
---|
| 119 |
|
---|
| 120 | doc:
|
---|
| 121 | $(MAKE) -w -C doc/
|
---|
| 122 | doxygen pySMMP.doxygen
|
---|
| 123 |
|
---|
| 124 | examples: $(PROG)
|
---|
| 125 | $(MAKE) -w -C EXAMPLES/
|
---|
| 126 |
|
---|
| 127 | # ______________________________________________ Dependancies
|
---|
| 128 | main.o: multicanonical.mod
|
---|
| 129 |
|
---|
| 130 | multicanonical.mod: mulcan_par_mod.f90
|
---|
| 131 | $(F90) $(F_FLAGS) mulcan_par_mod.f90
|
---|
| 132 |
|
---|
| 133 | # enyshe_p.o:
|
---|
| 134 | # $(MPIF90) $(F_FLAGS) enyshe_p.f
|
---|
| 135 | # enysol_p.o:
|
---|
| 136 | # $(MPIF90) $(F_FLAGS) enysol_p.f
|
---|
| 137 | # partem_p.o:
|
---|
| 138 | # $(MPIF90) $(F_FLAGS) partem_p.f
|
---|
| 139 | # main_p.o:
|
---|
| 140 | # $(MPIF90) $(F_FLAGS) main_p.f
|
---|
| 141 |
|
---|
| 142 | main.o redseq.o eyring.o bldmol.o getmol.o redvar.o setvar.o \
|
---|
| 143 | difang.o setmvs.o mklist.o redstr.o dihedr.o enyflx.o\
|
---|
| 144 | enyshe.o addend.o opeflx.o opeshe.o minim.o minqsn.o enysol.o esolan.o\
|
---|
| 145 | contacts.o hbond.o helix.o anneal.o metropolis.o rgyr.o zimmer.o\
|
---|
| 146 | pdbvars.o rmsdfun.o enyreg.o opereg.o cnteny.o opesol.o\
|
---|
| 147 | init_energy.o init_molecule.o gradient.o energy.o nursvr.o\
|
---|
| 148 | regul.o eninteract.o bgs.o eyabgn.o enylun.o \
|
---|
| 149 | canon.o mulcan_par.o mulcan_sim.o outvar.o outpdb.o partem_s.o: INCL.H
|
---|
| 150 |
|
---|
| 151 | pdbread.o enyreg.o opereg.o init_molecule.o regul.o: INCP.H
|
---|
| 152 |
|
---|
| 153 | .PHONY: clean, restore, doc
|
---|
| 154 | clean:
|
---|
| 155 | $(MAKE) -w -C EXAMPLES/ clean
|
---|
| 156 | rm -f smmp core* *.o *~ *.mod
|
---|
| 157 | restore:
|
---|
| 158 | ./restoreexclpoint.py $(FILES)
|
---|
| 159 |
|
---|
| 160 | # end
|
---|