Skip to content

Commit

Permalink
Merge pull request #37 from choderalab/am16
Browse files Browse the repository at this point in the history
AmberTools v16 upgrade with tests

Resolves #36
  • Loading branch information
Lnaden authored Oct 28, 2016
2 parents 9439be7 + 6449f53 commit 8af922f
Show file tree
Hide file tree
Showing 693 changed files with 973,698 additions and 78,114 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ addons:
- g++
- gfortran
- bison
- csh

install:
- ./configure --prefix=$HOME/appveyor
Expand All @@ -17,4 +18,10 @@ script:
- $HOME/appveyor/bin/sqm -h
- $HOME/appveyor/bin/antechamber -h
- $HOME/appveyor/bin/tleap -h
# Run tests
- cd $HOME/appveyor/test && make test.antechamber
- cd $HOME/appveyor/test && make test.sqm
- cd $HOME/appveyor/test && make test.leap
- cd $HOME/appveyor/test && make test.paramfit
- cd $HOME/appveyor/test && make clean

12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ endif

PROGS=antechamber$(WRAPPER_SFX) acdoctor$(SFX) am1bcc$(SFX) antechamber_pvt$(SFX) \
atomtype$(SFX) bondtype$(SFX) charmmgen$(SFX) database$(SFX) espgen$(SFX) \
parmcal$(SFX) parmchk$(WRAPPER_SFX) parmchk2$(WRAPPER_SFX) prepgen$(SFX) \
residuegen$(SFX) sqm$(SFX) teLeap$(SFX) tleap$(WRAPPER_SFX) translate$(SFX) \
match$(SFX) match_atomname$(SFX) parmcal$(SFX) parmchk$(WRAPPER_SFX) \
paramfit$(WRAPPER_SFX) parmchk2$(WRAPPER_SFX) prepgen$(SFX) residuegen$(SFX) respgen$(SFX) sqm$(SFX) \
teLeap$(SFX) tleap$(WRAPPER_SFX) translate$(SFX) \
paramfit_pvt$(SFX) \
parmchk_pvt$(SFX) parmchk2_pvt$(SFX)

all: prep libs
$(MAKE) antechamber
$(MAKE) leap
$(MAKE) paramfit
$(MAKE) sqm

install: all
$(MKDIR) -p $(PREFIX)/bin $(PREFIX)/share
cd bin && mv $(PROGS) $(PREFIX)/bin
cp -r share/amber/dat $(PREFIX)
cp -r test $(PREFIX)
cp config.h $(PREFIX)/test

prep:
$(MKDIR) -p bin
Expand All @@ -31,6 +36,9 @@ antechamber::
leap::
cd leap && $(MAKE) install

paramfit::
cd paramfit && $(MAKE) install

sqm::
cd sqm && $(MAKE) install

Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
`ambermini` is an internal dependency for [omnia](http://omnia.md), and contains a stripped-down set of just antechamber, sqm, and tleap.
[![Travis Build Status](https://travis-ci.org/choderalab/ambermini.png)](https://travis-ci.org/choderalab/ambermini)

`ambermini` is an internal dependency for [omnia](http://omnia.md), and
contains a stripped-down set of just antechamber, sqm, paramfit, and tleap.

**NOTE: This is not an officially-supported AmberTools distribution.**

To obtain AmberTools, go to [the Amber webpage](http://ambermd.org).

This version has been updated to match AmberTools 15 as of 23 Jun 2015.
This version has been updated to match AmberTools 16, patch 16 as of 19 Oct 2016.

Release versions are denoted by the following X.Y.Z Syntax:
* X = AmberTools version
* Y = AMBER patch number
* Z = AmberMini bug fix number

### To install
```
Expand Down
29 changes: 29 additions & 0 deletions antechamber/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PROGS = \
$(BINDIR)/charmmgen$(SFX) \
$(BINDIR)/database$(SFX) \
$(BINDIR)/espgen$(SFX) \
$(BINDIR)/match$(SFX) \
$(BINDIR)/match_atomname$(SFX) \
$(BINDIR)/parmcal$(SFX) \
$(BINDIR)/parmchk$(SFX) \
$(BINDIR)/parmchk_pvt$(SFX) \
Expand Down Expand Up @@ -163,6 +165,27 @@ ncsu-penalties.o: ncsu-penalties.h
parmcal.o: common.h
parmcal.o: define.h
parmcal.o: utility.c
match.o: common.h
match.o: define.h
match.o: atom.h
match.o: utility.c
match.o: common.c
match.o: ring.c
match.o: ac.c
match.o: pdb.c
match.o: mol2.c
match.o: mdl.c
match.o: rst.c
match_atomname.o: common.h
match_atomname.o: define.h
match_atomname.o: atom.h
match_atomname.o: utility.c
match_atomname.o: common.c
match_atomname.o: equatom2.c
match_atomname.o: ac.c
match_atomname.o: pdb.c
match_atomname.o: mol2.c
match_atomname.o: prep.c
parmchk.o: common.h
parmchk.o: define.h
parmchk.o: atom.h
Expand Down Expand Up @@ -274,6 +297,12 @@ $(BINDIR)/delphigen$(SFX): delphigen.o
$(BINDIR)/espgen$(SFX): espgen.o
$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) espgen.o $(LM) -o $(BINDIR)/espgen$(SFX)

$(BINDIR)/match$(SFX): match.o
$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) match.o $(LM) -o $(BINDIR)/match$(SFX)

$(BINDIR)/match_atomname$(SFX): match_atomname.o
$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) match_atomname.o $(LM) -o $(BINDIR)/match_atomname$(SFX)

$(BINDIR)/parmcal$(SFX): parmcal.o
$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) parmcal.o $(LM) -o $(BINDIR)/parmcal$(SFX)

Expand Down
73 changes: 50 additions & 23 deletions antechamber/antechamber.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ int default_flag = 0; /*assign default information? */
int atomname_flag = 0; /*assign atom name? */
int atomicnum_flag = 0; /*judge atomic number according to atom name ? */
int adjustatomname_flag = 0; /*adjust atom name? */
int usr_aan_flag = -99; /*the user's input for adjusting atom names */
int usr_aan_flag = -99; /*the user's input for adjusting atom names */
int duplicatedname_flag = 0; /*check atom name duplication? */
int cartcoord_flag = 0; /*generate coordinate from internal coordinate ? */
int connect_flag = 0; /*judge atom connectivity and generate bond ? */
int chargemethod_flag = 0; /* is there a "-c" flag on the input line? */
int chargemethod_flag = 0; /* is there a "-c" flag on the input line? */
int divcon_flag = 2;
int ek_flag = 0; /* read empircal calculation keyword or not */
int max_path_length = -1;
Expand Down Expand Up @@ -113,12 +113,12 @@ void usage()
" -a  additional file name\n"
" -fa  additional file format\n"
" -ao  additional file operation\n"
"[35m crd [0m: only read in coordinate\n"
"[35m crg [0m: only read in charge\n"
"[35m radius[0m: only read in radius\n"
"[35m name [0m: only read in atom name\n"
"[35m type [0m: only read in atom type\n"
"[35m bond [0m: only read in bond type \n"
"[34m crd [0m: only read in coordinate\n"
"[34m crg [0m: only read in charge\n"
"[34m radius[0m: only read in radius\n"
"[34m name [0m: only read in atom name\n"
"[34m type [0m: only read in atom type\n"
"[34m bond [0m: only read in bond type \n"
" -m  multiplicity (2S+1), default is 1\n"
" -rn  residue name, overrides input file, default is MOL\n"
" -rf  residue toplogy file name in prep input file,\n"
Expand All @@ -129,27 +129,32 @@ void usage()
" -gm  gaussian memory keyword, inside a pair of quotes, such as\"%%mem=1000MB\"\n"
" -gn  gaussian number of processors keyword, inside a pair of quotes, such as \"%%nproc=8\"\n"
" -gv  add keyword to generate gesp file (for Gaussian 09 only)\n"
"[35m 1 [0m: yes\n"
"[35m 0 [0m: no, the default\n"
"[34m 1 [0m: yes\n"
"[34m 0 [0m: no, the default\n"
" -ge  gaussian esp file generated by iop(6/50=1), default is g09.gesp\n"
" -df  am1-bcc precharge flag, 2 - use sqm(default); 0 - use mopac\n"
" -at  atom type, can be gaff (the default), amber (for PARM94/99/99SB), bcc and sybyl\n"
" -at  atom type\n"
" gaff : the default\n"
" gaff2: for gaff2 (beta-version)\n"
" amber: for PARM94/99/99SB\n"
" bcc : bcc \n"
" sybyl: sybyl \n"
" -du  fix duplicate atom names: yes(y)[default] or no(n)\n"
" -bk  4-character component Id, for ccif\n"
" -an  adjust atom names: yes(y) or no(n)\n"
" the default is 'y' for 'mol2' and 'ac' and 'n' for the other formats \n"
" -j  atom type and bond type prediction index, default is 4 \n"
"[35m 0 [0m: no assignment\n"
"[35m 1 [0m: atom type \n"
"[35m 2 [0m: full bond types \n"
"[35m 3 [0m: part bond types \n"
"[35m 4 [0m: atom and full bond type \n"
"[35m 5 [0m: atom and part bond type \n"
"[34m 0 [0m: no assignment\n"
"[34m 1 [0m: atom type \n"
"[34m 2 [0m: full bond types \n"
"[34m 3 [0m: part bond types \n"
"[34m 4 [0m: atom and full bond type \n"
"[34m 5 [0m: atom and part bond type \n"
" -s  status information: 0(brief), 1(default) or 2(verbose)\n"
" -eq  equalizing atomic charge, default is 1 for '-c resp' and '-c bcc' and 0 for the other charge methods \n"
"[35m 0 [0m: no use\n"
"[35m 1 [0m: by atomic paths \n"
"[35m 2 [0m: by atomic paths and structural information, i.e. E/Z configurations \n"
"[34m 0 [0m: no use\n"
"[34m 1 [0m: by atomic paths \n"
"[34m 2 [0m: by atomic paths and structural information, i.e. E/Z configurations \n"
" -pf  remove intermediate files: yes(y) or no(n)[default]\n"
" -pl  maximum path length to determin equivalence of atomic charges for resp and bcc,\n"
"  the smaller the value, the faster the algorithm, default is -1 (use full length),\n"
Expand Down Expand Up @@ -1173,7 +1178,7 @@ int main(int argc, char *argv[])
} else

if (strcmp("prepc", cinfo.intype) == 0
|| strcmp("5", cinfo.intype) == 0) {
|| strcmp("6", cinfo.intype) == 0) {
overflow_flag = rprepc(ifilename, &atomnum, atom, &cinfo, &minfo);
if (overflow_flag) {
cinfo.maxatom = atomnum + 10;
Expand Down Expand Up @@ -1891,6 +1896,28 @@ int main(int argc, char *argv[])
(strcmp("mpdb", cinfo.outtype) == 0 || strcmp("4", cinfo.outtype) == 0))
read_radius(minfo.radius_file, atomnum, atom);

/* This part may not necessary
if(atomtype_flag == 0 && (strcmp("charmm", cinfo.outtype) == 0|| strcmp("23", cinfo.outtype) == 0 ||
strcmp("ac", cinfo.outtype) == 0 || strcmp("1", cinfo.outtype) == 0 ||
strcmp("mol2", cinfo.outtype) == 0 || strcmp("2", cinfo.outtype) == 0 ||
strcmp("csd", cinfo.outtype) == 0 || strcmp("14", cinfo.outtype) == 0 ||
strcmp("mdl", cinfo.outtype) == 0 || strcmp("15", cinfo.outtype) == 0 ||
strcmp("sdf", cinfo.outtype) == 0 || strcmp("sd", cinfo.outtype) == 0 ||
strcmp("alc", cinfo.outtype) == 0 || strcmp("13", cinfo.outtype) == 0 ||
strcmp("hin", cinfo.outtype) == 0 || strcmp("16", cinfo.outtype) == 0)) {
memory(8, cinfo.maxatom, cinfo.maxbond, cinfo.maxring);
overflow_flag =
ringdetect(atomnum, atom, bondnum, bond, &ringnum, ring, arom,
cinfo.maxatom, cinfo.maxring, minfo.inf_filename, 0);
if (overflow_flag) {
cinfo.maxring = ringnum + 10;
memory(8, cinfo.maxatom, cinfo.maxbond, cinfo.maxring);
overflow_flag =
ringdetect(atomnum, atom, bondnum, bond, &ringnum, ring, arom,
cinfo.maxatom, cinfo.maxring, minfo.inf_filename, 0);
}
}
*/
if(ra_flag==1)
read_at(at_filename);
if(rb_flag==1)
Expand All @@ -1901,7 +1928,7 @@ int main(int argc, char *argv[])
|| strcmp("1", cinfo.outtype) == 0){
wac(ofilename, atomnum, atom, bondnum, bond, cinfo, minfo);
} else if (strcmp("charmm", cinfo.outtype) == 0
|| strcmp("23", cinfo.outtype) == 0){
|| strcmp("25", cinfo.outtype) == 0){
wcharmm(ofilename, ifilename, atomnum, atom, bondnum, bond, cinfo, minfo);
} else if (strcmp("mol2", cinfo.outtype) == 0
|| strcmp("2", cinfo.outtype) == 0) {
Expand Down Expand Up @@ -1974,7 +2001,7 @@ int main(int argc, char *argv[])
|| strcmp("22", cinfo.outtype) == 0){
wdivout(ofilename, atomnum, atom, cinfo, minfo);
} else if (strcmp("gesp", cinfo.outtype) == 0
|| strcmp("25", cinfo.outtype) == 0){
|| strcmp("26", cinfo.outtype) == 0){
wgesp();
} else if (strcmp("sqmcrt", cinfo.outtype) == 0
|| strcmp("23", cinfo.outtype) == 0){
Expand Down
23 changes: 23 additions & 0 deletions antechamber/atom.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ typedef struct {
int id;
int ter;
int resno;
int resseqno;
int hdonor;
int haccept;
int atomtype;
Expand Down Expand Up @@ -225,3 +226,25 @@ typedef struct {
typedef struct {
int aps[10];
} AV;

/*parameters for calculationg bond stretching force constant*/
typedef struct {
double bfkai;
double refbondlength;
int id1;
int id2;
char elem1[10];
char elem2[10];
} BLF_PARM;

/*parameters for calculationg bond bending force constant*/
typedef struct {
double anglec;
double anglez;
int id;
char elem[10];
} BAF_PARM;
BLF_PARM blf_parm[MAXBLFPARM];
BAF_PARM baf_parm[120];
double blf_exp_const = 4.5; /*exponential parameter for calculating blf*/

Loading

0 comments on commit 8af922f

Please sign in to comment.