--- /dev/null
+*.pyc
+.sconsign.dblite
+config.log
Build with
$ cd tex
- tex$ make
+ tex$ scons
Rebuild (after editing some file(s) in tex/src/) with
- tex$ make
+ tex$ scons
Getting the source
+++ /dev/null
-LATEX = pdflatex
-#LATEX = xelatex
-
-thesis.pdf : build
- (cd ./build && $(LATEX) root)
- (cd ./build && bibtex root)
- (cd ./build && $(LATEX) root)
- (cd ./build && bibtex root)
- (cd ./build && $(LATEX) root)
- (cd ./build && bibtex root)
- (cd ./build && makeindex root.nlo -s nomencl.ist -o root.nls)
- (cd ./build && makeindex root.idx)
- (cd ./build && $(LATEX) root)
- (cd ./build && $(LATEX) root)
- mv build/root.pdf $@
-
-.PHONY: build
-build :
- rsync -a src/ build
- $(MAKE) --directory build all
-
-clean :
- rm -rf build thesis.pdf
--- /dev/null
+#Help("""...""")
+
+VariantDir('build', 'src')
+thesis_build = SConscript('build/SConscript')
+Clean(thesis_build, 'build')
+thesis_pdf = Command('thesis.pdf', thesis_build, Copy("$TARGET", "$SOURCE"))
+Alias('pdf', thesis_pdf)
+Default(thesis_pdf)
--- /dev/null
+import os.path
+import SCons.Node.FS
+
+
+def include_child_SConscripts(env, SConscript):
+ """Get all the nested SConscripts in that may alter and pass back
+ the environment. They may also add thesis subdependencies to that
+ environment.
+ """
+ for subdir in env.Glob('*'):
+ if not isinstance(subdir, SCons.Node.FS.Dir):
+ continue # subdir isn't a directory
+ var_sconscript_path = os.path.join(subdir.abspath,
+ 'SConscript')
+ src_sconscript_path = os.path.join(subdir.srcnode().abspath,
+ 'SConscript')
+ if os.path.exists(src_sconscript_path):
+ if env.GetOption('silent') is False:
+ # ideally 'silent' should be -Q, not the current -s/--silent/--quiet
+ print 'Including', var_sconscript_path
+ env = SConscript(var_sconscript_path, 'env')
+ return env
+
+def check_exec(context, executible):
+ # TODO: context.env vs. context.vardict
+ context.Message('Checking for %s executible...' % executible)
+ if executible.upper() in context.env:
+ context.Result('yes')
+ return 'yes'
+ result = 'no'
+ for p in context.env.Dictionary()['ENV']['PATH']:
+ path = os.path.join(p, executible)
+ if os.path.exists(path):
+ result = 'yes'
+ break
+ context.Result(result)
+ if result is 'yes':
+ context.env[executible.upper()] = path
+ return result
+
+def link_wtk_graph(env):
+ return env.Command('wtk_graph.asy', '../asy/wtk_graph.asy',
+ SCons.Script.Copy('$TARGET', '$SOURCE'))
--- /dev/null
+import os.path
+import re
+import SCons.Action
+import SCons.Scanner
+import SCons.Script
+import SCons.Util
+import doctest
+
+
+double_quoted_string_re = re.compile(r'"([^"]*)"', re.M)
+
+def asymptote_scan(node, env, path, arg=None):
+ """
+ >>> class node (object):
+ ... def __init__(self, path):
+ ... self.path = path
+ ... self.abspath = os.path.abspath(self.path)
+ ... if os.path.isfile(self.path):
+ ... self.dir = node(os.path.dirname(path))
+ ... def get_text_contents(self):
+ ... return open(self.path, 'r').read()
+ ... def get_contents(self):
+ ... return self.get_text_contents()
+ ... def srcnode(self):
+ ... return self
+ >>> for p in asymptote_scan(
+ ... node('../../src/figures/cantilever-sim/v-dep.asy'),
+ ... None, None, None):
+ ... print p
+ v-dep.d/v_dep_127_8
+ v-dep.d/v_dep_27_8
+ v-dep.d/v_dep_127_30
+ v-dep.d/v_dep_27_30
+ v-dep.d/v_dep_0.1_1
+ v-dep.d/v_dep_0.1_30
+ """
+ try:
+ contents = node.get_text_contents()
+ except AttributeError:
+ contents = node.get_contents() # for older versions of SCons, fall back on binary read
+ ret = []
+ for string in double_quoted_string_re.findall(contents):
+ p = os.path.join(node.dir.srcnode().abspath, string)
+ if len(string) > 0 and \
+ ((string not in ret and os.path.exists(p))
+ or string.endswith('.dat')):
+ ret.append(string)
+ return ret
+
+def asymptote_emitter(target, source, env):
+ assert str(source[0]).endswith('.asy'), str(source[0])
+ filebase = str(source[0])[:-len('.asy')]
+ target.extend(['%s_%s' % (filebase, ext)
+ for ext in ['.tex', '.pre', '0.pdf']])
+ target.extend(['%s-comp.%s' % (filebase, ext)
+ for ext in ['idx', 'log', 'nlo', 'pdf']])
+ source.append(SCons.Script.Alias('asytools'))
+ return target, source
+
+AsymptoteAction = None
+
+def generate(env):
+ """Add Builders and construction variables for Asymptote to an Environment."""
+ global AsymptoteAction
+ if AsymptoteAction is None:
+ AsymptoteAction = SCons.Action.Action('$ASYMPTOTECOM', '$ASYMPTOTECOMSTR')
+
+ #import pdf
+ #pdf.generate(env)
+
+ env['BUILDERS']['Asymptote'] = SCons.Script.Builder(
+ action=AsymptoteAction, suffix='_.tex', src_suffix = '.asy',
+ emitter=asymptote_emitter)
+ env['ASYMPTOTE'] = '../asy/asyprocess'
+ env['ASYMPTOTEFLAGS'] = SCons.Util.CLVar(
+ "--texinputs=../..: "
+ "--pretex='\documentclass{drexel-thesis} \input{packages}' "
+ "--")
+ env['ASYMPTOTECOM'] = 'cd ${TARGET.dir} && $ASYMPTOTE $ASYMPTOTEFLAGS ${SOURCE.filebase}'
+ env.Append(SCANNERS=SCons.Scanner.Base(
+ function=asymptote_scan,
+ name='Asymptote',
+ skeys=['.asy']))
+
+def exists(env):
+ return env.Detect('asymptote')
+
+if __name__ == '__main__':
+ doctest.testmod()
--- /dev/null
+import os.path
+import re
+import SCons.Action
+import SCons.Scanner
+import SCons.Script
+import SCons.Util
+import doctest
+
+quoted_string_re = re.compile(r"'([^']*)'", re.M)
+
+def gnuplot_scan(node, env, path, arg=None):
+ """
+ >>> class node (object):
+ ... def __init__(self, path):
+ ... self.path = path
+ ... self.abspath = os.path.abspath(self.path)
+ ... if os.path.isfile(self.path):
+ ... self.dir = node(os.path.dirname(path))
+ ... def get_text_contents(self):
+ ... return open(self.path, 'r').read()
+ ... def get_contents(self):
+ ... return self.get_text_contents()
+ ... def srcnode(self):
+ ... return self
+ >>> for p in gnuplot_scan(
+ ... node('../../src/figures/order-dep/fig.gp'),
+ ... None, None, None):
+ ... print p
+ data/order.avg-4
+ data/order.avg-8
+ data/order.avg-12
+ data/order.avg-16
+ data/hist3i.hist
+ data/hist3ii.hist
+ data/hist3iii.hist
+ """
+ try:
+ contents = node.get_text_contents()
+ except AttributeError:
+ contents = node.get_contents() # for older versions of SCons, fall back on binary read
+ ret = []
+ for string in quoted_string_re.findall(contents):
+ p = os.path.join(node.dir.srcnode().abspath, string)
+ if len(string) > 0 and \
+ ((string not in ret and os.path.exists(p))
+ or string.endswith('.dat')):
+ ret.append(string)
+ return ret
+
+GnuplotAction = None
+
+def generate(env):
+ """Add Builders and construction variables for Gnuplot to an Environment."""
+ global GnuplotAction
+ if GnuplotAction is None:
+ GnuplotAction = SCons.Action.Action('$GNUPLOTCOM', '$GNUPLOTCOMSTR')
+
+ #import pdf
+ #pdf.generate(env)
+
+ env['BUILDERS']['Gnuplot'] = SCons.Script.Builder(
+ action=GnuplotAction, suffix='.pdf', src_suffix = '.gp')
+ env['GNUPLOT'] = 'gnuplot'
+ env['GNUPLOTFLAGS'] = '' #SCons.Util.CLVar('')
+ env['GNUPLOTCOM'] = 'cd ${TARGET.dir} && $GNUPLOT $GNUPLOTLAGS ${SOURCE.file}'
+ env.Append(SCANNERS=SCons.Scanner.Base(
+ function=gnuplot_scan,
+ name='Gnuplot',
+ skeys=['.gp']))
+
+def exists(env):
+ return env.Detect('gnuplot')
+
+if __name__ == '__main__':
+ doctest.testmod()
+++ /dev/null
-SUBDIRS = packages apparatus cantilever cantilever-calib contour-space \
- figures future introduction sawsim temperature temperature-theory \
- tension unfolding unfolding-distributions viscocity
-
-all :
- @for i in $(SUBDIRS); do \
- echo "make all in $$i..."; \
- (cd $$i; $(MAKE) $(MFLAGS) all); done
- @for file in $(shell find . -name '*.tex'); do \
- cat local_words >> $$file; done
-
-clean :
- @for i in $(SUBDIRS); do \
- echo "make clean in $$i..."; \
- (cd $$i; $(MAKE) $(MFLAGS) clean); done
--- /dev/null
+import os.path
+import SCons.Scanner
+
+from site_cons.site_init import include_child_SConscripts, check_exec
+from site_cons.site_tools import asymptote, gnuplot
+
+# Make a new environment.
+env = Environment(ENV={
+ 'PATH':['/usr/local/bin', '/opt/bin', '/bin', '/usr/bin'],
+ 'HOME':os.path.expanduser('~'),
+ 'DISPLAY':os.environ['DISPLAY'],
+ 'PYMOL_PATH':'/usr/lib/python2.6/site-packages/pymol',
+ 'PYMOL_DATA':'/usr/share/pymol/data',
+ 'PYMOL_SCRIPTS':'/usr/share/pymol/scripts',
+ })
+asymptote.generate(env)
+gnuplot.generate(env)
+
+if not env.GetOption('clean'):
+ # Configure the environment since we're not cleaning.
+ conf = Configure(env, custom_tests={'CheckExec':check_exec})
+ if not conf.CheckExec('pymol'):
+ print 'PyMol is not installed!'
+ Exit(1)
+ conf.CheckExec('dot')
+ env = conf.Finish()
+
+# Include sub-SConscript files with rules for figures, packages, etc.
+env = include_child_SConscripts(env, SConscript)
+
+# Alias the thesis' base latex, which is used by asyprocess when
+# building the Asymptote graphics.
+Alias('latex-base', [Glob('*.tex'), Alias('extra-packages')])
+
+# Add a rule for the thesis itself.
+#thesis = Command('thesis', objs, 'TODO')
+thesis = env.Command('thesis.pdf', [], Touch('$TARGET'))
+
+Return('thesis')
+
+#thesis.pdf : build
+# (cd ./build && $(LATEX) root)
+# (cd ./build && bibtex root)
+# (cd ./build && $(LATEX) root)
+# (cd ./build && bibtex root)
+# (cd ./build && $(LATEX) root)
+# (cd ./build && bibtex root)
+# (cd ./build && makeindex root.nlo -s nomencl.ist -o root.nls)
+# (cd ./build && makeindex root.idx)
+# (cd ./build && $(LATEX) root)
+# (cd ./build && $(LATEX) root)
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-PYTHON_FILES = Lorentz_root locate_roots test_integral test_roots
-
-all : $(PYTHON_FILES:%=%.png)
-
-%.png : %.py
- python $<
-
-clean :
- rm -f $(PYTHON_FILES:%=%.png)
--- /dev/null
+print 'reading', __file__
+
+# Get the passed in environment.
+Import('env')
+
+# Configure the builders. This is all we're doing here for this case.
+env = SConscript('builders.SConscript', 'env')
+
+for python_file in Glob('*.py'):
+ env.Command(python_file.replace('.py', '.png'),
+ python_file,
+ 'python $SOURCE')
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-SUBDIRS = biotin-streptavidin cantilever-data cantilever-sim contour \
- expt-sawtooth fit-space i27 kappa-sawteeth order-dep schematic \
- sim-hist sim-sawtooth v-dep \
- # calibration-concept-map
-
-all :
- @for i in $(SUBDIRS); do \
- echo "make all in $$i..."; \
- $(MAKE) --directory $$i $(MFLAGS) all; \
- done
-
-clean :
- @for i in $(SUBDIRS); do \
- echo "make all in $$i..."; \
- $(MAKE) --directory $$i $(MFLAGS) clean; \
- done
--- /dev/null
+from site_cons.site_init import include_child_SConscripts
+
+# Get the passed in environment.
+Import('env')
+
+env = include_child_SConscripts(env, SConscript)
+
+# Pass back the modified environment.
+Return('env')
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+asy = env.Alias('asytools', ['asyprocess', 'wtk_graph.asy'])
+Depends(asy, Alias('latex-base'))
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : 1SWE.png
-
-clean :
- rm -f 1SWE.png
-
-%.png : %.pml %.pdb
- pymol -cq $<
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+swe = env.Command(
+ '1SWE.png',
+ ['1SWE.pml', '1SWE.pdb'],
+ 'pymol -cq 1SWE.pml',
+ chdir=True)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : concept_map.png
-
-clean :
- rm -f concept_map.png
-
-concept_map.png :
- dot -Tpng concept_map.dot > $@
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+if 'DOT' in env:
+ env.Command('concept_map.png', 'concept_map.dot',
+ 'dot -Tpng $SOURCE > $TARGET',
+ chdir=True)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-ASYPROCESS = ../asy/asyprocess \
- --texinputs=../..: \
- --pretex='\documentclass{drexel-thesis} \input{packages}' \
- --
-
-FIGS = v-dep loading-rate
-V_DEP_DATA = v-dep.d/v_dep_131.98.dat \
- v-dep.d/v_dep_131.98.fit \
- v-dep.d/v_dep_24.33.dat \
- v-dep.d/v_dep_24.33.fit
-LOADING_RATE_DATA = loading-rate.d/loading_rate_131.98.dat \
- loading-rate.d/loading_rate_24.33.dat
-DATA = $(V_DEP_DATA) $(LOADING_RATE_DATA)
-DATA_DIRS = data v-dep.d loading-rate.d
-
-# Never delete intermediates. (`info make` 10.4 Chains of Implicit Rules)
-.SECONDARY :
-
-
-all : $(FIGS:%=%_.tex)
-
-clean :
- rm -f $(FIGS:%=%_*) $(FIGS:%=%-*) v-dep.asy v-dep.gp *.pyc
- #rm -rf $(DATA_DIRS)
-
-%_.tex : %.asy $(DATA)
- $(ASYPROCESS) $(patsubst %.asy, %, $<)
-
-$(DATA_DIRS) :
- mkdir $@
-
-data/raw : extract_f_v_k_data.sh | data
- touch data/raw
-# ./$< > $@
-
-data/avg : avg_data.py data/raw
- touch $@ # "avg" marks the time of last avg_data.py run
- python $<
-
-data/spring-constants data/averaged-data : data/avg
- @echo "$@ already build for target data/avg"
-
-v-dep.d/dat : get_v_dep.sh data/spring-constants data/averaged-data \
- | v-dep.d
- touch $@ # "dat" marks the time of last *.dat file generation
- ./$<
-
-v-dep.d/v_dep_%.dat : v-dep.d/dat
- @echo "$@ already build for target v-dep.d/dat"
-
-v-dep.d/v_dep_%.fit : fit_data.py v-dep.d/v_dep_%.dat
- python $^ > $@
-
-v-dep.asy v-dep.gp : make_v_dep_plots.sh $(V_DEP_DATA)
- ./$<
-
-v-dep.pdf : v-dep.gp $(V_DEP_DATA)
- gnuplot $<
-
-v-dep.eps : v-dep.pdf
- pdftoeps $<
-
-v-dep-rotated.pdf : v-dep.pdf
- pdftk $< cat 1E output $@
-
-loading-rate.d/dat : get_loading_rates.py avg_data.py data/raw \
- | loading-rate.d
- touch $@ # "dat" marks the time of last *.dat file generation
- python $<
-
-loading-rate.d/loading_rate_%.dat : loading-rate.d/dat
- @echo "$@ already build for target loading-rate.d/dat"
--- /dev/null
+import os.path
+
+from site_cons.site_init import link_wtk_graph
+
+
+FIGURES = ['v-dep', 'loading-rate']
+Ks = ['131.98', '24.33'] # HACK! these are not static
+
+# Get the passed in environment.
+Import('env')
+
+data_dir = Dir('data')
+raw = File(os.path.join(str(data_dir), 'raw'))
+raw = [raw]
+# = env.Command(
+# os.path.join(str(data_dir), 'raw'),
+# ['extract_f_v_k_data.sh'],
+# './$SOURCE > $TARGET')
+#env.Requires(raw, data_dir)
+
+averaged_data = env.Command(
+ os.path.join(str(data_dir), 'averaged-data'),
+ ['avg_data.py'] + raw,
+ 'cd .. && python avg_data.py',
+ chdir=True)
+spring_constants = env.SideEffect(
+ os.path.join(str(data_dir), 'spring-constants'),
+ averaged_data)
+
+loading_rate_dir = Dir('loading-rate.d')
+def loading_rate_file(k):
+ return os.path.join(str(loading_rate_dir), 'loading_rate_%s.dat' % k)
+
+loading_rates = env.Command(
+ loading_rate_file(Ks[0]),
+ ['get_loading_rates.py', 'avg_data.py', raw],
+ 'cd .. && python get_loading_rates.py',
+ chdir=True)
+#env.Requires(loading_rates, loading_rate_dir)
+
+loading_rate_data = [loading_rates]
+for k in Ks[1:]:
+ loading_rate_data.append(
+ env.SideEffect(loading_rate_file(k), loading_rates))
+
+v_dep_dir = Dir('v-dep.d')
+def v_dep_file(k):
+ return os.path.join(str(v_dep_dir), 'v_dep_%s.dat' % k)
+def v_dep_fit_file(k):
+ return os.path.join(str(v_dep_dir), 'v_dep_%s.fit.dat' % k)
+
+v_deps = env.Command(
+ v_dep_file(Ks[0]),
+ ['get_v_dep.sh', spring_constants, averaged_data],
+ 'cd .. && ./get_v_dep.sh',
+ chdir=True)
+#env.Requires(v_deps, v_dep_dir)
+
+v_dep_data = [v_deps]
+for k in Ks[1:]:
+ v_dep_data.append(
+ env.SideEffect(v_dep_file(k), v_deps))
+
+for k,data in zip(Ks, v_dep_data):
+ v_dep_data.append(
+ env.Command(
+ v_dep_fit_file(k),
+ ['fit_data.py'] + data,
+ 'python $SOURCES > $TARGET'))
+
+v_dep = env.Command(
+ 'v-dep.asy',
+ ['make_v_dep_plots.sh'] + v_dep_data,
+ './make_v_dep_plots.sh',
+ chdir=True)
+env.SideEffect('v-dep.gp', v_dep)
+
+
+wtk_graph = link_wtk_graph(env)
+
+for fig in FIGURES:
+ asyfile = '%s.asy' % fig # static .asy file
+ pyfig = fig.replace('-', '_')
+ if pyfig in globals(): # generated .asy file
+ asyfile = globals()[pyfig]
+ env.Asymptote([asyfile, wtk_graph])
+
+# Pass back the modified environment.
+Return('env')
esac
ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.dat\", xscale, yscale, $PEN, m8,
markroutine=marksize(\"$FILE.dat\", $PEN, m8, 10), t=units(\"$K\",\"pN/nm\"), dots=true);")
- ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.fit\", xscale, yscale, $PEN,
+ ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.fit.dat\", xscale, yscale, $PEN,
t=units(\"$K\",\"pN/nm\"));")
GPPLOTS="$GPPLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'"
- GPPLOTS="$GPPLOTS, '$FILE.fit' using 1:2 with lines notitle"
+ GPPLOTS="$GPPLOTS, '$FILE.fit.dat' using 1:2 with lines notitle"
done < <(tac "$KFILE")
GPPLOTS="${GPPLOTS:2}" # remove leading ' ,'
+++ /dev/null
-../asy/wtk_graph.asy
\ No newline at end of file
+++ /dev/null
-ASYPROCESS = ../asy/asyprocess \
- --texinputs=../..: \
- --pretex='\documentclass{drexel-thesis} \input{packages}' \
- --
-
-FIGS = loading-rate v-dep i-dep
-
-all : $(FIGS:%=%_.tex)
-
-clean :
- rm -f $(FIGS:%=%_*) $(FIGS:%=%-*)
-
-%_.tex : %.asy
- $(ASYPROCESS) $(patsubst %.asy, %, $<)
--- /dev/null
+from site_cons.site_init import link_wtk_graph
+
+FIGURES = ['v-dep', 'i-dep'] #'loading-rate', 'i-dep']
+
+# Get the passed in environment.
+Import('env')
+
+wtk_graph = link_wtk_graph(env)
+
+for fig in FIGURES:
+ env.Asymptote(['%s.asy' % fig, wtk_graph])
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-../asy/wtk_graph.asy
\ No newline at end of file
+++ /dev/null
-ASYPROCESS = ../asy/asyprocess \
- --texinputs=../..: \
- --pretex='\documentclass{drexel-thesis} \input{packages}' \
- --
-
-FIGS = contour
-
-all : $(FIGS:%=%_.tex)
-
-clean :
- rm -f $(FIGS:%=%_*) $(FIGS:%=%-*)
-
-%_.tex : %.asy
- $(ASYPROCESS) $(patsubst %.asy, %, $<)
--- /dev/null
+from site_cons.site_init import link_wtk_graph
+
+FIGURES = ['contour']
+
+# Get the passed in environment.
+Import('env')
+
+wtk_graph = link_wtk_graph(env)
+
+for fig in FIGURES:
+ env.Asymptote(['%s.asy' % fig, wtk_graph])
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf
-
-fig.pdf :
- gnuplot plot.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf
-
-fig.pdf :
- gnuplot plot.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
-set terminal png
-set output 'king_vs_best.png'
+set terminal pdf enhanced font 'Times,7' size 9cm, 6cm
+set output 'king_vs_best.pdf'
g(x) = 39.727*exp(-40.7215e9*x)
f(x) = 25.4465*exp(-44.6235e9*x)
set logscale y
-set terminal x11
+set terminal pdf enhanced font 'Times,7' size 9cm, 6cm
+set output 'means.pdf'
set view map
set contour base
unset surface
+++ /dev/null
-all : 1TIT.png
-
-clean :
- rm -f 1TIT.png
-
-%.png : %.pml %.pdb
- pymol -cq $<
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+tit = env.Command(
+ '1TIT.png',
+ ['1TIT.pml', '1TIT.pdb'],
+ 'pymol -cq 1TIT.pml',
+ chdir=True)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf
-
-fig.pdf :
- gnuplot plot.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf fit.params fit.log
-
-fig.pdf :
- gnuplot plot.gp 2>&1 | grep -A10 '^Fitted Kwlcs:' > fit.params
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+#order_data = Glob('data/order.avg-*')
+#hist_data = Glob('data/hist*.hist')
+#fig = env.Command('fig.pdf',
+# ['fig.gp'] + order_data + hist_data,
+# 'gnuplot fig.gp 2>&1 | grep -A10 "^Fitted Kwlcs:" > fit.params',
+# chdir=True)
+envb = env.Clone()
+envb['GNUPLOTCOM'] = \
+ ('cd ${TARGET.dir} && $GNUPLOT $GNPLOTLAGS ${SOURCE.file} 2>&1 |'
+ 'grep -A10 "^Fitted Kwlcs:" > fit.params')
+fig = envb.Gnuplot('fig.gp')
+env.SideEffect('fit.log', fig)
+env.SideEffect('fit.params', fig)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-ASYPROCESS = ../asy/asyprocess \
- --texinputs=../..: \
- --pretex='\documentclass{drexel-thesis} \input{packages}' \
- --
-
-FIGS = unfolding afm landscape-cant monte-carlo
-
-all : $(FIGS:%=%_.tex)
-
-clean :
- rm -f $(FIGS:%=%_*) $(FIGS:%=%-*)
-
-%_.tex : %.asy
- $(ASYPROCESS) $(patsubst %.asy, %, $<)
--- /dev/null
+from site_cons.site_init import link_wtk_graph
+
+FIGURES = ['unfolding', 'afm', 'landscape-cant', 'monte-carlo']
+
+# Get the passed in environment.
+Import('env')
+
+wtk_graph = link_wtk_graph(env)
+
+for fig in FIGURES:
+ deps = [wtk_graph]
+ if fig in ['afm']:
+ deps.append('base_afm.asy')
+ env.Asymptote(['%s.asy' % fig] + deps)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-../asy/wtk_graph.asy
\ No newline at end of file
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf
-
-fig.pdf :
- gnuplot plot.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all : fig.pdf
-
-clean :
- rm -f fig.pdf
-
-fig.pdf :
- gnuplot plot.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
+
+++ /dev/null
-all : fig.pdf fig-sd.pdf
-
-clean :
- rm -f fig.pdf fig-sd.pdf
-
-fig.pdf :
- gnuplot plot.gp
-
-fig-sd.pdf :
- gnuplot plot-sd.gp
--- /dev/null
+# Get the passed in environment.
+Import('env')
+
+for gp in Glob('*.gp'):
+ env.Gnuplot(gp)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-PACKAGES = $(shell ls *.sty) $(shell ls *.ist) $(shell ls *.cfg) \
- $(shell ls *.pdf) $(shell ls *.eps)
-TARGETS = $(PACKAGES:%=../%)
-
-all : $(TARGETS)
-
-../% : %
- (cd ../ ; ln -s packages/$<)
-
-clean :
- rm -f $(TARGETS)
--- /dev/null
+import os.path
+
+# Get the passed in environment.
+Import('env')
+
+# Copy all non-SConscript files into the parent directory.
+packages = []
+for path in Glob('*'):
+ if str(path) is not 'SConscript':
+ packages.append(env.Command(
+ os.path.join('..', str(path)), path,
+ Copy('$TARGET', '$SOURCE')))
+env.Alias('extra-packages', packages)
+
+# Pass back the modified environment.
+Return('env')
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :
+++ /dev/null
-all :
-
-clean :