From f67879c920516ca33c4cc2115b2da8000bb8e77b Mon Sep 17 00:00:00 2001 From: lindahl Date: Fri, 22 Jun 2001 15:04:56 +0000 Subject: [PATCH] Removing the scripts directory - things are moved to gmx/admin and gmx/scripts --- src/contrib/scripts/.cvsignore | 1 - src/contrib/scripts/GMXRC | 63 ------ src/contrib/scripts/Makefile.am | 13 -- src/contrib/scripts/NOGMX | 126 ----------- src/contrib/scripts/grompplog2top | 32 --- src/contrib/scripts/make_gromos_bon.pl | 70 ------ src/contrib/scripts/make_gromos_nb.pl | 136 ------------ src/contrib/scripts/make_gromos_rtp.pl | 217 ------------------- src/contrib/scripts/make_gromos_rtp.py | 375 --------------------------------- src/contrib/scripts/mkcompl | 37 ---- src/contrib/scripts/mkhtml | 143 ------------- src/contrib/scripts/mknroff | 32 --- src/contrib/scripts/mkonline | 135 ------------ src/contrib/scripts/mktex | 53 ----- 14 files changed, 1433 deletions(-) delete mode 100644 src/contrib/scripts/.cvsignore delete mode 100644 src/contrib/scripts/GMXRC delete mode 100644 src/contrib/scripts/Makefile.am delete mode 100644 src/contrib/scripts/NOGMX delete mode 100755 src/contrib/scripts/grompplog2top delete mode 100755 src/contrib/scripts/make_gromos_bon.pl delete mode 100755 src/contrib/scripts/make_gromos_nb.pl delete mode 100755 src/contrib/scripts/make_gromos_rtp.pl delete mode 100755 src/contrib/scripts/make_gromos_rtp.py delete mode 100755 src/contrib/scripts/mkcompl delete mode 100755 src/contrib/scripts/mkhtml delete mode 100755 src/contrib/scripts/mknroff delete mode 100755 src/contrib/scripts/mkonline delete mode 100755 src/contrib/scripts/mktex diff --git a/src/contrib/scripts/.cvsignore b/src/contrib/scripts/.cvsignore deleted file mode 100644 index 70845e08eb..0000000000 --- a/src/contrib/scripts/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/src/contrib/scripts/GMXRC b/src/contrib/scripts/GMXRC deleted file mode 100644 index c7653ed16f..0000000000 --- a/src/contrib/scripts/GMXRC +++ /dev/null @@ -1,63 +0,0 @@ -# This is a template to create a GMXRC file for your site, -# to make GROMACS 3.0 behave like previous versions. -# You can put it either in the central GROMACS directory, -# or in your own homedirectory. -# -# It still requires a C shell environment, and you will -# probably need to change the next few lines to fit -# your installation: - -# First we remove previous GROMACS environment if present. -source /usr/local/gromacs/NOGMX -quiet - -# Set the GROMACS home directory -setenv GMXHOME /usr/local/gromacs - -# If you support multiple machines then it's useful to -# have a switch statement here, which, depending on hostname -# point to the proper directories, and sets the GMXCPU variable -# -# For easy updating, it is also recommended to put you local -# stuff in the GMXRC.local file -# Don't forget the GMXARCH variable -# -setenv LOCAL_RC $GMXHOME/GMXRC.local -if ( -f $LOCAL_RC ) then - source $LOCAL_RC -else -# Here are some defaults, if you have one machine, edit these - setenv GMXARCH i686-pc-linux-gnu -endif - -# Some directories that live below the root -setenv GMXBIN $GMXHOME/bin/$GMXARCH -setenv GMXLIB $GMXHOME/top - -# -# Default Graphics Font -# -setenv GMXFONT 10x20 - -# -# Set the path # -setenv PATH "$PATH":"$GMXBIN" -# - -if ( $?LD_LIBRARY_PATH ) then - setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH":$GMXHOME/lib/$GMXARCH -else - setenv LD_LIBRARY_PATH $GMXHOME/lib/$GMXARCH -endif -if ( $?MANPATH ) then - setenv MANPATH "$MANPATH":$GMXHOME/man -else - setenv MANPATH /usr/man:$GMXHOME/man -endif - -# Now finally, if you consider our Cool Quotes to be offensive -# you might considering including this command: -# setenv IAMCOOL NO - -if ( -f $GMXHOME/complete ) source $GMXHOME/complete - -# end of script diff --git a/src/contrib/scripts/Makefile.am b/src/contrib/scripts/Makefile.am deleted file mode 100644 index bad7242a31..0000000000 --- a/src/contrib/scripts/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Don't edit - this file is generated automatically from Makefile.am -# - -# These scripts aren't installed, but should go in the distribution - -EXTRA_DIST = grompplog2top make_gromos_nb.pl make_gromos_rtp.py \ - mkhtml mkonline make_gromos_bon.pl \ - mkcompl mknroff make_gromos_rtp.pl \ - mktex GMXRC NOGMX - - diff --git a/src/contrib/scripts/NOGMX b/src/contrib/scripts/NOGMX deleted file mode 100644 index b1f1b9f5c4..0000000000 --- a/src/contrib/scripts/NOGMX +++ /dev/null @@ -1,126 +0,0 @@ -# remove all environment variables set by GMXRC - -setenv bVerb 1 -if ( "$1" == "-quiet" ) setenv bVerb 0 - -if ($bVerb) echo "Being loud and noisy" - -if ( $shell == "/bin/tcsh" ) then - if ( $?GMXBIN ) then - if ( -d $GMXBIN ) then - if ( $bVerb ) echo "uncomplete all GROMACS programs" - foreach f ( `\ls $GMXBIN` ) - uncomplete $f - end - endif - endif -endif - -if ( ($?LD_LIBRARY_PATH) && ($?GMXHOME) && (($?GMXCPU) || ($?CPU)) ) then - if ( (! $?GMXCPU) && ($?CPU) ) then - setenv GMXCPU $CPU - endif - unsetenv TEMPPATH - unsetenv PATHSET - foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` ) - setenv PATHSET - if ( ( "$i" != "$GMXHOME/lib/$GMXCPU" ) && ( "$i/" != "$GMXHOME/lib/$GMXCPU" ) ) then - if ( ! $?TEMPPATH ) then - setenv TEMPPATH $i - else - setenv TEMPPATH "$TEMPPATH":"$i" - endif - else - if ( $bVerb ) echo "Removed $GMXHOME/lib/$GMXCPU from LD_LIBRARY_PATH" - endif - end - if ($?PATHSET) then - if (! $?TEMPPATH) setenv TEMPPATH - setenv LD_LIBRARY_PATH $TEMPPATH - unsetenv TEMPPATH - unsetenv PATHSET - else - echo "You might want to remove $GMXHOME/lib/$GMXCPU from LD_LIBRARY_PATH" - endif -endif - -if ($?GMXCPU) then - if ( $bVerb ) echo "unsetenv GMXCPU ($GMXCPU)" - unsetenv GMXCPU -endif - -if ($?GMXLIB) then - if ( $bVerb ) echo "unsetenv GMXLIB ($GMXLIB)" - unsetenv GMXLIB -endif - -if ( ($?GMXMAN) && ($?MANPATH) ) then - if ($MANPATH == $GMXMAN) then - unsetenv MANPATH - else - if ( $bVerb ) echo "You might want to remove $GMXMAN ("\$"GMXMAN) from "\$"MANPATH" - endif -endif - -if ($?GMXMAN) then - if ( $bVerb ) echo "unsetenv GMXMAN ($GMXMAN)" - unsetenv GMXMAN -endif - -if ($?GMXHOME) then - if ( $bVerb ) echo "unsetenv GMXHOME ($GMXHOME)" - unsetenv GMXHOME -endif - -if ($?GMXROOT) then - if ( $bVerb ) echo "unsetenv GMXROOT ($GMXROOT)" - unsetenv GMXROOT -endif - -if ( ($?GMXBIN) && ($?PATH) ) then - foreach i ( $path ) - if ( ( "$i" != "$GMXBIN" ) && ( "$i/" != "$GMXBIN" ) ) then - if ( ! $?TEMPPATH ) then - setenv TEMPPATH $i - else - setenv TEMPPATH "$TEMPPATH":"$i" - endif - else - if ( $bVerb ) echo Removed $GMXBIN from path - endif - end - if (! $?TEMPPATH) setenv TEMPPATH - setenv PATH $TEMPPATH - unsetenv TEMPPATH -endif - -if ($?GMXBIN) then - if ( $bVerb ) echo "unsetenv GMXBIN ($GMXBIN)" - unsetenv GMXBIN -endif -if ($?VER) then - if ( $bVerb ) echo "unsetenv VER ($VER)" - unsetenv VER -endif -if ($?GMXVER) then - if ( $bVerb ) echo "unsetenv GMXVER ($GMXVER)" - unsetenv GMXVER -endif -if ($?GMXNPRI) then - if ( $bVerb ) echo "unsetenv GMXNPRI ($GMXNPRI)" - unsetenv GMXNPRI -endif -if ($?GMXFONT) then - if ( $bVerb ) echo "unsetenv GMXFONT ($GMXFONT)" - unsetenv GMXFONT -endif -if ($?AMBBIN) then - if ( $bVerb ) echo "unsetenv AMBBIN ($AMBBIN)" - unsetenv AMBBIN -endif -if ($?IAMCOOL) then - if ( $bVerb ) echo "unsetenv IAMCOOL ($IAMCOOL)" - unsetenv IAMCOOL -endif - -#last line diff --git a/src/contrib/scripts/grompplog2top b/src/contrib/scripts/grompplog2top deleted file mode 100755 index cc8548d988..0000000000 --- a/src/contrib/scripts/grompplog2top +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/csh -f - -if ( $#argv < 2 ) then - set in = grompp.log - set out = topolout.top - set program = $0 - echo "usage $program:t $in $out" - echo "Parses grompp debug logfile into original processed topology file" -else - set in = $1 - set out = $2 -endif - -if ( -f $out ) then - if ( $out:h == $out:t ) then - set backup = \#$out:t\# - else - set backup = $out:h/\#$out:t\# - endif - echo "Back Off! I just backed up $out to $backup" - \mv $out $backup -endif -if ( ! -f $in ) then - echo "FATAL ERROR: input file $in does not exist" - exit 1 -endif - -echo -n "Processing..." -grep -E '(\".*\" : .* :)|(found directive)' $in | sed 's/found directive '\''\(.*\)'\''/[ \1 ]/' | sed 's/\".*\" : .* ://' >! $out -echo "." - -#last line diff --git a/src/contrib/scripts/make_gromos_bon.pl b/src/contrib/scripts/make_gromos_bon.pl deleted file mode 100755 index e1ffb47da5..0000000000 --- a/src/contrib/scripts/make_gromos_bon.pl +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl - -# usage: make_gromos_bon.pl ifp41a1.dat > gromos-bon.itp -# this generates gromos-bon.itp, a list of bonds, angles, impropers -# and dihedrals from ifp41a1.dat. - -while (<>) { - if (/BONDTYPE/) {$prefix = "#define gb_"; $bonds = 1; $go = 1;} - if (/BONDANGLE/) {$prefix = "#define ga_"; $bonds = 0; $angles = 1;} - if (/IMPDIH/) {$prefix = "#define gi_"; $angles= 0; $imp = 1;} - if (/DIHEDRALTYPECODE/) {$prefix = "#define gd_"; $imp=0; $dih=1;} - if (/SINGLE/) {$go = 0;} - - if (/^#/ && $go) {tr/#/;/; print $_;} - if (/^\d+/ && $go) { - # need to switch the order of terms for bonds and angles for use - # GROMACS - if ($bonds || $angles ) { - ($nr,$k,$dist) = split(' ',$_); - print sprintf("$prefix%-3d %10s %10s\n", $nr, $dist, $k); - } - # impropers have the wrong units for k, convert to degrees - if ($imp) { - ($nr,$k,$dist) = split(' ',$_); - $k = $k*180*180/(3.141593*3.141593); - print sprintf("$prefix%-3d %10s %10.5f\n", $nr, $dist, $k); - } - # same for dihedrals, also convert phase from cos(phi) to phi - if ($dih) { - ($nr, $k, $phase, $mult) = split(' ',$_); - if ($phase > 0) {$phase = 0.0;} - else {$phase = 180.0;} - print sprintf("$prefix%-3d %8.3f %10s %10s\n",$nr, $phase, - $k, $mult); - } - if (/^[a-zA-Z]+/ && $go) {print ";" . $_;} - } -} - -# add stuff for the termina for now. Can be removed later if we have -# a working termini database - -print "\n[ bondtypes ]\n"; -print "NL H 2 gb_2\n"; -print "C OM 2 gb_5\n"; -print "OA H 2 gb_1\n"; -print "C OA 2 gb_12\n"; -print "C O 2 gb_4\n"; -print "S S 2 gb_33\n"; -print "NR FE 2 gb_32\n"; - -print "\n[ angletypes ]\n"; -print "H NL H 2 ga_9\n"; -print "H NL CH1 2 ga_10\n"; -print "CH1 C OM 2 ga_21\n"; -print "OM C OM 2 ga_37\n"; -print "O C OA 2 ga_32\n"; -print "C OA H 2 ga_11\n"; -print "CH1 C O 2 ga_29\n"; -print "CH1 CH2 S 2 ga_15\n"; -print "CH2 S S 2 ga_5\n"; -print "CH2 C OM 2 ga_21\n"; -print "CR1 NR FE 2 ga_33\n"; -print "NR FE NR 2 ga_16\n"; - -print "\n[ dihedraltypes ]\n"; -print "S S 1 gd_10\n"; -print "NR FE 1 gd_18\n"; -print "CH2 S 1 gd_13\n"; - diff --git a/src/contrib/scripts/make_gromos_nb.pl b/src/contrib/scripts/make_gromos_nb.pl deleted file mode 100755 index 173156601d..0000000000 --- a/src/contrib/scripts/make_gromos_nb.pl +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/perl - -# usage: make_gromos_nb.pl gromos_atoms > gromos_nb.itp -# this script generates a GROMOS96 nonbonded forcefield file for GROMACS, -# with as input the file gromos_atoms, which contains records of the form -#: 1 O 0.04756 0.8611E-3 1.125E-3 0.0 -#: #CS6 CS12 parameters LJ14PAIR -#: 0.04756 0.8611E-3 -#: 1 1 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 -#: 2 2 2 2 2 2 2 1 1 1 1 1 2 2 1 1 1 1 1 1 -#: 1 1 1 -#: #--- -# taken directly from ifp43a1.dat. For a description of what the numbers -# mean, see the GROMOS96 manual and the fie ifp43a1.dat - -# set the input seperator to #--- so we read one atom entry at a time -# make sure the records are actually seperated by #---\n and not by say #--\n!! -# don't put a seperator at the end of the file, only between records -$/= "#---\n"; - -# start arrays with 1 instead of 0 -$[=1; - -$i=1; - -# read in all entries (43 in ifp43a1.dat). This will BREAK for other input! - -while(<>) { - @lines = split('\n',$_); - ($number[$i],$name[$i],$c6[$i],$c12_1[$i],$c12_2[$i],$c12_3[$i]) = - split(' ',$lines[1]); - ($c6_14[$i],$c12_14[$i]) = split(' ',$lines[3]); - $combination[$i] = $lines[4] . $lines[5] . $lines[6]; - - # one type is called P,SI, the same LJ parameters for both P and SI - # treat P,SI different: create a 44th type for Si, just a copy of Si,P - # and rename P,SI to P - if ($name[$i] =~ /P,SI/) { - $number[44] = 44; $name[44] = "SI"; $c6[44] = $c6[$i]; - $c12_1[44] = $c12_1[$i]; $c12_2[44] = $c12_2[$i]; - $c12_3[44] = $c12_3[$i]; $combination[44] = $combination[$i]; - $name[$i] = "P"; - $P = $i; - } - $i++; -} - -# now $number[$i] has the atom nr, $name[$i] the name, $c6 the C6 LJ parameter -# $c12_1[$i], $c12_2[$i], $c12_3[$i] the three C12 parameters and -# $combination[$i] the matrix with 43 elements that tells which C12 parameter -# you need in combination with each of the 44 atomtypes. $i runs from 1 to 44, -# one for each atom type. This goes nicely wrong because of the Stupid SI,P -# entry so we have to give an extra element 44 with the same value as that of -# P - -# start printing to the output file: header for gromos-nb.itp -print "[ atomtypes ]\n"; -print ";name mass charge ptype c6 c12\n"; - -# print out the atomtypes, plus the C6 and C12 for interactions with themselves -# the masses and charges are set to 0, the masses should come from gromos.atp - -for ($j=1;$j<=44;$j++) { -# lookup the C12 with itself - @c12types = split(' ',$combination[$j]); - $c12types[44] = $c12types[$P]; # SI has the same as P - if ($c12types[$j] == 1) - {$c12 = $c12_1[$j];} - elsif ($c12types[$j] == 2) - {$c12 = $c12_2[$j];} - elsif ($c12types[$j] == 3) - {$c12 = $c12_3[$j];} - else {die "Error [atomtypes]: c12 type is not 1,2,3:j=$j,c12=$c12\n";} - - print sprintf("%5s 0.000 0.000 A %10.8g %10.8g\n", - $name[$j],$c6[$j]*$c6[$j],$c12*$c12); -} - -# Now make the LJ matrix. It's ok to do some double work in shell scripts, -# trust me. - -print "\n"; -print "[ nonbond_params ]\n"; -print "; i j func c6 c12\n"; - -for ($j=1;$j<=44;$j++) { - for ($k=1;$k<$j;$k++) { -# lookup the C12 of j for k - @c12types_j = split(' ',$combination[$j]); - $c12types_j[44] = $c12types_j[$P]; # SI has the same as P - if ($c12types_j[$k] == 1) - {$c12_j = $c12_1[$j];} - elsif ($c12types_j[$k] == 2) - {$c12_j = $c12_2[$j];} - elsif ($c12types_j[$k] == 3) - {$c12_j = $c12_3[$j];} - else { - die "Error [nonbond-params] j=$j,k=$k: c12 type is not one of 1,2,3\n"; - } -# lookup the C12 of k for j - @c12types_k = split(' ',$combination[$k]); - $c12types_k[44] = $c12types_k[$P]; # SI has the same as P - if ($c12types_k[$j] == 1) - {$c12_k = $c12_1[$k];} - elsif ($c12types_k[$j] == 2) - {$c12_k = $c12_2[$k];} - elsif ($c12types_k[$j] == 3) - {$c12_k = $c12_3[$k];} - else { - die "Error [nonbond-params] j=$j,k=$k: c12 type is not one of 1,2,3\n"; - } - - print sprintf("%8s %8s 1 %10.8g %10.8g\n", $name[$j], $name[$k], - $c6[$j]*$c6[$k], $c12_j*$c12_k); - } -} - -# Now do the same for the 1-4 interactions -print "\n"; -print "[ pairtypes ]\n"; -print "; i j func c6 c12\n"; - -for ($j=1;$j<=44;$j++) { - for ($k=1;$k<=$j;$k++) { - print sprintf("%8s %8s 1 %10.8g %10.8g\n", $name[$j], $name[$k], - $c6_14[$j]*$c6_14[$k], $c12_14[$j]*$c12_14[$k]); - - } -} - - - - - - - diff --git a/src/contrib/scripts/make_gromos_rtp.pl b/src/contrib/scripts/make_gromos_rtp.pl deleted file mode 100755 index 0e7dc225e1..0000000000 --- a/src/contrib/scripts/make_gromos_rtp.pl +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/perl - -# usage: make_gromos_rtp.pl mtb43a1.dat > gromos.rtp -# this script tries to make a residue topology database for GROMACS from -# the GROMOS version of this file. It needs ffG96A.atp to fill in the -# atom types for the atom integer codes. It converts until it finds the string -# "#RNMES", which indicates the start of the solvent part -# of mtb43(a,b)1.dat. Solvents are treated differently in GROMACS - -# author: Peter Tieleman, 12 March 1999 - -# read in the atomtypes -open (TYPES, "gromos.atp") || die "Can't open gromos.atp: $!"; -while () { - $type++; - ($gromostype[$type],$rest) = split(' ',$_); -} - -$/ = "# RNME"; -# split input on residue name. The last line of each block of residue data -# has RNME in it. The first line has the name of the residue. - -# write header -print "[ bondedtypes ]\n"; -print "; bonds angles dihedrals impropers\n"; -print " 2 2 1 2\n\n"; - -$first = 1; - -# loop over the actual residues -while (<>) { - if ($first) {$first = 0; next;} #skip over the first nonsense residue - # initialise for a new residue: - $read_atoms = 0; $j = 0; - $read_bonds = 0; $k = 0; - $read_angles = 0; $l = 0; - $read_dihedrals = 0; $m = 0; - $read_impropers = 0; $n = 0; - - # now $_ has all data for a single residue in it. - # split it up in lines - @residue_data = split('\n',$_); - $residue_name = @residue_data[1]; - - # loop over the lines of a residue - for ($i=0;$i<@residue_data;$i++) { - # do we have to skip a line? - if ($skip == 1) {$skip = 0; next;} - - # look for the headers of each section, and move to the start - # of the relevant data. - - # if you find ATOM ANM, start reading atoms - if ($residue_data[$i] =~ /\#ATOM ANM/) { - $read_atoms = 1; - } - # if you find NB, read bonds - if ($residue_data[$i] =~ /\#\s+NB/) { - $read_atoms = 0; $read_bonds = 1; $skip = 1; #skip next line - } - # if you find NBA, read angles - if ($residue_data[$i] =~ /NBA/) { - $read_bonds = 0; $read_angles = 1; $skip = 1; #skip next line - } - # if you find NIDA, read impropers - if ($residue_data[$i] =~ /NIDA/) { - $read_angles =0; $read_impropers = 1; $skip = 1; #skip next line - } - # if you find NDA, read dihedrals - if ($residue_data[$i] =~ /NDA/) { - $read_impropers= 0; $read_dihedrals=1; $skip = 1; #skip next line - } - - # stop parsing alltogether if we find #RNMES - if ($residue_data[$i] =~ /\#RNMES/) { last;} - # skip lines that start with # - if ( $residue_data[$i] =~ /^\#/) { next; } - # also skip lines with END on it, and with MTBUILDBLSOLUTE - if ($residue_data[$i] =~ /END/) { next; } - if ($residue_data[$i] =~ /BUILD/) {next;} - - if (!($read_atoms || $read_bonds || $read_angles || $read_dihedrals - || $read_impropers)) { next; } # we're not reading anything yet - - if ($read_atoms) { - ($atomnr[$j],$atomname[$j],$atomtype[$j],$mass,$charge[$j], - $chargegroup[$j],$dummy) = split(' ',$residue_data[$i]); - # some lines only have exclusions, check if there is a name - if ($atomname[$j] !~ /[A-Z]+/) {$j--;} - $j++; - } - if ($read_bonds) { - ($bondi[$k],$bondj[$k],$bondtype[$k]) = - split(' ',$residue_data[$i]); - $k++; - } - if ($read_angles) { - ($anglei[$l],$anglej[$l],$anglek[$l],$angletype[$l]) = - split(' ',$residue_data[$i]); - $l++; - } - - if ($read_impropers) { - ($imp_i[$m],$imp_j[$m],$imp_k[$m],$imp_l[$m],$imp_type[$m]) = - split(' ',$residue_data[$i]); - $m++; - } - - if ($read_dihedrals) { - ($dih_i[$n],$dih_j[$n],$dih_k[$n],$dih_l[$n],$dih_type[$n]) = - split(' ',$residue_data[$i]); - $n++; - } - } - $natoms = $j; - - # print out this residue to the GROMACS file and go to the next residue - print "[ $residue_name ]\n"; - print " [ atoms ]\n"; - $chargegroup = 0; - for ($t=0;$t<$j;$t++) { - print sprintf("%5s %5s %8.3f %5s\n", $atomname[$t], - $gromostype[$atomtype[$t]], $charge[$t], $chargegroup); - $chargegroup += $chargegroup[$t]; - } - - print " [ bonds ]\n"; - for ($t=0;$t<$k;$t++) { - $bond ="gb_$bondtype[$t]"; - # convert the nrs from GROMOS to atomnames - if ($bondi[$t] < 0 || $bondj[$t] < 0) { - print STDERR "Skipping specbond $bondi[$t] $bondj[$t]\n"; - next; - } - if ($bondi[$t] == $natoms+1) {$ati = "+N";} - else {$ati = $atomname[$bondi[$t]-1];} - if ($bondj[$t] == $natoms+1) {$atj = "+N";} - else {$atj = $atomname[$bondj[$t]-1];} - # write them out. - print sprintf("%5s %5s %-5s\n", $ati, $atj, $bond); - } - - print " [ angles ]\n"; - print "; ai aj ak gromos type\n"; - for ($t=0;$t<$l;$t++) { - - # convert numbers to names. - # i may be in the previous residue - if ($anglei[$t] == -1) {$ati = "-C";} - else {$ati = $atomname[$anglei[$t]-1];} - # j is always in this residue - $atj = $atomname[$anglej[$t]-1]; - # k may be in the next residue - if ($anglek[$t] == $natoms+1) {$atk = "+N";} - else {$atk = $atomname[$anglek[$t]-1];} - - # print them out - $angle = "ga_$angletype[$t]"; - print sprintf("%5s %5s %5s %-5s\n", $ati, $atj, $atk, $angle); - } - - print " [ impropers ]\n"; - print "; ai aj ak al gromos type\n"; - for ($t=0;$t<$m;$t++) { - - # convert numbers to names. - # i may be in the next residue - if ($imp_i[$t] == $natoms+1) {$ati = "+N";} - else {$ati = $atomname[$imp_i[$t]-1];} - # j may be in the next or in the previous residue - if ($imp_j[$t] == -1) {$atj = "-C";} - elsif ($imp_j[$t] == $natoms+1) {$atj = "+N";} - else {$atj = $atomname[$imp_j[$t]-1];} - # k may be in the next residue or in the previous residue - if ($imp_k[$t] == -1) {$atk = "-C";} - elsif ($imp_k[$t] == $natoms+1) {$atk = "+N";} - else {$atk = $atomname[$imp_k[$t]-1];} - # l may be in the next residue - if ($imp_l[$t] == $natoms+1) {$atl = "+N";} - else {$atl = $atomname[$imp_l[$t]-1];} - - $improper = "gi_$imp_type[$t]"; - print sprintf("%5s %5s %5s %5s %-5s\n", $ati, $atj, $atk, $atl, - $improper); - } - - print " [ dihedrals ]\n"; - print "; ai aj ak al gromos type\n"; - for ($t=0;$t<$n;$t++) { - # convert numbers to names. - # i may be in the previous residue - if ($dih_i[$t] == -1) {$ati = "-C";} - elsif ($dih_i[$t] == -2) {$ati = "-CA";} - else {$ati = $atomname[$dih_i[$t]-1];} - # j may be in the previous residue - if ($dih_j[$t] == -1) {$atj = "-C";} - else {$atj = $atomname[$dih_j[$t]-1];} - # k must be in this residue - $atk = $atomname[$dih_k[$t]-1]; - # l may be in the next residue - if ($dih_l[$t] == $natoms+1) {$atl = "+N";} - else {$atl = $atomname[$dih_l[$t]-1];} - - $dihedral = "gd_$dih_type[$t]"; - print sprintf("%5s %5s %5s %5s %-5s\n", $ati, $atj, $atk, $atl, - $dihedral); - } - if ($residue_name eq $last) {last;} -} - - - - - - - - diff --git a/src/contrib/scripts/make_gromos_rtp.py b/src/contrib/scripts/make_gromos_rtp.py deleted file mode 100755 index bb8ff3ab35..0000000000 --- a/src/contrib/scripts/make_gromos_rtp.py +++ /dev/null @@ -1,375 +0,0 @@ -#!/usr/freeware/bin/python - -# usage: make_gromos_rtp.py > ffG43a1.rtp -# this script tries to make a residue topology database for GROMACS from -# the GROMOS version of this file. It needs ffG43a1.atp to fill in the -# atom types for the atom integer codes. It converts until it finds the string -# "#RNMES", which indicates the start of the solvent part -# of mtb43a1.dat. Solvents are treated differently in GROMACS -# The vaiables GROMOS_FILE and ATOMTYPE_FILE has to be specified as required. - -# The output file requires some manual modifications: -# add ACE and NH2 -# add 4 dihedrals with parameters 0 0 2 in HEME -# remove I in front of all atoms names in SO42- -# make a copy of H2O called HOH - -# author: Klaas Dijkstra, Univ. Groningen -# Oct. 2000 -# minor modifications by Berk Hess - - -from string import atoi, split - -GROMOS_FILE = 'mtb43a1.dat' -ATOMTYPE_FILE = 'ffG43a1.atp' - -START = '# RNME\012' -STOP = '#RNMES\012' - -NATOM = '# NMAT,NLIN\012' -EXCLUS = '#ATOM MAE MSAE\012' -ATOM1 = '#ATOM ANM IACM MASS CGMICGM MAE MSAE\012' -ATOM2 = '#ATOM ANM IACM MASS CGM ICGM MAE MSAE\012' -ATOMtr = '#ATOM ANM IACM MASS CGMICGM\012' -NB = '# NB\012' -NBA = '# NBA\012' -NIDA = '# NIDA\012' -NDA = '# NDA\012' - - -#### functions -def translate(t): # translate number into atom code - if t == 0 : t = '-O' - elif t == -1 : t = '-C' - elif t == -2 : t = '-CA' - elif t == f.natom+1 : t = '+N' - else : t = f.atoms[t-1][1] - return t - - -def findbonds(atomnumber): - atom = eval(f.atoms[atomnumber][0]) - - onebond = [] - twobond = [] - ext = [] - bond = [] - ind = [] - excl = [] - - - for i in f.bonds: - a, b = i[0:2] - bond.append(eval(a),eval(b)) - bond.append(eval(b),eval(a)) - - for i in bond: - if i[0] == atom: onebond.append(i[1]) - - for i in bond: - for j in onebond: - if i[0] == j and atom < i[1]: twobond.append(i[1]) - - ext = onebond - ext.extend(twobond) - - for i in ext: - if i 8 cont. on next line - if noflo < 0: noflo = 0 - for j in range(noflo): - i = i + 1 - line1 = split(res[ind+i]) # overflow line - "print line1" - line = line + line1 - self.atoms.append(line) - cntr = cntr + 1 - - def getATOMtr(self, res): - " Get trailing atoms" - self.atomtr = [] - try: ind = self.gets(res, ATOMtr) - except: return - for i in range(self.nlin): - self.atomtr.append(split(res[ind+i+1])) - self.atoms.append(split(res[ind+i+1])) - - def getBOND(self, res): - " Get bonds" - self.bonds = [] - ind = self.gets(res, NB) - self.nb = atoi(split(res[ind+1])[0]) - j = 0 - for i in range(self.nb): - line = split(res[ind+i+j+3]) - if line[0] == '#': - line = split(res[ind+i+j+4]) - j = j+1 - self.bonds.append(line) - - def getNBA(self, res): - " Get bond angles" - self.ba = [] - ind = self.gets(res, NBA) - self.nba = atoi(split(res[ind+1])[0]) - j = 0 - for i in range(self.nba): - line = split(res[ind+i+j+3]) - if line[0] == '#': - line = split(res[ind+i+j+4]) - j = j + 1 - self.ba.append(line) - - def getNIDA(self, res): - " Get improper dihedrals" - self.ida = [] - ind = self.gets(res, NIDA) - self.nida = atoi(split(res[ind+1])[0]) - j = 0 - for i in range(self.nida): - line = split(res[ind+i+j+3]) - if line[0] == '#': - line = split(res[ind+i+j+4]) - j = j + 1 - self.ida.append(line) - - def getNDA(self, res): - " Get dihedrals" - self.da = [] - ind = self.gets(res, NDA) - j = 0 - self.nda = atoi(split(res[ind+1])[0]) - for i in range(self.nda): - line = split(res[ind+i+j+3]) - if line[0] == '#': - line = split(res[ind+i+j+4]) - j = j + 1 - self.da.append(line) - - -#-----------------------------# -# main program - -typ = open(ATOMTYPE_FILE) # translate numbers to atoms -typelines = typ.readlines() -for i in range(len(typelines)): - typelines[i]=split(typelines[i]) - -f=Cin(GROMOS_FILE) # bind class instance -f.index() # mark all residues (f.ind) -f.mkres() # put all residues into list (f.all) - -start = 0; stop = 92 - -" The rtp header " -print "[ bondedtypes ]" -print "; bonds angles dihedrals impropers" -print " 2 2 1 2" - - -for resnum in range(start,stop): # loop through all residues - f.getRESname(f.all[resnum]) # residue name - f.getNATOM (f.all[resnum]) # number of atoms - - if f.nlin != 0: # 0 for a seperate molecule - f.getEXCLUS(f.all[resnum]) # number of exclusions - - f.getATOM (f.all[resnum]) # atoms => f.atoms - f.getATOMtr (f.all[resnum]) # trailing atoms => f.atomtr - f.getBOND (f.all[resnum]) # bonds => f.bonds - f.getNBA (f.all[resnum]) # bond angles => f.ba - f.getNIDA (f.all[resnum]) # improper dihedrals => f.ida - f.getNDA (f.all[resnum]) # dihedrals => f.da - - - - # output to Gromacs format - #-------------------------# - -##### - # atoms - print "" - print "[",f.residue[0],"]" - print " [ atoms ]" - chargegroup = 0 - for j in range(f.natom - f.nlin): - try: - atomtype = atoi(f.atoms [j][2]) - 1 - atomfield = typelines[atomtype][0] - print "%5s %5s %11s %5s" % \ - (f.atoms [j][1],atomfield,f.atoms [j][4],chargegroup) - chargegroup = chargegroup + atoi(f.atoms[j][5]) - except: - print j - -##### - # trailing atoms - for j in range(f.nlin): - atomtype = atoi(f.atomtr [j][2]) - 1 - atomfield = typelines[atomtype][0] - print "%5s %5s %11s %5s" % \ - (f.atomtr[j][1],atomfield,f.atomtr[j][4][:-2],chargegroup) - chargegroup = chargegroup + atoi(f.atomtr[j][5]) - -##### - # bonds - print " [ bonds ]" - for j in range(f.nb): - t1 = atoi(f.bonds [j][0]) - t2 = atoi(f.bonds [j][1]) - " Only special bonds go to 0 or less " - if t1 >= 1 and t2 >= 1: - t1 = translate(t1) - t2 = translate(t2) - print "%5s %5s gb_%-5s" % \ - (t1, t2, f.bonds[j][2]) - -##### - # exclusions - ne = 0 - for j in range(f.natom - f.nlin): - aaa = findbonds(j) - bbb = f.atoms[j][7:] - for i in aaa: - if i in bbb: bbb.remove(i) - for i in bbb: - " Ignore special exclusions " - t1 = atoi(i) - if t1 >= 0: - t1 = translate(t1) - t2 = atoi(f.atoms[j][0]) - t2 = translate(t2) - if ne == 0: print " [ exclusions ]\n; ai aj" - print "%5s %5s" % (t2,t1) - ne = ne + 1 - -##### - # angles - print " [ angles ]" - print "; ai aj ak gromos type" - for j in range(f.nba): - t1 = atoi(f.ba [j][0]) - t2 = atoi(f.ba [j][1]) - t3 = atoi(f.ba [j][2]) - if t1 >= -2 and t2 >= -2 and t3 >= -2: - t1 = translate(t1) - t2 = translate(t2) - t3 = translate(t3) - print "%5s %5s %5s ga_%-5s" % \ - (t1,t2,t3,f.ba[j][3]) - -##### - # improper dihedrals - print " [ impropers ]" - print "; ai aj ak al gromos type" - for j in range(f.nida): - t1 = atoi(f.ida [j][0]) - t2 = atoi(f.ida [j][1]) - t3 = atoi(f.ida [j][2]) - t4 = atoi(f.ida [j][3]) - if t1 >= -2 and t2 >= -2 and t3 >= -2 and t4 >= -2: - t1 = translate(t1) - t2 = translate(t2) - t3 = translate(t3) - t4 = translate(t4) - print "%5s %5s %5s %5s gi_%-5s" % \ - (t1,t2,t3,t4,f.ida[j][4]) - -##### - # dihedrals - print " [ dihedrals ]" - print "; ai aj ak al gromos type" - for j in range(f.nda): - t1 = atoi(f.da [j][0]) - t2 = atoi(f.da [j][1]) - t3 = atoi(f.da [j][2]) - t4 = atoi(f.da [j][3]) - if t1 >= -2 and t2 >= -2 and t3 >= -2 and t4 >= -2: - t1 = translate(t1) - t2 = translate(t2) - t3 = translate(t3) - t4 = translate(t4) - print "%5s %5s %5s %5s gd_%-5s" % \ - (t1,t2,t3,t4,f.da[j][4]) diff --git a/src/contrib/scripts/mkcompl b/src/contrib/scripts/mkcompl deleted file mode 100755 index e13de31f7d..0000000000 --- a/src/contrib/scripts/mkcompl +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/csh -f - -if ( $#argv < 1 ) then - echo "Error: provide the binary directory as first argument." - exit -endif - -set GMXBINDIR = $1 - -set out = complete -set dir = $cwd - -echo Generating tcsh completions - -if ( -f $out) then - mv complete \#complete\# -endif - -touch $out - -cd $GMXBINDIR -set PROGRAMS = [a-z]* -cd $dir - -echo "if ( "'$shell'" == /bin/tcsh ) then" >> $out - -foreach program ( $PROGRAMS ) - if ( ( $program != "average" ) && ( $program != "luck" ) && ( $program != mdrun ) && ( $program != nmrun ) && ( $program != xmdrun )) then - $GMXBINDIR/$program -man completion >& /dev/null - cat $program.completion >> $out - \rm $program.completion - endif -end - -echo "endif" >> $out - -#last line diff --git a/src/contrib/scripts/mkhtml b/src/contrib/scripts/mkhtml deleted file mode 100755 index 8510757f38..0000000000 --- a/src/contrib/scripts/mkhtml +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/csh -f - -if ( $#argv < 2 ) then - echo "Error: provide the binary directory as first argument," - echo "and the location of programs.txt as the second." - exit -endif - -set GMXBINDIR = $1 -set PROGFILE = $2 - -set dir = $cwd - -set VER = 3.0 -set MANDIR = online -set HTML = $cwd/html -set HTMLOL = $HTML/$MANDIR -set HTMLIDX = $HTML/$MANDIR.html - -set GENERAL = "getting_started:Getting_Started flow:Flow_Chart files:File_Formats mdp_opt:mdp_options" - -cd $GMXBINDIR -set PROGRAMS = [a-z]* -cd $dir - -echo "" -echo "Generating table of contents in $HTMLIDX" -echo "-------------------------------------------" - -if ( ! -d $HTML ) mkdir $HTML -if ( ! -d $HTMLOL ) mkdir $HTMLOL - -if ( -f $HTMLIDX ) \rm $HTMLIDX -touch $HTMLIDX - -cat > $HTMLIDX << EOD - - -GROMACS $VER Online Reference - - - - - - - - - - - -
-

-

-GROMACS 3.0
-Online Reference

-
-VERSION 3.0
-Tue 15 May 2001
- -
- - - - - - -
-

General

-EOD -foreach i ( $GENERAL ) - set file = `echo $i | cut -d: -f1` - set desc = `echo $i | cut -d: -f2 | sed 's/_/ /g'` - echo ""$desc"" >> $HTMLIDX - echo "

" >> $HTMLIDX -end -cat >> $HTMLIDX <FAQ -
-
-

Programs

- -Options -
-EOD -foreach program ( $PROGRAMS ) - echo "
$program" >> $HTMLIDX -end -cat >> $HTMLIDX << EOD -
-
-
-

Programs by Topic

- -EOD -awk -F '|' -v mandir=$MANDIR '{\ - if (NF) {\ - if ( $1 == "HEAD" ) {\ - hnr++;\ - printf("%s
\n",hnr,$2);\ - }\ - }\ -}' $PROGFILE >> $HTMLIDX -echo "
" >> $HTMLIDX -awk -F '|' -v mandir=$MANDIR '{\ - if (NF) {\ - if ( $1 == "HEAD" ) {\ - hnr++;\ - printf("\n\n",hnr);\ - printf("\n
                      \n");\ - printf("
%s\n",$2);\ - } else if ( $1 == "END" ) {\ - printf("
\n");\ - } else {\ - printf("
%s%s\n",mandir,$1,$1,$2);\ - }\ - }\ -}' $PROGFILE >> $HTMLIDX -cat >> $HTMLIDX < -
-
-http://www.gromacs.org
-gromacs@gromacs.org
- - -EOD - -echo "Generating html manual for GROMACS programs" -echo "-------------------------------------------" - -cd $dir - -foreach program ( $PROGRAMS ) - if ( ( -x $GMXBINDIR/$program ) && ( $program != "my_dssp" ) && ( $program != "luck" ) ) then - echo -n "$program " - cd $HTMLOL - $GMXBINDIR/$program -quiet -man html >& /dev/null - endif - endif -end - -#last line diff --git a/src/contrib/scripts/mknroff b/src/contrib/scripts/mknroff deleted file mode 100755 index 83cb03a657..0000000000 --- a/src/contrib/scripts/mknroff +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/csh -f -# -# This script will generate all manual pages -# in the current directory. It is recommeded that -# you run it from the man/man1 subdirectory under -# your GROMACS source tree. The manual pages will -# be installed by the "make install" command. - -echo "Generating unix manual for GROMACS programs" -echo "-------------------------------------------" - -if ( $#argv < 1 ) then - echo "Error: provide the binary directory as first argument." - exit -endif - -set GMXBINDIR = $1 - -set dir = $cwd - - -cd $GMXBINDIR -set PROGRAMS = [a-z]* -cd $dir - -foreach program ( $PROGRAMS ) -if ( -x $GMXBINDIR/$program ) then -echo -n " $program" -$GMXBINDIR/$program -man nroff >& /dev/null -if ( -f $program.nroff ) mv $program.nroff $program.1 -endif -end diff --git a/src/contrib/scripts/mkonline b/src/contrib/scripts/mkonline deleted file mode 100755 index 601e1b5086..0000000000 --- a/src/contrib/scripts/mkonline +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/csh -f - -if ( $#argv < 1 ) then - echo "Error: provide the binary directory as first argument." - exit -endif - -set GMXBINDIR = $1 - -set dir = $cwd - -set VER = 3.0 -set MANDIR = online -set HTML = $cwd/html -set HTMLOL = $HTML/$MANDIR -set HTMLIDX = $HTML/$MANDIR.html -set TEXDIR = $cwd/doc -set TEXIDX = $TEXDIR/proglist.tex -set PROGFILE = ../programs.txt - -set GENERAL = "getting_started:Getting_Started flow:Flow_Chart files:File_Formats mdp_opt:mdp_options" - -cd $GMXBINDIR -set PROGRAMS = [a-z]* -cd $dir - -echo "generating html page $HTMLIDX" - -if ( ! -d $HTML ) mkdir $HTML -if ( -f $HTMLIDX ) \rm $HTMLIDX -touch $HTMLIDX - -if ( ! -d $TEXDIR ) mkdir $TEXDIR - -cat > $HTMLIDX << EOD - -GROMACS $VER Online Reference - - -

GROMACS $VER Online Reference

-
-

- - - - - -
-

General

-EOD -foreach i ( $GENERAL ) - set file = `echo $i | cut -d: -f1` - set desc = `echo $i | cut -d: -f2 | sed 's/_/ /g'` - echo ""$desc"" >> $HTMLIDX - echo "

" >> $HTMLIDX -end -cat >> $HTMLIDX <FAQ -
-
GROMACS homepage -
-

Programs

- -Options -
-EOD -foreach program ( $PROGRAMS ) - echo "
$program" >> $HTMLIDX -end -cat >> $HTMLIDX << EOD -
-
-


-

Programs by Topic

- -EOD -awk -F '|' -v mandir=$MANDIR '{\ - if (NF) {\ - if ( $1 == "HEAD" ) {\ - hnr++;\ - printf("%s
\n",hnr,$2);\ - }\ - }\ -}' $PROGFILE >> $HTMLIDX -echo "
" >> $HTMLIDX -awk -F '|' -v mandir=$MANDIR '{\ - if (NF) {\ - if ( $1 == "HEAD" ) {\ - hnr++;\ - printf("\n\n",hnr);\ - printf("\n
                      \n");\ - printf("
%s\n",$2);\ - } else if ( $1 == "END" ) {\ - printf("
\n");\ - } else {\ - printf("
%s%s\n",mandir,$1,$1,$2);\ - }\ - }\ -}' $PROGFILE >> $HTMLIDX -cat >> $HTMLIDX < -
-
-http://www.gromacs.org
-gromacs@gromacs.org
- - -EOD - -echo "generating latex page $TEXIDX" - -if ( -f $TEXIDX ) \rm $TEXIDX -touch $TEXIDX - -echo "\\begin{description}" >> $TEXIDX -awk -F '|' -v mandir=$MANDIR -v longest="mk\\_angndx" '{\ - gsub("_","\\_",$0);\ - gsub("%","\\%",$0);\ - if (NF) {\ - if ( $1 == "LONGEST" ) {\ - longest = $2;\ - } else if ( $1 == "HEAD" ) {\ - printf("\\item {\\large\\bf %s}\n",$2);\ - printf("\\vspace{-2ex}\\begin{tabbing}\n");\ - printf("{\\bf %s} \\= \\kill\n",longest);\ - } else if ( $1 == "END" ) {\ - printf("\\end{tabbing}\\vspace{-2ex}\n\n");\ - } else {\ - printf("{\\bf %s} \\> %s \\\\\n",$1,$2);\ - }\ - }\ -}' $PROGFILE | sed -e 's/e\.g\./{\\eg}/g' >> $TEXIDX -echo "\\end{description}" >> $TEXIDX - -#last line diff --git a/src/contrib/scripts/mktex b/src/contrib/scripts/mktex deleted file mode 100755 index 064782acde..0000000000 --- a/src/contrib/scripts/mktex +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/csh -f - -if ( $#argv < 2 ) then - echo "Error: provide the binary directory as first argument," - echo "and the location of programs.txt as the second." - exit -endif - -set GMXBINDIR = $1 -set PROGFILE = $2 - -set dir = $cwd - -set VER = 3.0 -set TEXDIR = $cwd/doc -set TEXIDX = $TEXDIR/proglist.tex - -set GENERAL = "getting_started:Getting_Started flow:Flow_Chart files:File_Formats mdp_opt:mdp_options" - -cd $GMXBINDIR -set PROGRAMS = [a-z]* -cd $dir - -echo "" -echo "generating latex page $TEXIDX" -echo "--------------------------------" - -if ( ! -d $TEXDIR ) mkdir $TEXDIR - -if ( -f $TEXIDX ) \rm $TEXIDX -touch $TEXIDX - -echo "\\begin{description}" >> $TEXIDX -awk -F '|' -v longest="mk\\_angndx" '{\ - gsub("_","\\_",$0);\ - gsub("%","\\%",$0);\ - if (NF) {\ - if ( $1 == "LONGEST" ) {\ - longest = $2;\ - } else if ( $1 == "HEAD" ) {\ - printf("\\item {\\large\\bf %s}\n",$2);\ - printf("\\vspace{-2ex}\\begin{tabbing}\n");\ - printf("{\\bf %s} \\= \\kill\n",longest);\ - } else if ( $1 == "END" ) {\ - printf("\\end{tabbing}\\vspace{-2ex}\n\n");\ - } else {\ - printf("{\\bf %s} \\> %s \\\\\n",$1,$2);\ - }\ - }\ -}' $PROGFILE | sed -e 's/e\.g\./{\\eg}/g' >> $TEXIDX -echo "\end{description}" >> $TEXIDX - -#last line -- 2.11.4.GIT