Re: [AMBER-Developers] Docs

From: Scott Brozell <sbrozell.rci.rutgers.edu>
Date: Wed, 16 Dec 2009 01:06:41 -0500

Hi,

On Tue, Dec 15, 2009 at 10:18:33PM -0500, Jason Swails wrote:
> On Tue, Dec 15, 2009 at 9:30 PM, case <case.biomaps.rutgers.edu> wrote:
> > On Tue, Dec 15, 2009, Scott Brozell wrote:
> >>
> >> I edit the .lyx via vi.
> >
> > What a wimp you are...real men (we'll give Lachele a break here) use ed.

ack, im not renouncing my y chromosome again ;-)

> And real n00bs have never heard of 'ed' before now...
> (after trying ed, I still like vi better :) )

i actually use vim; just in case ure really using a plain old vi.
column cutting is just too convenient :)

> > (Tom Macke actually did/does use ed, by the way).

ed, that brings back good grad school memories
(check out that 26 char name MAPLE_PRIMITIVES_READ_FILE):
[good thing this list doesnt have a moderator; maybe it should :]

# Am Basis Set Construction Makefile
ATMSCF_COEF = am.coef
ATMSCF_INPUT = am
ATMSCF_OUTPUT = am.out
# lines in $(ATMSCF_INPUT) for initial orbital coefs
COEF_START_LINE = 26
COEF_END_LINE = 44
ED_COMMANDS = .am.ed_commands
TRIAL_VECTORS = .am.trial_vectors
$(ATMSCF_OUTPUT): $(ATMSCF_COEF)
        rm -f $(TRIAL_VECTORS)
        /home/sbrozell/cpp/fp < $(ATMSCF_COEF) | 5e15.8 > $(TRIAL_VECTORS)
        rm -f $(ED_COMMANDS)
        echo "$(COEF_START_LINE),$(COEF_END_LINE)d" > $(ED_COMMANDS)
        echo "$(COEF_START_LINE)-1r $(TRIAL_VECTORS)" >> $(ED_COMMANDS)
        echo "w" >> $(ED_COMMANDS)
        echo "q" >> $(ED_COMMANDS)
        ed $(ATMSCF_INPUT) < $(ED_COMMANDS)
# rm $(TRIAL_VECTORS)
# rm $(ED_COMMANDS)
        /home/sbrozell/atmscf/atmscf < $(ATMSCF_INPUT) > $(ATMSCF_OUTPUT) &

# save coefficients, atmscf input and output files
# filenames are
VERSION = A
copy:
# echo VERSION is $(VERSION)
# umask 222
        cp $(ATMSCF_COEF) $(ATMSCF_COEF).v$(VERSION)
        chmod 444 $(ATMSCF_COEF).v$(VERSION)
        cp $(ATMSCF_INPUT) $(ATMSCF_INPUT).v$(VERSION)
        chmod 444 $(ATMSCF_INPUT).v$(VERSION)
        cp $(ATMSCF_OUTPUT) $(ATMSCF_OUTPUT).v$(VERSION)
        chmod 444 $(ATMSCF_OUTPUT).v$(VERSION)

# create file .$(ATMSCF_COEF) containing optimized orbital coefficients from $(ATMSCF_OUTPUT)
# .$(ATMSCF_COEF) has the correct format to be used as input to the $(ATMSCF_OUTPUT) make rule
# simply cp .$(ATMSCF_COEF) $(ATMSCF_COEF) ; make
# line in $(ATMSCF_OUTPUT) with orbital labels immediately before optimized coefs
OPT_COEF_START_LINE = 130
MAX_NUM_PRIMITIVES = 12
coef:
        cp $(ATMSCF_OUTPUT) ..$(ATMSCF_COEF)
        rm -f $(ED_COMMANDS)
        echo '$(OPT_COEF_START_LINE)+3+$(MAX_NUM_PRIMITIVES)+1,$$d' > $(ED_COMMANDS)
        echo "$(OPT_COEF_START_LINE)+1,$(OPT_COEF_START_LINE)+3d" >> $(ED_COMMANDS)
        echo "1,$(OPT_COEF_START_LINE)-1d" >> $(ED_COMMANDS)
        echo "w" >> $(ED_COMMANDS)
        echo "q" >> $(ED_COMMANDS)
        ed ..$(ATMSCF_COEF) < $(ED_COMMANDS)
        rm -f .$(ATMSCF_COEF)
        cut -c1-15 ..$(ATMSCF_COEF) > .$(ATMSCF_COEF)
        echo "\n" >> .$(ATMSCF_COEF)
        cut -c16-30 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
        echo "\n" >> .$(ATMSCF_COEF)
        cut -c31-45 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
        echo "\n" >> .$(ATMSCF_COEF)
        cut -c46-60 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
        echo "\n" >> .$(ATMSCF_COEF)
        cut -c61-75 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
        echo "\n" >> .$(ATMSCF_COEF)
        cut -c76-90 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
# for graph rule
        echo " " >> .$(ATMSCF_COEF)
        cut -c91-105 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)
# for graph rule
        echo " " >> .$(ATMSCF_COEF)
#cut -c106-120 ..$(ATMSCF_COEF) >> .$(ATMSCF_COEF)

# create read file for maple containing procedure representing basis function
MAPLE_COEF_READ_FILE = am.coef.maple
MAPLE_INPUT = am.maple
graph:
        make -f am.mak coef
        rm -f $(ED_COMMANDS)
        echo '1,$$s/[1-7][spdf]/coef_& := [0/' > $(ED_COMMANDS)
        echo '1,$$g/[-+ ][0-9]*\.[0-9][0-9]*/s/^/,/' >> $(ED_COMMANDS)
        echo '1,$$s/^\\n$$/]:/' >> $(ED_COMMANDS)
        echo '1,$$s/^ $$/]:/' >> $(ED_COMMANDS)
        echo '1,$$g/^$$/d' >> $(ED_COMMANDS)
        echo "w" >> $(ED_COMMANDS)
        echo "q" >> $(ED_COMMANDS)
        ed .$(ATMSCF_COEF) < $(ED_COMMANDS)
        cp .$(ATMSCF_COEF) $(MAPLE_COEF_READ_FILE)
        maple < $(MAPLE_INPUT)

#
MAPLE_PRIMITIVES_READ_FILE = am.prim.maple
# lines in $(ATMSCF_OUTPUT) for orbital exponents
PRIMITIVES_START_LINE = 33
maple:
        cp $(ATMSCF_OUTPUT) .$(MAPLE_PRIMITIVES_READ_FILE)
        rm -f $(ED_COMMANDS)
        echo '$(PRIMITIVES_START_LINE)+1+$(MAX_NUM_PRIMITIVES)+1,$$d' > $(ED_COMMANDS)
        echo "$(PRIMITIVES_START_LINE)+1d" >> $(ED_COMMANDS)
        echo "1,$(PRIMITIVES_START_LINE)-1d" >> $(ED_COMMANDS)
        echo '1,$$s/ [1-4] //g' >> $(ED_COMMANDS)
        echo "w" >> $(ED_COMMANDS)
        echo "q" >> $(ED_COMMANDS)
        ed .$(MAPLE_PRIMITIVES_READ_FILE) < $(ED_COMMANDS)
        rm -f $(MAPLE_PRIMITIVES_READ_FILE)
        cut -c1-21 .$(MAPLE_PRIMITIVES_READ_FILE) > $(MAPLE_PRIMITIVES_READ_FILE)
        echo "]:" >> $(MAPLE_PRIMITIVES_READ_FILE)
        cut -c22-42 .$(MAPLE_PRIMITIVES_READ_FILE) >> $(MAPLE_PRIMITIVES_READ_FILE)
        echo "]:" >> $(MAPLE_PRIMITIVES_READ_FILE)
        cut -c43-63 .$(MAPLE_PRIMITIVES_READ_FILE) >> $(MAPLE_PRIMITIVES_READ_FILE)
        echo "]:" >> $(MAPLE_PRIMITIVES_READ_FILE)
        cut -c64-84 .$(MAPLE_PRIMITIVES_READ_FILE) >> $(MAPLE_PRIMITIVES_READ_FILE)
        echo "]:" >> $(MAPLE_PRIMITIVES_READ_FILE)
        rm -f $(ED_COMMANDS)
        echo '1,$$s/[spdf]/prim_& := [0/' > $(ED_COMMANDS)
        echo '1,$$s/ *prim_/prim_/' >> $(ED_COMMANDS)
        echo '1,$$g/[-+ ][0-9]*\.[0-9][0-9]*/s/^/,/' >> $(ED_COMMANDS)
        echo '1,$$g/^$$/d' >> $(ED_COMMANDS)
        echo "w" >> $(ED_COMMANDS)
        echo "q" >> $(ED_COMMANDS)
        ed $(MAPLE_PRIMITIVES_READ_FILE) < $(ED_COMMANDS)
        #cp .$(MAPLE_PRIMITIVES_READ_FILE) $(MAPLE_COEF_READ_FILE)


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue Dec 15 2009 - 22:30:02 PST
Custom Search