Compare commits

..

12 Commits
3.1.1 ... 3.1.3

Author SHA1 Message Date
Peter Schmidtke
c5309000ec supporting setting architecture in command line 2019-05-26 23:12:13 +02:00
Peter Schmidtke
0a9a1df05a dropping unnecessary files 2019-05-26 23:05:12 +02:00
Peter Schmidtke
6159eab71f updating shared mofile for osx 64bits 2019-05-26 23:04:52 +02:00
Peter Schmidtke
c9ed2e4768 adapted for gcc & clang compilations + OSX 64 bit 2019-05-25 14:22:17 +02:00
Peter Schmidtke
76139ac4f4 added frequent error in documentation 2019-05-25 13:21:21 +02:00
Peter Schmidtke
33867da7c3 updating gitignore 2019-05-25 02:20:50 +02:00
Peter Schmidtke
1a381a3815 new molfile plugin compilation 2019-05-25 02:20:23 +02:00
Peter Schmidtke
78d585cd4f allow fpocket only or mdpocket compilation 2019-05-25 02:16:52 +02:00
Peter Schmidtke
6246f86252 updating the documentation on common issues 2019-05-24 23:58:00 +02:00
pschmidtke
d9012c150b dropping fprintf in db output 2018-07-24 06:16:40 +00:00
Peter Schmidtke
d36eafc12e dropping -j12 from qhull make 2018-07-24 06:03:03 +00:00
pschmidtke
0eece05649 fixing bug on makedir in db output of fpocket 2018-07-24 06:01:07 +00:00
352 changed files with 41870 additions and 4979 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
nbproject
*.o
*_out
.vscode
src/qhull/bin/

View File

@@ -41,6 +41,7 @@ sudo yum install netcdf-devel.x86_64
Download the sources from github via the website or using git clone and then build and deploy fpocket using the following commands.
#### Compiling on Linux
```
git clone https://github.com/Discngine/fpocket.git
@@ -49,6 +50,15 @@ make
sudo make install
```
#### Compiling on Mac
```
git clone https://github.com/Discngine/fpocket.git
cd fpocket
make ARCH=MACOSXX86_64
sudo make install
```
End with an example of getting some data out of the system or using it for a little demo
@@ -66,6 +76,50 @@ fpocket should state when it's beginning to search pocket and also when it's end
## User Manual
For now the user manual (still the one from fpocket 2.0) can be found in the doc folder. When I have some time to kill (or if somebody else has) we could add that here somewhere.
## Frequent issues encountered
### netcdf issues
```
cannot find -lnetcdf
```
mdpocket supports reading and writing NETCDF formatted files. In order to use this you need to install the netcdf development libraries on your system.
In centos this can be achieved like this :
```
yum install -y epel-release #if the epel repo is not yet activated on your system
yum install -y netcdf-devel
```
Run make again after installing this library. Mdpocket should build just fine now.
### stdc++ issues
```
cannot find -lstdc++
```
You need to install the stc++ static libraries to build fpocket & mdpocket. On centos 7.4 this can be done like this :
```
yum install -y libstc++-static
```
### linking to molfile plugin issues
If you observe an error similar to this one
```
ld: warning: ignoring file plugins/MACOSXX86/molfile/libmolfile_plugin.a, file was built for archive which is not the architecture being linked (x86_64): plugins/MACOSXX86/molfile/libmolfile_plugin.a
Undefined symbols for architecture x86_64:
"_molfile_parm7plugin_init", referenced from:
_read_topology in topology.o
"_molfile_parm7plugin_register", referenced from:
_read_topology in topology.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/fpocket] Error 1
make: *** [all] Error 2
```
then statically built libmolfile_plugin is not compatible with your machine. First check out that the ARCH variable set in the first line of the Makefile of fpocket actually reflects the architecture you want. For now I'm trying to support linux 64 bit systems and OSX 64 (LINUXAMD64) bit systems built with clang (MACOSXX86). So both should work out of the box. If they do not, you might need to build the molfile plugin for your architecture. All available system architectures for the molfile plugin can be found in the plugins folder tree : [plugins directory](https://github.com/Discngine/fpocket/tree/master/plugins).
Here you can find more information on how to build the molfile plugin on CentOS 7.4:
[compile molfile plugin on centos 7.4 - Discngine blog post](https://www.discngine.com/blog/2019/5/25/building-the-vmd-molfile-plugin-from-source-code)
Once built, copy the architecture folder into the fpocket/plugins directory and make sure to declare this architecture in the ARCH variable in the Makefile. Finally run make again.
If you manage to build for other architectures and it works, I'd be happy to accept PR's with the relevant plugin architectures as I cannot build all of them on my own ;).
## Contributing
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

View File

@@ -2,10 +2,10 @@
# Makefile.
#------------------------------------------------------------
ARCH = LINUXAMD64
export ARCH
PLUGINDIR = plugins
PATH_GSL = /home/user/gsl/
PATH_OBJ = obj/
PATH_SRC = src/
PATH_HEADER = headers/
@@ -22,23 +22,33 @@ TPOCKET = tpocket
DPOCKET = dpocket
MDPOCKET = mdpocket
CHECK = pcheck
MYPROGS = $(PATH_BIN)$(FPOCKET) $(PATH_BIN)$(TPOCKET) $(PATH_BIN)$(DPOCKET) $(PATH_BIN)$(MDPOCKET)
PROGFPOCKET = $(PATH_BIN)$(FPOCKET) $(PATH_BIN)$(TPOCKET) $(PATH_BIN)$(DPOCKET) $(PATH_BIN)$(MDPOCKET)
PROGMDPOCKET = $(PATH_BIN)$(MDPOCKET)
CC = gcc
CCQHULL = gcc
LINKER = gcc
LINKERQHULL = gcc
ifeq ($(CXX),g++)
CC = gcc
CCQHULL = gcc
LINKER = LD_LIBRARY_PATH=$(PLUGINDIR)/$(ARCH)/molfile gcc
LINKERQHULL = gcc
else
CCQHULL = clang
CC = clang
LINKER = LD_LIBRARY_PATH=$(PLUGINDIR)/$(ARCH)/molfile clang
LINKERQHULL = clang
endif
CGSL = -DMD_NOT_USE_GSL -I$(PATH_GSL)include
COS = -DM_OS_LINUX
CDEBUG = -DMNO_MEM_DEBUG
CWARN = -Wall -Wextra -Wwrite-strings -Wstrict-prototypes
CFLAGS = $(CWARN) $(COS) $(CDEBUG) -O2 -g -pg -std=c99 -I$(PLUGINDIR)/include -I$(PLUGINDIR)/$(ARCH)/molfile #$(CGSL)
CFLAGS = $(CWARN) $(COS) $(CDEBUG) -O2 -g -pg -std=c99 -I$(PLUGINDIR)/include -I$(PLUGINDIR)/$(ARCH)/molfile
QCFLAGS = -O -g -pg -ansi
LGSL = -L$(PATH_GSL)lib -lgsl -lgslcblas
LFLAGS = -lm -L$(PLUGINDIR)/$(ARCH)/molfile $(PLUGINDIR)/$(ARCH)/molfile/libmolfile_plugin.a -lnetcdf -lstdc++
LFLAGS = -lm -L$(PLUGINDIR)/$(ARCH)/molfile $(PLUGINDIR)/$(ARCH)/molfile/libmolfile_plugin.a -lstdc++
NETCDFFLAGS = -lnetcdf
#
#------------------------------------------------------------
# BINARIES OBJECTS
@@ -46,7 +56,7 @@ LFLAGS = -lm -L$(PLUGINDIR)/$(ARCH)/molfile $(PLUGINDIR)/$(ARCH)/molfile/lib
#QOBJS = $(PATH_QHULL)/src/qvoronoi/qvoronoi.o $(PATH_QHULL)/src/qconvex/qconvex.o
QOBJS = $(PATH_QHULL)/libqhull/geom2.o $(PATH_QHULL)/libqhull/geom.o $(PATH_QHULL)/libqhull/global.o \
$(PATH_QHULL)/libqhull/io.o $(PATH_QHULL)/libqhull/io.h $(PATH_QHULL)/libqhull/libqhull.o \
$(PATH_QHULL)/libqhull/io.o $(PATH_QHULL)/libqhull/libqhull.o \
$(PATH_QHULL)/libqhull/mem.o $(PATH_QHULL)/libqhull/merge.o $(PATH_QHULL)/libqhull/poly2.o \
$(PATH_QHULL)/libqhull/poly.o $(PATH_QHULL)/libqhull/qset.o \
$(PATH_QHULL)/libqhull/random.o $(PATH_QHULL)/libqhull/rboxlib.o \
@@ -54,6 +64,16 @@ QOBJS = $(PATH_QHULL)/libqhull/geom2.o $(PATH_QHULL)/libqhull/geom.o $(PATH_QHUL
$(PATH_QHULL)/libqhull/usermem.o \
$(PATH_QHULL)/libqhull/userprintf.o $(PATH_QHULL)/libqhull/userprintf_rbox.o $(PATH_QHULL)/qvoronoi/qvoronoi.o $(PATH_QHULL)/qconvex/qconvex.o
# QOBJS = $(PATH_QHULL)/libqhull/geom2.o $(PATH_QHULL)/libqhull/geom.o $(PATH_QHULL)/libqhull/global.o \
# $(PATH_QHULL)/libqhull/io.o $(PATH_QHULL)/libqhull/io.h $(PATH_QHULL)/libqhull/libqhull.o \
# $(PATH_QHULL)/libqhull/mem.o $(PATH_QHULL)/libqhull/merge.o $(PATH_QHULL)/libqhull/poly2.o \
# $(PATH_QHULL)/libqhull/poly.o $(PATH_QHULL)/libqhull/qset.o \
# $(PATH_QHULL)/libqhull/random.o $(PATH_QHULL)/libqhull/rboxlib.o \
# $(PATH_QHULL)/libqhull/stat.o $(PATH_QHULL)/libqhull/user.o \
# $(PATH_QHULL)/libqhull/usermem.o \
# $(PATH_QHULL)/libqhull/userprintf.o $(PATH_QHULL)/libqhull/userprintf_rbox.o $(PATH_QHULL)/qvoronoi/qvoronoi.o $(PATH_QHULL)/qconvex/qconvex.o
CHOBJ = $(PATH_OBJ)check.o $(PATH_OBJ)psorting.o $(PATH_OBJ)pscoring.o \
$(PATH_OBJ)utils.o $(PATH_OBJ)pertable.o $(PATH_OBJ)memhandler.o \
$(PATH_OBJ)voronoi.o $(PATH_OBJ)sort.o $(PATH_OBJ)calc.o \
@@ -131,7 +151,10 @@ $(PATH_OBJ)%.o: $(PATH_SRC)%.cpp
all:
make qhull
make fpocket
fpocket: $(MYPROGS) # $(PATH_BIN)$(CHECK)
make mdpocket
fpocket: qhull $(PROGFPOCKET) # $(PATH_BIN)$(CHECK)
mdpocket: qhull $(PROGMDPOCKET)
qhull:
cd src/qhull/ && make
@@ -149,7 +172,7 @@ $(PATH_BIN)$(DPOCKET): $(DPOBJ) $(QOBJS)
$(LINKER) $^ -o $@ $(LFLAGS)
$(PATH_BIN)$(MDPOCKET): $(MDPOBJ) $(QOBJS)
$(LINKER) $^ -o $@ $(LFLAGS)
$(LINKER) $^ -o $@ $(LFLAGS) $(NETCDFFLAGS)
install:
mkdir -p $(BINDIR)
@@ -173,7 +196,7 @@ clean:
rm -f $(PATH_BIN)$(TPOCKET)
rm -f $(PATH_BIN)$(DPOCKET)
rm -f $(PATH_BIN)$(MDPOCKET)
cd src/qhull && make clean
cd src/qhull && make clean && rm lib/libqhull*.a
uninstall:
rm -f $(PATH_BIN)$(FPOCKET) $(BINDIR)$(FPOCKET)

View File

@@ -1 +0,0 @@
snapshot pock_volume pock_asa pock_pol_asa pock_apol_asa pock_asa22 pock_pol_asa22 pock_apol_asa22 nb_AS mean_as_ray mean_as_solv_acc apol_as_prop mean_loc_hyd_dens hydrophobicity_score volume_score polarity_score charge_score prop_polar_atm as_density as_max_dst ALA ARG ASN ASP CYS GLN GLU GLY HIS ILE LEU LYS MET PHE PRO SER THR TRP TYR VAL

View File

Binary file not shown.

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/avsplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/babelplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/bgfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/binposplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/biomoccaplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/brixplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/carplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/ccp4plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/corplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/cpmdplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/crdplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/cubeplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/dcdplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/dlpolyplugin.so Normal file → Executable file

Binary file not shown.

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/dsn6plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/dtrplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/dxplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/edmplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/fs4plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/gamessplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/graspplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/grdplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/gridplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/gromacsplugin.so Normal file → Executable file

Binary file not shown.

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/lammpsplugin.so Normal file → Executable file

Binary file not shown.

View File

@@ -51,11 +51,6 @@ extern int molfile_cubeplugin_fini(void);
extern int molfile_dcdplugin_init(void);
extern int molfile_dcdplugin_register(void *, vmdplugin_register_cb);
extern int molfile_dcdplugin_fini(void);
extern int molfile_netcdfplugin_init(void);
extern int molfile_netcdfplugin_register(void *, vmdplugin_register_cb);
extern int molfile_netcdfplugin_fini(void);
extern int molfile_dlpolyplugin_init(void);
extern int molfile_dlpolyplugin_register(void *, vmdplugin_register_cb);
extern int molfile_dlpolyplugin_fini(void);
@@ -206,6 +201,15 @@ extern int molfile_dtrplugin_fini(void);
extern int molfile_maeffplugin_init(void);
extern int molfile_maeffplugin_register(void *, vmdplugin_register_cb);
extern int molfile_maeffplugin_fini(void);
extern int molfile_vtfplugin_init(void);
extern int molfile_vtfplugin_register(void *, vmdplugin_register_cb);
extern int molfile_vtfplugin_fini(void);
extern int molfile_webpdbplugin_init(void);
extern int molfile_webpdbplugin_register(void *, vmdplugin_register_cb);
extern int molfile_webpdbplugin_fini(void);
extern int molfile_netcdfplugin_init(void);
extern int molfile_netcdfplugin_register(void *, vmdplugin_register_cb);
extern int molfile_netcdfplugin_fini(void);
#define MOLFILE_INIT_ALL \
molfile_abinitplugin_init(); \
@@ -223,7 +227,6 @@ extern int molfile_maeffplugin_fini(void);
molfile_crdplugin_init(); \
molfile_cubeplugin_init(); \
molfile_dcdplugin_init(); \
molfile_netcdfplugin_init(); \
molfile_dlpolyplugin_init(); \
molfile_dsn6plugin_init(); \
molfile_dxplugin_init(); \
@@ -274,6 +277,9 @@ extern int molfile_maeffplugin_fini(void);
molfile_xyzplugin_init(); \
molfile_dtrplugin_init(); \
molfile_maeffplugin_init(); \
molfile_vtfplugin_init(); \
molfile_webpdbplugin_init(); \
molfile_netcdfplugin_init(); \
#define MOLFILE_REGISTER_ALL(v, cb) \
molfile_abinitplugin_register(v, cb); \
@@ -291,7 +297,6 @@ extern int molfile_maeffplugin_fini(void);
molfile_crdplugin_register(v, cb); \
molfile_cubeplugin_register(v, cb); \
molfile_dcdplugin_register(v, cb); \
molfile_netcdfplugin_register(v, cb); \
molfile_dlpolyplugin_register(v, cb); \
molfile_dsn6plugin_register(v, cb); \
molfile_dxplugin_register(v, cb); \
@@ -342,6 +347,9 @@ extern int molfile_maeffplugin_fini(void);
molfile_xyzplugin_register(v, cb); \
molfile_dtrplugin_register(v, cb); \
molfile_maeffplugin_register(v, cb); \
molfile_vtfplugin_register(v, cb); \
molfile_webpdbplugin_register(v, cb); \
molfile_netcdfplugin_register(v, cb); \
#define MOLFILE_FINI_ALL \
molfile_abinitplugin_fini(); \
@@ -359,7 +367,6 @@ extern int molfile_maeffplugin_fini(void);
molfile_crdplugin_fini(); \
molfile_cubeplugin_fini(); \
molfile_dcdplugin_fini(); \
molfile_netcdfplugin_fini(); \
molfile_dlpolyplugin_fini(); \
molfile_dsn6plugin_fini(); \
molfile_dxplugin_fini(); \
@@ -410,6 +417,9 @@ extern int molfile_maeffplugin_fini(void);
molfile_xyzplugin_fini(); \
molfile_dtrplugin_fini(); \
molfile_maeffplugin_fini(); \
molfile_vtfplugin_fini(); \
molfile_webpdbplugin_fini(); \
molfile_netcdfplugin_fini(); \
#ifdef __cplusplus
}

Binary file not shown.

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/mapplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/mdfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/mol2plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/moldenplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/msmsplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/namdbinplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/netcdfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/parm7plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/parmplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/pbeqplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/pdbplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/phiplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/pltplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/pqrplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/psfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/raster3dplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/rst7plugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/situsplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/spiderplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/stlplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/tinkerplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/uhbdplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vaspchgcarplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vaspoutcarplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vaspposcarplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vaspxdatcarplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vaspxmlplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/vtfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/webpdbplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/xbgfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/xsfplugin.so Normal file → Executable file

Binary file not shown.

BIN
plugins/LINUXAMD64/molfile/xyzplugin.so Normal file → Executable file

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -9,4 +9,4 @@
# full path name of this file's directory.
package ifneeded psfcheck 0 [list load [file join $dir psfcheck.so]]
package ifneeded autopsf 1.2 "source [list [file join $dir autopsf.tcl]] ; set env(AUTOPSFDIR) [list $dir]"
package ifneeded autopsf 1.6 "source [list [file join $dir autopsf.tcl]] ; set env(AUTOPSFDIR) [list $dir]"

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,575 @@
#
# $Id: bossconvert.tcl,v 1.2 2013/04/15 15:34:24 johns Exp $
#
package provide bossconvert 1.0
package require exectool
namespace eval ::BOSSconvert:: {
variable boss "BOSS"
variable autozmat "autozmat"
variable BOSSdirdefined 0
variable haveBOSS 0
variable haveTopology 0
variable selection
variable ZmatrixFile ""
variable BOSSspcalcFile ""
variable TopologyExec ""
variable TopologyDir ""
proc BOSScite {} {
puts "Running BOSS. Please cite: Jorgensen and Tirado-Rives, J. Comp. Chem., 26:1689-1700 (2005).\n"
}
proc Topologycite {} {
puts "\nRunning Topology converter, courtesy of Markus K. Dalghren and Peter T. Dalghren\n"
}
proc checkforboss { } {
foreach key [array names ::env] {
if { $key == "BOSSdir" && $::env($key) != "" && $::env($key) != " " } {
set ::BOSSconvert::BOSSdirdefined 1
}
}
if { $::BOSSconvert::BOSSdirdefined == 1 } {
set ::BOSSconvert::boss [::ExecTool::find -description "BOSS" -path $::env(BOSSdir) "BOSS" ]
set ::BOSSconvert::autozmat [::ExecTool::find -description "BOSS" -path $::env(BOSSdir) "autozmat" ]
}
if { [file executable $::BOSSconvert::boss] && [file executable $::BOSSconvert::autozmat] } {
set ::BOSSconvert::haveBOSS 1
}
}
proc checkTopology { } {
set topologydirDefined 0
foreach key [array names ::env] {
if { $key == "VMDBOSSCONVERT" && $::env($key) != "" && $::env($key) != " " } {
set topologydirDefined 1
}
}
if { $topologydirDefined == 1 } {
set ::BOSSconvert::TopologyDir "$::env(VMDBOSSCONVERT)"
set ::BOSSconvert::TopologyExec [::ExecTool::find -description "Topology" -path $::BOSSconvert::TopologyExec "Topology" ]
if [catch {eval ::ExecTool::exec {$::BOSSconvert::TopologyExec} } output errMsg] {
error $errMsg
} else {
set ::BOSSconvert::haveTopology 1
}
}
}
proc init { } {
variable haveBOSS
if { [vmdinfo arch ] != "WIN64" && [vmdinfo arch] != "WIN32" } {
::BOSSconvert::checkTopology
::BOSSconvert::checkforboss
}
#if { $haveBOSS == 0 } {
# puts "Could not execute BOSS or autozmat - check BOSS installation and make sure BOSSdir is defined in the environment"
#}
}
init
}
proc ::BOSSconvert::gui {} {
variable w
variable haveBOSS
variable haveTopology
if { $haveTopology != 1 } {
if { [vmdinfo arch ] == "WIN64" || [vmdinfo arch] == "WIN32" } {
set msg "The BOSSconvert is currenlty only available on Linux and OS X systems."
} else {
set msg "The Topology executable could not be found.\nPlease check your installation of VMD."
}
tk_messageBox -message $msg -type ok -title "BOSSconvert Error" -icon error
return
}
if { [winfo exists .bossconvert] } {
wm deiconify .bossconvert
focus .bossconvert
return
}
set w [toplevel .bossconvert]
wm title $w "BOSSconvert"
wm resizable $w 0 0
frame $w.menubar -relief raised -bd 2
menubutton $w.menubar.help -text "Help" -underline 0 -menu $w.menubar.help.menu
$w.menubar.help config -width 5
menu $w.menubar.help.menu -tearoff no
$w.menubar.help.menu add command -label "Instructions" -command {
tk_messageBox -message "BOSSconvert employs the BOSS software (http://zarbi.chem.yale.edu/software.html) to parameterise molecules using OPLS and convert the paratemers to VMD/NAMD readable topology (.rtf) and parameter (.prm) files.\n\nUse BOX 1 to perform the parameterization using BOSS. Alternatively, use BOX 2 to convert the output of a previous BOSS parameterization.\n"\
-type ok\
-title "BOSSconvert instructions" -icon error }
$w.menubar.help.menu add command -label "More info" -command {
vmd_open_url [string trimright [vmdinfo www] /]/plugins/bossconvert }
pack $w.menubar.help -side right
pack $w.menubar -fill x
# frame $w.infotext
# label $w.infotext.text -text $t -wraplength 7c -bd 3 -justify left
# pack $w.infotext.text -side top
# pack $w.infotext -side left
labelframe $w.box1 -relief ridge -text "BOX 1: OPLS parameterization using BOSS" -bd 2 -padx 2m -pady 2m
if { $haveBOSS != 1 } {
set noBossMsg "It appears that you do not have BOSS installed.\nIf you do, make sure that the BOSSdir\nenvironment variable is defined and restart VMD.\n"
label $w.box1.msg -text $noBossMsg -width 48
grid $w.box1.msg
} else {
label $w.box1.seltext -text " Selection:"
entry $w.box1.sel -textvar sel -width 35
label $w.box1.chargetext -text " Charge:"
radiobutton $w.box1.q0 -text "0" -value "0" -variable charge
radiobutton $w.box1.q1 -text "-1" -value "-1" -variable charge
radiobutton $w.box1.q2 -text "+1" -value "+1" -variable charge
label $w.box1.prefixtext -text " Prefix:"
entry $w.box1.pref -textvar prefix1 -width 35
label $w.box1.moltext -text " Molecule:"
entry $w.box1.mol -textvar mol -width 4
button $w.box1.run -text "Run" -command { ::BOSSconvert::BOX1run $sel $charge $prefix1 $mol } -width 5
button $w.box1.clear -text "Clear" -command { set charge 0; set sel ""; set prefix1 ""; set mol "top"} -width 5
if {$haveBOSS != 1} {
$w.box1.sel configure -state disabled
$w.box1.q0 configure -state disabled
$w.box1.q1 configure -state disabled
$w.box1.q2 configure -state disabled
$w.box1.pref configure -state disabled
$w.box1.run configure -state disabled
$w.box1.clear configure -state disabled
$w.box1.mol configure -state disabled
}
grid $w.box1.seltext -row 0 -column 0
grid $w.box1.sel -row 0 -column 1 -columnspan 3
grid $w.box1.chargetext -row 1 -column 0
grid $w.box1.q0 -row 1 -column 1
grid $w.box1.q1 -row 1 -column 2
grid $w.box1.q2 -row 1 -column 3
grid $w.box1.prefixtext -row 2 -column 0
grid $w.box1.pref -row 2 -column 1 -columnspan 3
grid $w.box1.moltext -row 3 -column 0
grid $w.box1.mol -row 3 -column 1 -sticky ew
grid $w.box1.run -row 3 -column 2
grid $w.box1.clear -row 3 -column 3
$w.box1.q0 select
while { [$w.box1.mol get] != "" } {
$w.box1.mol delete 0
}
set a [$w.box1.mol insert 0 "top"]
# pack $w.box1 -fill x -padx 2 -pady 2 -side right
}
labelframe $w.box2 -relief ridge -text "BOX 2: Convert BOSS output" -bd 2 -padx 1m -pady 1m
label $w.box2.zmatfiletext -text "BOSS Z-matrix:"
entry $w.box2.zmatfile -textvar zmatfile
button $w.box2.zmatfilebrowse -text "Browse" -command {set zmatfile [tk_getOpenFile -title "Select BOSS Z-Matrix file"]}
label $w.box2.bossouttext -text " BOSS output:"
entry $w.box2.bossout -textvar bossout
button $w.box2.bossoutbrowse -text "Browse" -command { set bossout [tk_getOpenFile -title "Select BOSS output file"]}
label $w.box2.prefixtext -text " Prefix:"
entry $w.box2.pref -textvar prefix2 -width 35
button $w.box2.run -text "Run" -command { ::BOSSconvert::BOX2run $prefix2 $zmatfile $bossout } -width 5
button $w.box2.clear -text "Clear" -command { set zmatfile ""; set bossout ""; set prefix2 ""} -width 5
grid $w.box2.zmatfiletext -row 0 -column 0
grid $w.box2.zmatfile -row 0 -column 1 -columnspan 2
grid $w.box2.zmatfilebrowse -row 0 -column 3
grid $w.box2.bossouttext -row 1 -column 0
grid $w.box2.bossout -row 1 -column 1 -columnspan 2
grid $w.box2.bossoutbrowse -row 1 -column 3
grid $w.box2.prefixtext -row 2 -column 0
grid $w.box2.pref -row 2 -column 1 -columnspan 3 -sticky nsew
grid $w.box2.run -row 3 -column 2
grid $w.box2.clear -row 3 -column 3
pack $w.box1 $w.box2 -padx 2 -pady 2
}
proc ::BOSSconvert::BOX1run { sel charge prefix mol } {
if { $sel == "" } {
tk_messageBox -message "Enter text for atom selection." -type ok -title "BOSSconvert Error" -icon error
return
}
if { $charge == "" } {
tk_messageBox -message "Select charge (-1,0,+1)." -type ok -title "BOSSconvert Error" -icon error
return
}
if { $prefix == "" } {
tk_messageBox -message "Enter a prefix for output files (prefix.rtf, prefix.prm, prefix.pdb, prefix.psf)." -type ok -title "BOSSconvert Error" -icon error
return
}
if { $prefix == "" } {
tk_messageBox -message "Enter a molecule id." -type ok -title "BOSSconvert Error" -icon error
return
}
set errno [catch { set a [atomselect $mol $sel] } msg]
if { $errno != 0 } {
tk_messageBox -message "atomselect error ($msg): Check selection text and molecule id." -type ok -title "BOSSconvert Error" -icon error
return
} else {
$a delete
}
set d [file dirname $prefix]
if { ![file exists $d] || ![file writable $d] } {
tk_messageBox -message "Invalid prefix, check that $d exists and that you have write access." -type ok -title "BOSSconvert Error" -icon error
return
}
::BOSSconvert::run $sel $charge $prefix $mol
}
proc ::BOSSconvert::BOX2run { prefix zmatfile bossout } {
if { $prefix == "" } {
tk_messageBox -message "Enter a prefix for output files (prefix.rtf, prefix.prm)." -type ok -title "BOSSconvert Error" -icon error
return
}
set d [file dirname $prefix]
if { ![file exists $d] || ![file writable $d] } {
tk_messageBox -message "Invalid prefix, check that $d exists and that you have write access." -type ok -title "BOSSconvert Error" -icon error
return
}
if { ![file exists $zmatfile] } {
tk_messageBox -message "BOSS Z-matrix file $zmatfile not found." -type ok -title "BOSSconvert Error" -icon error
return
}
if { ![file exists $zmatfile] } {
tk_messageBox -message "BOSS output file $bossout not found." -type ok -title "BOSSconvert Error" -icon error
return
}
::BOSSconvert::createPRMTOP $prefix $zmatfile $bossout
}
proc ::BOSSconvert::run { selectiontext charge prefix {mol top}} {
set sel [atomselect $mol $selectiontext]
set createresult [::BOSSconvert::createBossFiles $sel $charge]
if { $createresult != "" } {
$sel delete
return -1
}
set convertresult [::BOSSconvert::createPRMTOP $prefix]
if { $convertresult != "" } {
$sel delete
return -1
}
::BOSSconvert::createPDBPSF $selectiontext $prefix $mol
$sel delete
puts "\n"
puts "Parameters written to $prefix.prm"
puts "Topology written to $prefix.rtf"
puts "PDB file written: $prefix.pdb"
puts "PSF file written: $prefix.psf"
}
proc ::BOSSconvert::createBossFiles { selection charge } {
variable autozmat
variable boss
variable haveBOSS
variable ZmatrixFile
variable BOSSspcalcFile
if { $haveBOSS != 1 } {
puts "BOSS was not located. Install BOSS and make sure \$BOSSdir is correctly defined"
return -1
}
set pdbname "BOSSconvert_tmpfile.pdb"
set integercharge 0
if { [$selection num] == 0 } {
puts "BOSSconvert error: No atoms in selection"
return -1
}
#set c [vecsum [$selection get charge]]
#set intC [expr int($c)]
#if { [expr abs($c-$intC)] < 0.01 } {
# set integercharge 1
#}
#if { $integercharge == 0} {
# puts "BOSSconvert error: Selection has non-integer charge"
# return -1
#}
if { [expr abs($charge)] > 1 } {
puts "BOSSconvert error: Total charge must be -1,0,+1"
return -1
}
set AM1SPcmd "AM1SPcmd"
if { $charge == -1} {
set AM1SPcmd "AM1SP-cmd"
} elseif { $charge == +1} {
set AM1SPcmd "AM1SP+cmd"
}
set AM1SPcmd [file join $::env(BOSSdir) scripts $AM1SPcmd]
set SPMcmd [file join $::env(BOSSdir) scripts SPMcmd]
if { ![file exists $AM1SPcmd] } {
puts "BOSScovert error: did not find $AM1SPcmd"
return -1
}
if { ![file exists $SPMcmd] } {
puts "BOSScovert error: did not find $SPMcmd"
return -1
}
::BOSSconvert::BOSScite
$selection writepdb $pdbname
catch { exec $autozmat -i pdb -z default $pdbname > optzmat } bossexecerror
catch { exec csh $AM1SPcmd } AM1SPcmderror
file delete optzmat
file delete plt.pdb
file rename sum optzmat
catch { exec csh $SPMcmd } SPMcmderror
#file rename sum "BOSSconvert_tmpfile.z"
file delete plt.pdb
file delete optzmat
#file rename out "BOSSconvert_tmpfile.bossout"
file delete $pdbname
set fi [open sum r]
set ZmatrixFile [read $fi]
close $fi
set fi [open out r]
set BOSSspcalcFile [read $fi]
close $fi
file delete sum
file delete out
#puts "$execerror"
}
proc ::BOSSconvert::createPRMTOP { prefix {zmatrixfilename ""} {bossoutputname ""} } {
variable ZmatrixFile
variable BOSSspcalcFile
variable TopologyExec
variable TopologyDir
set prmname BOSSconvert_tmpmol.prm
set rtfname BOSSconvert_tmpmol.rtf
if { $zmatrixfilename == "" && $bossoutputname == "" } {
if { $ZmatrixFile == "" || $BOSSspcalcFile == "" } {
puts "BOSSconvert error: generatePRMTOP must be run after createBossFiles or with zmatrixfilename and bossoutputname parameters"
return -1
}
set fo [open "BOSSconvert_tmpmol.z" w]
puts $fo "$ZmatrixFile"
close $fo
set fo [open "BOSSconvert_tmpmol.bossout" w]
puts $fo "$BOSSspcalcFile"
close $fo
set zmatrixfilename BOSSconvert_tmpmol.z
set bossoutputname BOSSconvert_tmpmol.bossout
} elseif { $zmatrixfilename == "" || $bossoutputname == "" } {
puts "BOSSconvert error: need to specify both zmatrixfilename and bossoutpuname parameters or neither"
return -1
} else {
set sl [string length $zmatrixfilename]
if { [string range $zmatrixfilename [expr $sl-2] [expr $sl-1]] != ".z" } {
puts "BOSSconvert error: zmatrixfilename must end in .z"
return -1
}
set prmname [string range $zmatrixfilename 0 [expr $sl-2]]
set rtfname "${prmname}rtf"
set prmname "${prmname}prm"
}
::BOSSconvert::Topologycite
set Topologycmd $TopologyExec
append Topologycmd " -bossout $bossoutputname"
append Topologycmd " -oplspar [file join $TopologyDir oplsaa.par]"
append Topologycmd " -oplssb [file join $TopologyDir oplsaa.sb]"
append Topologycmd " -imprlist [file join $TopologyDir imprlist]"
append Topologycmd " $zmatrixfilename"
if [catch {eval ::ExecTool::exec $Topologycmd } output err] {
error $err
}
set data [split $output "\n"]
set natoms [lindex [split [lindex $data 0] " "] 0]
set nbonds [lindex [split [lindex $data 1] " "] 0]
set nangles [lindex [split [lindex $data 2] " "] 0]
set ndihedrals [lindex [split [lindex $data 3] " "] 0]
set nimpropers [lindex [split [lindex $data 4] " "] 0]
puts "atoms=$natoms"
puts "bonds=$nbonds"
puts "angles=$nangles"
puts "dihedrals=$ndihedrals"
puts "impropers=$nimpropers"
set fi [open alias r]
set aliasfile [read $fi]
close $fi
set fi [open missingbonds r]
set missingbondsfile [read $fi]
close $fi
file rename -force $rtfname $prefix.rtf
file rename -force $prmname $prefix.prm
puts ""
puts "aliases used for OPLS atom types:"
puts "$aliasfile"
file delete alias
file delete missingbonds
if { $missingbondsfile != "" } {
puts "Missing bonds: "
puts $missingbondsfile
}
if {$zmatrixfilename == "BOSSconvert_tmpmol.z"} {
file delete $zmatrixfilename
}
if {$bossoutputname == "BOSSconvert_tmpmol.bossout"} {
file delete $bossoutputname
}
puts "Topology written to $prefix.rtf"
puts "Parameters written to $prefix.prm"
}
proc ::BOSSconvert::renameAtoms { seltext rtffile {mol top} } {
set sel [atomselect $mol "$seltext"]
set fi [open $rtffile r]
set data [split [read $fi] "\n"]
close $fi
set anames [list]
set atypes [list]
set acharges [list]
foreach line $data {
if { [string first "ATOM" $line] != -1} {
set name [lindex $line 1]
set type [lindex $line 2]
set charge [lindex $line 3]
lappend anames $name
lappend atypes $type
lappend acharges $charge
} elseif { [string first "RESI" $line] != -1 } {
set resname [lindex [split $line " "] 1]
}
}
puts "Types: $atypes"
puts "Charges: $acharges"
$sel set name $anames
$sel set type $atypes
$sel set charge $acharges
$sel delete
}
proc ::BOSSconvert::createPDBPSF { seltext prefix {mol top} } {
variable autozmat
variable boss
variable haveBOSS
variable ZmatrixFile
variable BOSSspcalcFile
if { $haveBOSS != 1 } {
puts "BOSS was not located. Install BOSS and make sure \$BOSSdir is correctly defined"
return -1
}
set rtfname "${prefix}.rtf"
set pdbname "${prefix}.pdb"
set psfname "${prefix}.psf"
set xZPDB [file join $::env(BOSSdir) scripts xZPDB]
if { ![file exists $xZPDB] } {
puts "BOSScovert error: did not find $xZPDB"
return -1
}
set topmol [molinfo top]
if { $ZmatrixFile == "" || ![file exists $rtfname]} {
puts "BOSSconvert error: need to run createBossFiles and createPRMTOP first"
return -1
}
set fo [open "${prefix}.z" w]
puts $fo $ZmatrixFile
close $fo
::BOSSconvert::BOSScite
catch { exec $xZPDB $prefix } bossexecerror
set m [mol new $pdbname]
set a [atomselect $m all]
set segname [lindex [$a get segname] 0]
if { $segname == "" } {
set segname "A"
$a set segname $segname
}
$a writepdb $pdbname
$a delete
mol delete $m
set BOSScontext [psfcontext create]
psfcontext eval $BOSScontext {
resetpsf
topology $rtfname
segment $segname {
pdb $pdbname
first none
last none
auto angles dihedrals
}
coordpdb $pdbname
writepsf $psfname
writepdb $pdbname
}
set m [mol new $psfname]
mol addfile $pdbname waitfor all
file delete "${prefix}.z"
file delete "out"
mol top $topmol
}
proc bossconvert_tk {} {
::BOSSconvert::gui
return $::BOSSconvert::w
}

View File

@@ -0,0 +1,119 @@
C6 160
C61 160
C131 160
C231 160
C232 160
C233 160
C234 160
C235 160
C247 160
C252 160
C267 160
C271 160
C277 160
C280 160
C320 160
C322 160
C334 160
C366 160
C378 160
C465 160
C470 160
C471 160
C772 160
C991 160
C992 160
C145 162
C147 162
C166 162
C199 162
C221 162
C228 162
C260 162
C263 162
C266 162
C302 162
C312 162
C315 162
C317 162
C336 162
C351 162
C362 162
C380 162
C457 162
C460 162
C463 162
C472 162
C488 162
C489 162
C521 162
C522 162
C523 162
C528 162
C532 162
C533 162
C538 162
C539 162
C590 162
C591 162
C592 162
C593 162
C604 162
C603 162
C604 162
C605 162
C606 162
C607 162
C608 162
C609 162
C610 162
C611 162
C612 162
C625 162
C644 162
C647 162
C648 162
C649 162
C650 162
C651 162
C652 162
C684 162
C714 162
C716 162
C718 162
C720 162
C724 162
C727 162
C729 162
C731 162
C735 162
C736 162
C737 162
C738 162
C739 162
C742 162
C752 162
C768 162
C790 162
C916 162
C917 162
C918 162
C983 162
C988 162
N7 161
N130 161
N237 161
N238 161
N239 161
N249 161
N251 161
N265 161
N478 161
N480 161
N787 161
N987 161
N993 161

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,5 +8,4 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
package ifneeded specden 1.0 [list load [file join $dir specden.so]]
package ifneeded irspecgui 1.0 [list source [file join $dir irspecgui.tcl]]
package ifneeded bossconvert 1.0 [list source [file join $dir bossconvert.tcl]]

Binary file not shown.

View File

@@ -5,13 +5,15 @@
#cr All Rights Reserved
#cr
############################################################################
#
# $Id: clustalw.tcl,v 1.7 2013/04/15 15:40:43 johns Exp $
#
# Package for using clustalw on sequences obtained from the seqdata package.
package provide clustalw 1.0
package require seqdata 1.0
package require phylotree 1.0
package provide clustalw 1.1
package require seqdata 1.1
package require phylotree 1.1
namespace eval ::ClustalW:: {
@@ -31,12 +33,15 @@ namespace eval ::ClustalW:: {
# The current CPU architecture.
variable architecture ""
# The level of verbosity, 0=silent, 1=errors, 2=errors+info
variable verbosity 1
# -------------------------------------------------------------------
# This method sets the temp file options used by thr stamp package.
# args: newTempDir - The new temp directory to use.
# newFilePrefix - The prefix to use for temp files.
proc setTempFileOptions {newTempDir newFilePrefix} {
# Import global variables.
variable tempDir
variable filePrefix
@@ -45,24 +50,24 @@ namespace eval ::ClustalW:: {
set filePrefix $newFilePrefix
}
# -------------------------------------------------------------------
# This method sets the temp file options used by thr stamp package.
# args: newTempDir - The new temp directory to use.
# newFilePrefix - The prefix to use for temp files.
proc setArchitecture {newArchitecture} {
# Import global variables.
variable architecture
# Set the temp directory and file prefix.
set architecture $newArchitecture
}
# -------------------------------------------------------------------
# Aligns the passed in sequences.
# arg: sequences - The list of sequence ids that should be aligned.
# return: The list of aligned sequences ids.
proc alignSequences {sequenceIDs} {
# Import global variables.
variable tempDir
variable filePrefix
@@ -97,12 +102,12 @@ namespace eval ::ClustalW:: {
return $newSequenceIDs
}
# -------------------------------------------------------------------
# Aligns the passed in sequences.
# arg: sequences - The list of sequence ids that should be aligned.
# return: The list of aligned sequences ids.
proc alignSequencesToProfile { profile sequences } {
# Import global variables.
variable tempDir
variable filePrefix
@@ -112,21 +117,25 @@ namespace eval ::ClustalW:: {
set alignedFilename "$tempDir/$filePrefix.aligned.fasta"
# Get the sequence ids.
set profileIndices {}
set sequenceIndices {}
array set sequenceMap {}
set profileIndices {}
foreach sequenceID $profile {
lappend profileIndices $sequenceID
set sequenceMap($sequenceID) [::SeqData::getName $sequenceID]
}
set sequenceIndices {}
foreach sequenceID $sequences {
lappend sequenceIndices $sequenceID
set sequenceMap($sequenceID) [::SeqData::getName $sequenceID]
}
# Save the sequences as a fasta file.
::SeqData::Fasta::saveSequences $profile $profileFilename $profileIndices {} 0 1
::SeqData::Fasta::saveSequences $sequences $sequencesFilename $sequenceIndices {} 0 0
::SeqData::Fasta::saveSequences $profile $profileFilename \
$profileIndices {} 0 1
::SeqData::Fasta::saveSequences $sequences $sequencesFilename \
$sequenceIndices {} 0 0 1
# Run clustalw.
set output [run -align -profile1=$profileFilename -profile2=$sequencesFilename -sequences -output=fasta -outfile=$alignedFilename -outorder=input]
@@ -144,9 +153,9 @@ namespace eval ::ClustalW:: {
return $newSequenceIDs
}
# -------------------------------------------------------------------
proc alignProfiles { profile1 profile2 } {
# Import global variables.
variable tempDir
variable filePrefix
@@ -188,12 +197,12 @@ namespace eval ::ClustalW:: {
return $newSequenceIDs
}
# -------------------------------------------------------------------
# Creates a phylogenetic tree of the given sequences.
# arg: sequences - The list of sequence ids from whcih the tree should be created.
# return: A string containing the tree in Newick format.
proc calculatePhylogeneticTree {sequenceIDs {sequenceNames {}}} {
# Import global variables.
variable tempDir
variable filePrefix
@@ -211,9 +220,9 @@ namespace eval ::ClustalW:: {
return [::PhyloTree::Newick::loadTreeFile $treeFilename "CLUSTALW Sequence Tree"]
}
# -------------------------------------------------------------------
proc writeSequenceAlignment {sequenceIDs sequencesFilename indices} {
# Import global variables.
variable tempDir
variable filePrefix
@@ -247,12 +256,13 @@ namespace eval ::ClustalW:: {
::SeqData::deleteSequences $newSequenceIDs
}
# -------------------------------------------------------------------
# Runs the clustal executable. This method should only be called from inside the ClustalW package.
# arg: args - The list of arguments that should be passed to the program.
proc run { args } {
# Import global variables.
global env
variable verbosity
variable architecture
# Get the location of the executable
@@ -273,7 +283,9 @@ namespace eval ::ClustalW:: {
append cmd " $arg"
}
puts "ClustalW Info) Running CLUSTALW with command $cmd"
if {$verbosity >= 2} {
puts "ClustalW Info) Running CLUSTALW with command $cmd"
}
set rc [catch {eval $cmd} out]
@@ -284,5 +296,6 @@ namespace eval ::ClustalW:: {
return $out
}
# -------------------------------------------------------------------
}

View File

@@ -8,5 +8,5 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
package ifneeded clustalw 1.0 "set env(CLUSTALWPLUGINDIR) {$dir}; set env(CLUSTALWDIR) {$dir}; [list source [file join $dir clustalw.tcl]]"
package ifneeded clustalw 1.1 "set env(CLUSTALWPLUGINDIR) {$dir}; set env(CLUSTALWDIR) {$dir}; [list source [file join $dir clustalw.tcl]]"

View File

@@ -1,360 +0,0 @@
# Test procs for libhessTrans.so
# To run in a tcl shell:
# > tclsh
# % load libhessTrans.so
# % source hessTest.tcl
# Then just call the three functions: getWater, getFormiate, & getImidazole
# Make sure libhessTrans.so and libnewmatWrap.so are in your library path.
# You might need to set LD_LIBRARY_PATH to point to the directory that contains them.
# Run a water molecule through the hessian transformation
# Run a water molecule through the hessian transformation
proc getWater {} {
set numCartesians 3
set numBonds 2
set numAngles 1
set numDihedrals 0
set numImpropers 0
set numInternals [expr $numBonds + $numAngles]
puts " Load Cartesians"
set cartesianListW [list -0.095459 0.0 -0.068090 -0.066224 0.0 0.900520 0.829898 0.0 -0.355797]
# Contains cartesians and cartesian Hessian
set cartesianArrayW [new_double [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]]
puts " \$numCartesians = $numCartesians; expr \$numCartesians * 3 = [expr $numCartesians * 3]"
for {set i 0} {$i < [expr $numCartesians * 3]} {incr i} {
set_double $cartesianArrayW $i [lindex $cartesianListW $i]
}
puts " llength \$cartesianListW = [llength $cartesianListW]"
set hessianCartesianList [list 0.515263 0.000000 -0.106281 -0.0492245 0.000000 0.0133860 -0.466038 0.000000 0.0928953 \
0.000000 -0.0000600487 0.000000 0.000000 0.0000300243 0.000000 0.000000 0.0000300243 0.000000 \
-0.106281 0.000000 0.588454 -0.0506252 0.000000 -0.502634 0.156906 0.000000 -0.0858201 \
-0.0492245 0.000000 -0.0506252 0.0494782 0.000000 -0.00126218 -0.000253672 0.000000 0.0518874 \
0.000000 0.0000300243 0.000000 0.000000 -0.0000607375 0.000000 0.000000 0.0000307132 0.000000 \
0.0133860 0.000000 -0.502634 -0.00126218 0.000000 0.516579 -0.0121238 0.000000 -0.0139454 \
-0.466038 0.000000 0.156906 -0.000253672 0.000000 -0.0121238 0.466292 0.000000 -0.144783 \
0.000000 0.0000300243 0.000000 0.000000 0.0000307132 0.000000 0.000000 -0.0000607375 0.000000 \
0.0928953 0.000000 -0.0858201 0.0518874 0.000000 -0.0139454 -0.144783 0.000000 0.0997655]
for {set i 0} {$i < [expr ($numCartesians*3) * ($numCartesians*3)]} {incr i} {
set_double $cartesianArrayW [expr ($numCartesians*3) + $i] [lindex $hessianCartesianList $i]
}
puts " llength \$hessianCartesianList = [llength $hessianCartesianList]"
set intArrayW [new_int [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]]
set j 0
puts " Load Bonds"
set bondListW [list 1 2 1 3]
puts " \$numBonds = $numBonds; expr \$numBonds * 2 = [expr $numBonds * 2]"
for {set i 0} {$i < [expr $numBonds * 2]} {incr i} {
set_int $intArrayW $j [lindex $bondListW $i]
incr j
}
puts " Load Angles"
set angleListW [list 2 1 3]
puts " \$numAngles = $numAngles; expr \$numAngles * 3 = [expr $numAngles * 3]"
for {set i 0} {$i < [expr $numAngles * 3]} {incr i} {
set_int $intArrayW $j [lindex $angleListW $i]
incr j
}
set hessianInternal [new_double [expr $numInternals * $numInternals]]
puts "(\$numCartesians * 3) + ((\$numCartesians*3)*(\$numCartesians*3))= [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]"
check_double $cartesianArrayW [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]
puts "(\$numBonds * 2) + (\$numAngles * 3) = [expr ($numBonds * 2) + ($numAngles * 3)]"
check_int $intArrayW [expr ($numBonds * 2) + ($numAngles * 3)]
puts " getInternalHessian"
set ret [getInternalHessian $cartesianArrayW $intArrayW $hessianInternal $numCartesians $numBonds $numAngles $numDihedrals $numImpropers]
puts $ret
puts "Hessian in internal coordinates:"
for {set i 0} {$i < $numInternals} {incr i} {
for {set j 0} {$j < $numInternals} {incr j} {
set index [expr ($i * $numInternals) + $j]
puts -nonewline [get_double $hessianInternal $index]
puts -nonewline " "
}
puts " "
}
delete_double $cartesianArrayW
delete_int $intArrayW
delete_double $hessianInternal
}
# Run a formiate molecule through the hessian transformation
proc getFormiate {} {
puts "Formiate"
set numCartesians 4
set numBonds 3
set numAngles 3
set numDihedrals 0
set numImpropers 1
set numInternals [expr $numBonds + $numAngles + $numDihedrals + $numImpropers]
puts " Load Cartesians"
set cartesianListW [list -0.094371 0.0 0.048921 0.038377 0.0 1.281795 1.053697 0.0 1.976075 -0.923703 0.0 1.855209]
#set cartesianArrayW [new_double [expr $numCartesians * 3]]
set cartesianArrayW [new_double [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]]
puts " \$numCartesians = $numCartesians; expr \$numCartesians * 3 = [expr $numCartesians * 3]"
for {set i 0} {$i < [expr $numCartesians * 3]} {incr i} {
set_double $cartesianArrayW $i [lindex $cartesianListW $i]
}
puts " llength \$cartesianListW = [llength $cartesianListW]"
set hessianCartesianList [list 0.116369 0.000000 0.0690148 -0.129156 0.000000 -0.0209901 0.00765969 0.000000 -0.0853240 0.00512733 0.000000 0.0372992 \
0.000000 0.0346797 0.000000 0.000000 -0.0963023 0.000000 0.000000 0.0321698 0.000000 0.000000 0.0294529 0.000000 \
0.0690148 0.000000 0.738407 -0.00545521 0.000000 -0.601136 -0.0846844 0.000000 -0.0839934 0.0211248 0.000000 -0.0532776 \
-0.129156 0.000000 -0.00545521 0.823401 0.000000 0.171911 -0.517086 0.000000 -0.236030 -0.177159 0.000000 0.0695739 \
0.000000 -0.0963023 0.000000 0.000000 0.276065 0.000000 0.000000 -0.0922339 0.000000 0.000000 -0.0875292 0.000000 \
-0.0209901 0.000000 -0.601136 0.171911 0.000000 0.963529 -0.220557 0.000000 -0.259140 0.0696361 0.000000 -0.103253 \
0.00765969 0.000000 -0.0846844 -0.517086 0.000000 -0.220557 0.575617 0.000000 0.321754 -0.0661901 0.000000 -0.0165128 \
0.000000 0.0321698 0.000000 0.000000 -0.0922339 0.000000 0.000000 0.0301875 0.000000 0.000000 0.0298766 0.000000 \
-0.0853240 0.000000 -0.0839934 -0.236030 0.000000 -0.259140 0.321754 0.000000 0.326165 -0.000400506 0.000000 0.0169683 \
0.00512733 0.000000 0.0211248 -0.177159 0.000000 0.0696361 -0.0661901 0.000000 -0.000400506 0.238222 0.000000 -0.0903604 \
0.000000 0.0294529 0.000000 0.000000 -0.0875292 0.000000 0.000000 0.0298766 0.000000 0.000000 0.0281997 0.000000 \
0.0372992 0.000000 -0.0532776 0.0695739 0.000000 -0.103253 -0.0165128 0.000000 0.0169683 -0.0903604 0.000000 0.139562]
for {set i 0} {$i < [expr ($numCartesians*3) * ($numCartesians*3)]} {incr i} {
set_double $cartesianArrayW [expr ($numCartesians*3) + $i] [lindex $hessianCartesianList $i]
}
puts " llength \$hessianCartesianList = [llength $hessianCartesianList]"
set intArrayW [new_int [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]]
set j 0
puts " Load Bonds"
set bondListW [list 1 2 2 3 2 4]
puts " \$numBonds = $numBonds; expr \$numBonds * 2 = [expr $numBonds * 2]"
for {set i 0} {$i < [expr $numBonds * 2]} {incr i} {
set_int $intArrayW $j [lindex $bondListW $i]
incr j
}
puts " Load Angles"
set angleListW [list 1 2 3 1 2 4 3 2 4]
puts " \$numAngles = $numAngles; expr \$numAngles * 3 = [expr $numAngles * 3]"
for {set i 0} {$i < [expr $numAngles * 3]} {incr i} {
set_int $intArrayW $j [lindex $angleListW $i]
incr j
}
puts " Load Dihedrals"
set dihedralListW [list ]
puts " \$numDihedrals = $numDihedrals; expr \$numDihedrals * 4 = [expr $numDihedrals * 4]"
for {set i 0} {$i < [expr $numDihedrals * 4]} {incr i} {
set_int $intArrayW $j [lindex $dihedralListW $i]
incr j
}
puts " Load Impropers"
set improperListW [list 3 1 4 2]
puts " \$numImpropers = $numImpropers; expr \$numImpropers * 4 = [expr $numImpropers * 4]"
for {set i 0} {$i < [expr $numImpropers * 4]} {incr i} {
set_int $intArrayW $j [lindex $improperListW $i]
incr j
}
set hessianInternal [new_double [expr $numInternals * $numInternals]]
for {set i 0} {$i < [expr $numInternals * $numInternals]} {incr i} {
set_double $hessianInternal $i 0
}
puts "(\$numCartesians * 3) + ((\$numCartesians*3)*(\$numCartesians*3)) = [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]"
check_double $cartesianArrayW [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]
puts "(\$numBonds * 2) + (\$numAngles * 3) + (\$numDihedrals * 4) + (\$numImpropers * 4) = [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]"
check_int $intArrayW [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]
puts " getInternalHessian"
set ret [getInternalHessian $cartesianArrayW $intArrayW $hessianInternal $numCartesians $numBonds $numAngles $numDihedrals $numImpropers]
puts $ret
puts "Hessian in internal coordinates:"
for {set i 0} {$i < $numInternals} {incr i} {
for {set j 0} {$j < $numInternals} {incr j} {
set index [expr ($i * $numInternals) + $j]
puts -nonewline [get_double $hessianInternal $index]
puts -nonewline " "
}
puts " "
}
delete_double $cartesianArrayW
delete_int $intArrayW
delete_double $hessianInternal
}
# Run an imidazole molecule through the hessian transformation
proc getImidazole {} {
puts "Imidazole"
set numCartesians 9
set numBonds 8
set numAngles 9
set numDihedrals 8
set numImpropers 0
set numInternals [expr $numBonds + $numAngles + $numDihedrals + $numImpropers]
puts " Load Cartesians"
set cartesianListW [list -0.002165 0.015029 -0.008626 0.016991 0.010965 1.371235 1.311097 0.026977 1.850226 2.069098 0.017004 0.769608 1.324627 0.015961 -0.380462 -0.819240 0.004005 2.054659 3.149084 0.019064 0.764514 1.677245 0.015944 -1.326908 -0.804737 0.005051 -0.731246]
#set cartesianArrayW [new_double [expr $numCartesians * 3]]
set cartesianArrayW [new_double [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]]
puts " \$numCartesians = $numCartesians; expr \$numCartesians * 3 = [expr $numCartesians * 3]"
for {set i 0} {$i < [expr $numCartesians * 3]} {incr i} {
set_double $cartesianArrayW $i [lindex $cartesianListW $i]
}
puts " llength \$cartesianListW = [llength $cartesianListW]"
set hessianCartesianList [list 0.702368 0.00272371 0.158802 -0.0993604 -0.000127214 -0.00118501 -0.0208712 -0.000173209 -0.0148905 -0.0845374 -0.000425404 -0.0540718 -0.288084 -0.000913563 0.0498786 0.00713302 0.0000509624 0.0220713 0.00116782 -0.00000837995 -0.000167505 0.00404145 0.0000756407 -0.00250568 -0.221858 -0.00120254 -0.157931 \
0.00272371 0.105871 0.00161978 -0.000138147 -0.0637503 -0.000430887 -0.000235544 0.0167697 -0.000125522 -0.000393634 0.0155289 -0.000232881 -0.000865532 -0.0490245 0.000131599 0.0000223830 -0.000286432 0.0000708208 -0.0000103319 0.00272262 -0.0000138193 0.0000382482 -0.00770645 -0.0000106015 -0.00114115 -0.0201248 -0.00100848 \
0.158802 0.00161978 0.773297 0.0151902 -0.000363827 -0.386924 -0.0868052 -0.000390768 -0.0323668 -0.00475487 -0.0000678163 -0.0157507 0.0421028 0.000140865 -0.126944 -0.00355068 -0.00000604433 -0.00636402 -0.00214266 -0.00000962319 -0.00619313 0.0287691 0.0000767058 0.00259669 -0.147610 -0.000999268 -0.201350 \
-0.0993604 -0.000138147 0.0151902 0.698207 0.00183503 -0.169203 -0.246120 -0.000732202 -0.0525225 -0.0956775 -0.000321769 0.0620396 -0.0267033 -0.000174463 0.0142645 -0.229682 -0.000441687 0.150015 0.000164060 -0.0000283378 0.00355703 -0.00854572 -0.0000222412 -0.00223107 0.00771850 0.0000238146 -0.0211106 \
-0.000127214 -0.0637503 -0.000363827 0.00183503 0.131418 0.000267434 -0.000741181 -0.0694259 -0.000278100 -0.000400718 0.0106126 0.000241842 -0.0000803128 0.0120875 -0.0000455539 -0.000466835 -0.0288112 0.000275455 -0.0000235809 0.00683895 0.000000 -0.0000377326 0.00249756 -0.00000473040 0.0000425430 -0.00146736 -0.0000925065 \
-0.00118501 -0.000430887 -0.386924 -0.169203 0.000267434 0.753312 -0.0624481 -0.000318566 -0.124766 0.00455546 0.0000379250 0.00893127 0.0739957 0.000157496 -0.0620183 0.146905 0.000234542 -0.184712 0.00301253 -0.00000608384 -0.00374670 0.00257648 0.0000264335 0.000444931 0.00179027 0.0000317055 -0.000521610 \
-0.0208712 -0.000235544 -0.0868052 -0.246120 -0.000741181 -0.0624481 0.509826 0.00148305 -0.0676021 -0.202925 -0.000358211 0.158075 -0.00614126 0.00000576750 0.0471490 -0.0211648 -0.0000740812 -0.0108164 -0.0121669 0.0000172210 0.0281760 -0.00195747 -0.0000642656 -0.00266761 0.00152032 -0.0000327579 -0.00306053 \
-0.000173209 0.0167697 -0.000390768 -0.000732202 -0.0694259 -0.000318566 0.00148305 0.103075 0.000263646 -0.000353192 -0.0751434 0.000335685 -0.0000817710 0.0211255 0.0000434403 -0.0000372830 -0.00507951 -0.00000990659 -0.0000238758 -0.00526977 0.000124676 -0.0000567633 0.00697417 -0.0000198706 -0.0000247569 0.00697426 -0.0000283354 \
-0.0148905 -0.000125522 -0.0323668 -0.0525225 -0.000278100 -0.124766 -0.0676021 0.000263646 0.559199 0.135421 0.000280532 -0.305964 -0.0143292 -0.000198034 -0.103457 0.0168931 0.0000930307 0.0135602 0.00268921 0.0000121110 0.00426402 -0.00767418 -0.0000492366 -0.00488259 0.00201512 0.00000157376 -0.00558720 \
-0.0845374 -0.000393634 -0.00475487 -0.0956775 -0.000400718 0.00455546 -0.202925 -0.000353192 0.135421 0.913252 0.00309809 -0.0556369 -0.183043 -0.000649743 -0.0975639 -0.00553817 -0.0000472940 -0.00406857 -0.355538 -0.00136353 0.000858327 0.0181297 0.000133003 0.0170857 -0.00412254 -0.0000229788 0.00410373 \
-0.000425404 0.0155289 -0.0000678163 -0.000321769 0.0106126 0.0000379250 -0.000358211 -0.0751434 0.000280532 0.00309809 0.130303 0.000288135 -0.000691704 -0.0560926 -0.000574900 -0.0000411404 0.00515123 -0.0000244549 -0.00136515 -0.0239914 -0.0000283424 0.000131111 -0.00902644 0.0000827270 -0.0000258191 0.00265829 0.00000619507 \
-0.0540718 -0.000232881 -0.0157507 0.0620396 0.000241842 0.00893127 0.158075 0.000335685 -0.305964 -0.0556369 0.000288135 0.619365 -0.0947015 -0.000480145 -0.234291 -0.00247395 -0.0000120311 -0.000311967 -0.00334472 -0.0000306095 -0.0574256 -0.0137391 -0.000101114 -0.0102560 0.00385337 -0.00000888153 -0.00429800 \
-0.288084 -0.000865532 0.0421028 -0.0267033 -0.0000803128 0.0739957 -0.00614126 -0.0000817710 -0.0143292 -0.183043 -0.000691704 -0.0947015 0.651798 0.00241667 -0.116619 0.000782867 -0.0000289331 -0.000379196 -0.00935909 -0.0000665274 -0.0316164 -0.122242 -0.000602487 0.127318 -0.0170084 0.000000 0.0142289 \
-0.000913563 -0.0490245 0.000140865 -0.000174463 0.0120875 0.000157496 0.00000576750 0.0211255 -0.000198034 -0.000649743 -0.0560926 -0.000480145 0.00241667 0.0772575 -0.000253408 -0.0000160104 0.00519791 -0.0000119089 -0.0000256958 -0.00242861 -0.000120912 -0.000557486 -0.00354364 0.000678051 -0.0000854755 -0.00457896 0.0000879956 \
0.0498786 0.000131599 -0.126944 0.0142645 -0.0000455539 -0.0620183 0.0471490 0.0000434403 -0.103457 -0.0975639 -0.000574900 -0.234291 -0.116619 -0.000253408 0.925576 -0.00241786 -0.0000239609 -0.00579351 0.00174851 0.00000940976 0.00386271 0.125889 0.000767374 -0.410999 -0.0223289 -0.0000539998 0.0140644 \
0.00713302 0.0000223830 -0.00355068 -0.229682 -0.000466835 0.146905 -0.0211648 -0.0000372830 0.0168931 -0.00553817 -0.0000411404 -0.00247395 0.000782867 -0.0000160104 -0.00241786 0.248452 0.000539358 -0.157277 -0.000410578 -0.00000402365 0.00124209 0.000690037 -0.00000355972 0.0000157561 -0.000261966 0.00000711144 0.000662899 \
0.0000509624 -0.000286432 -0.00000604433 -0.000441687 -0.0288112 0.000234542 -0.0000740812 -0.00507951 0.0000930307 -0.0000472940 0.00515123 -0.0000120311 -0.0000289331 0.00519791 -0.0000239609 0.000539358 0.0229559 -0.000298983 -0.00000639852 0.00110550 0.00000427630 0.000000 0.00193399 0.00000175242 0.00000780851 -0.00216735 0.00000741878 \
0.0220713 0.0000708208 -0.00636402 0.150015 0.000275455 -0.184712 -0.0108164 -0.00000990659 0.0135602 -0.00406857 -0.0000244549 -0.000311967 -0.000379196 -0.0000119089 -0.00579351 -0.157277 -0.000298983 0.182590 -0.000343632 -0.00000276545 0.000805630 0.00128481 0.000000 0.000377758 -0.000487016 0.00000193774 -0.000152684 \
0.00116782 -0.0000103319 -0.00214266 0.000164060 -0.0000235809 0.00301253 -0.0121669 -0.0000238758 0.00268921 -0.355538 -0.00136515 -0.00334472 -0.00935909 -0.0000256958 0.00174851 -0.000410578 -0.00000639852 -0.000343632 0.376866 0.00145992 -0.00125092 -0.000537423 0.00000242050 -0.000615669 -0.000185567 -0.00000730430 0.000247348 \
-0.00000837995 0.00272262 -0.00000962319 -0.0000283378 0.00683895 -0.00000608384 0.0000172210 -0.00526977 0.0000121110 -0.00136353 -0.0239914 -0.0000306095 -0.0000665274 -0.00242861 0.00000940976 -0.00000402365 0.00110550 -0.00000276545 0.00145992 0.0203176 0.0000355368 0.00000227317 -0.00114240 -0.00000521806 -0.00000861260 0.00184745 -0.00000275756 \
-0.000167505 -0.0000138193 -0.00619313 0.00355703 0.000000 -0.00374670 0.0281760 0.000124676 0.00426402 0.000858327 -0.0000283424 -0.0574256 -0.0316164 -0.000120912 0.00386271 0.00124209 0.00000427630 0.000805630 -0.00125092 0.0000355368 0.0573028 0.000374206 0.00000272487 0.000200901 -0.00117280 -0.00000412571 0.000929370 \
0.00404145 0.0000382482 0.0287691 -0.00854572 -0.0000377326 0.00257648 -0.00195747 -0.0000567633 -0.00767418 0.0181297 0.000131111 -0.0137391 -0.122242 -0.000557486 0.125889 0.000690037 0.000000 0.00128481 -0.000537423 0.00000227317 0.000374206 0.110256 0.000475876 -0.136579 0.000166005 0.00000420809 -0.000901116 \
0.0000756407 -0.00770645 0.0000767058 -0.0000222412 0.00249756 0.0000264335 -0.0000642656 0.00697417 -0.0000492366 0.000133003 -0.00902644 -0.000101114 -0.000602487 -0.00354364 0.000767374 -0.00000355972 0.00193399 0.000000 0.00000242050 -0.00114240 0.00000272487 0.000475876 0.0110623 -0.000721403 0.00000561285 -0.00104904 -0.00000129053 \
-0.00250568 -0.0000106015 0.00259669 -0.00223107 -0.00000473040 0.000444931 -0.00266761 -0.0000198706 -0.00488259 0.0170857 0.0000827270 -0.0102560 0.127318 0.000678051 -0.410999 0.0000157561 0.00000175242 0.000377758 -0.000615669 -0.00000521806 0.000200901 -0.136579 -0.000721403 0.422454 0.000179810 0.000000 0.0000642058 \
-0.221858 -0.00114115 -0.147610 0.00771850 0.0000425430 0.00179027 0.00152032 -0.0000247569 0.00201512 -0.00412254 -0.0000258191 0.00385337 -0.0170084 -0.0000854755 -0.0223289 -0.000261966 0.00000780851 -0.000487016 -0.000185567 -0.00000861260 -0.00117280 0.000166005 0.00000561285 0.000179810 0.234032 0.00122985 0.163761 \
-0.00120254 -0.0201248 -0.000999268 0.0000238146 -0.00146736 0.0000317055 -0.0000327579 0.00697426 0.00000157376 -0.0000229788 0.00265829 -0.00000888153 0.000000 -0.00457896 -0.0000539998 0.00000711144 -0.00216735 0.00000193774 -0.00000730430 0.00184745 -0.00000412571 0.00000420809 -0.00104904 0.000000 0.00122985 0.0179075 0.00103177 \
-0.157931 -0.00100848 -0.201350 -0.0211106 -0.0000925065 -0.000521610 -0.00306053 -0.0000283354 -0.00558720 0.00410373 0.00000619507 -0.00429800 0.0142289 0.0000879956 0.0140644 0.000662899 0.00000741878 -0.000152684 0.000247348 -0.00000275756 0.000929370 -0.000901116 -0.00000129053 0.0000642058 0.163761 0.00103177 0.196852]
for {set i 0} {$i < [expr ($numCartesians*3) * ($numCartesians*3)]} {incr i} {
set_double $cartesianArrayW [expr ($numCartesians*3) + $i] [lindex $hessianCartesianList $i]
}
puts " llength \$hessianCartesianList = [llength $hessianCartesianList]"
set intArrayW [new_int [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]]
set j 0
puts " Load Bonds"
set bondListW [list 1 2 1 9 2 3 2 6 3 4 4 5 4 7 5 8]
puts " \$numBonds = $numBonds; expr \$numBonds * 2 = [expr $numBonds * 2]"
for {set i 0} {$i < [expr $numBonds * 2]} {incr i} {
set_int $intArrayW $j [lindex $bondListW $i]
incr j
}
puts " Load Angles"
set angleListW [list 2 1 9 1 2 3 1 2 6 3 2 6 2 3 4 3 4 5 3 4 7 5 4 7 4 5 8]
puts " \$numAngles = $numAngles; expr \$numAngles * 3 = [expr $numAngles * 3]"
for {set i 0} {$i < [expr $numAngles * 3]} {incr i} {
set_int $intArrayW $j [lindex $angleListW $i]
incr j
}
puts " Load Dihedrals"
set dihedralListW [list 9 1 2 3 9 1 2 6 1 2 3 4 6 2 3 4 2 3 4 5 2 3 4 7 3 4 5 8 7 4 5 8]
puts " \$numDihedrals = $numDihedrals; expr \$numDihedrals * 4 = [expr $numDihedrals * 4]"
for {set i 0} {$i < [expr $numDihedrals * 4]} {incr i} {
set_int $intArrayW $j [lindex $dihedralListW $i]
incr j
}
puts " Load Impropers"
set improperListW [list ]
puts " \$numImpropers = $numImpropers; expr \$numImpropers * 4 = [expr $numImpropers * 4]"
for {set i 0} {$i < [expr $numImpropers * 4]} {incr i} {
set_int $intArrayW $j [lindex $improperListW $i]
incr j
}
set hessianInternal [new_double [expr $numInternals * $numInternals]]
for {set i 0} {$i < [expr $numInternals * $numInternals]} {incr i} {
set_double $hessianInternal $i 0
}
#puts " Allocate Hessian"
#set hessianArrayW [new_double 3]
#set_double $hessianArrayW 0 0.0
#set_double $hessianArrayW 1 0.0
#set_double $hessianArrayW 2 0.0
puts "(\$numCartesians * 3) + ((\$numCartesians*3)*(\$numCartesians*3)) = [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]"
check_double $cartesianArrayW [expr ($numCartesians * 3) + (($numCartesians*3)*($numCartesians*3))]
puts "(\$numBonds * 2) + (\$numAngles * 3) + (\$numDihedrals * 4) + (\$numImpropers * 4) = [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]"
check_int $intArrayW [expr ($numBonds * 2) + ($numAngles * 3) + ($numDihedrals * 4) + ($numImpropers * 4)]
puts " getInternalHessian"
set ret [getInternalHessian $cartesianArrayW $intArrayW $hessianInternal $numCartesians $numBonds $numAngles $numDihedrals $numImpropers]
puts $ret
puts "Hessian in internal coordinates:"
for {set i 0} {$i < $numInternals} {incr i} {
for {set j 0} {$j < $numInternals} {incr j} {
set index [expr ($i * $numInternals) + $j]
puts -nonewline [get_double $hessianInternal $index]
puts -nonewline " "
}
puts " "
}
delete_double $cartesianArrayW
delete_int $intArrayW
delete_double $hessianInternal
}
proc getNone {} {
set numCartesians 0
set numBonds 0
set numAngles 0
set numDihedrals 0
set numImpropers 0
puts " Load Cartesians"
set cartesianArrayW [new_double 0]
puts " Load Bonds"
set bondArrayW [new_int 0]
puts " Load Angles"
set angleArrayW [new_int 0]
puts " Load Dihedrals"
set dihedralArrayW [new_int 0]
puts " Load Impropers"
set improperArrayW [new_int 0]
puts "\$numCartesians = $numCartesians"
check_double $cartesianArrayW [expr $numCartesians * 3]
puts "\$numBonds = $numBonds"
check_int $bondArrayW [expr $numBonds * 2]
puts "\$numAngles = $numAngles"
check_int $angleArrayW [expr $numAngles * 3]
puts "\$numDihedrals = $numDihedrals"
check_int $dihedralArrayW [expr $numDihedrals * 4]
puts "\$numImpropers = $numImpropers"
check_int $improperArrayW [expr $numImpropers * 4]
#puts " getInternalHessian"
#set ret [getInternalHessian $cartesianArrayW $intArrayW $hessianInternal $numCartesians $numBonds $numAngles $numDihedrals $numImpropers]
#puts $ret
}

Some files were not shown because too many files have changed in this diff Show More