forked from plumed/plumed2
/
gromacs-4.5.5.config
38 lines (27 loc) · 1.29 KB
/
gromacs-4.5.5.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function plumed_preliminary_test(){
# check if the README contains the word GROMACS and if gromacs has been already configured
grep -q GROMACS README 1>/dev/null 2>/dev/null && test -f src/kernel/Makefile
}
function plumed_before_patch(){
mv src/kernel/Makefile src/kernel/Makefile.plumedbck
echo "Ad-hoc modification src/kernel/Makefile - saved to src/kernel/Makefile.plumedbck"
awk 'BEGIN{
print "include ../../Plumed.inc"
}{if($1=="mdrun_LDADD" && $2=="="){print $0" $(PLUMED_LOAD) "}else{print }}' src/kernel/Makefile.plumedbck > src/kernel/Makefile
}
function plumed_after_revert(){
echo "Restoring src/kernel/Makefile from src/kernel/Makefile.plumedbck"
mv src/kernel/Makefile.plumedbck src/kernel/Makefile
}
function plumed_patch_info(){
cat << EOF
PLUMED can be incorporated into gromacs using the standard patching procedure.
Patching must be done in the gromacs source directory _after_ gromacs has been configured but _before_ gromacs is compiled.
Gromcas should be configured with ./configure (not cmake).
To enable PLUMED in a gromacs simulation one should use
mdrun with an extra -plumed flag. The flag can be used to
specify the name of the PLUMED input file, e.g.:
mdrun -plumed plumed.dat
For more information on gromacs you should visit http://www.gromacs.org
EOF
}