diff --git a/lib/atc/Install.py b/lib/atc/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/atc/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/atc/Install.py b/lib/atc/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/atc/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/awpmd/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/awpmd/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/h5md/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/h5md/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/meam/Install.py b/lib/meam/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/meam/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/meam/Install.py b/lib/meam/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/meam/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/poems/Install.py b/lib/poems/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/poems/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/poems/Install.py b/lib/poems/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/poems/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/qmmm/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/qmmm/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/reax/Install.py b/lib/reax/Install.py deleted file mode 100644 index 29270560a..000000000 --- a/lib/reax/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/reax/Install.py b/lib/reax/Install.py new file mode 120000 index 000000000..ffe709d44 --- /dev/null +++ b/lib/reax/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file