OSDN Git Service

Importing frcmod is improved. Import AMBER Lib (in MM/MD->Tools menu) is implemented...
[molby/Molby.git] / README
1 ========================================================
2
3                      Molby
4
5     An Interactive Molecular Modeling Software
6         with Integrated Ruby Interpreter
7   
8           Version 0.5.5 build 20110721
9
10                   Toshi Nagata
11
12 ========================================================
13
14 1. What is it?
15
16 Molby is an application to visualize and build molecular models interactively through 3D display. It provides the following capability:
17
18 - Viewing molecular models in either ball-and-stick or "line" display.
19 - Interactive modification of molecular models by mouse operation.
20 - Viewing and editing atomic coordinates and other parameters in numeric tables.
21 - Importing and exporting structure/coordinate data for other program packages such as Gaussian, GAMESS, NAMD and SHELX.
22 - Embedded Ruby interpreter for automated processing of molecular models.
23
24 2. Supported Platforms
25
26 Molby runs on Mac OS X (10.4 and later) and Microsoft Windows (XP and later). Executable binaries are provided for both platforms (Molby.dmg for Mac, SetupMolby.exe for Windows).
27
28 3. Copyright and License
29
30 Molby is a copyrighted product of Toshi Nagata.
31
32        Copyright (C) 2009-2010 Toshi Nagata
33
34 Molby includes (more technically: is statically linked to) the following softwares, which are copyrighted products as described below:
35
36 - wxWidgets 2.8.9: Copyright (C) 1992-2008 Julian Smart, Robert Roebling, Vadim Zeitlin and other members of the wxWidgets team. Portions (c) 1996 Artificial Intelligence Applications Institute
37 - Ruby 1.8.7: Copyright (C) 1993-2009 Yukihiro Matsumoto
38 - CLAPACK: Copyright (c) 1992-2008 The University of Tennessee.
39 - AmberTools 1.3: Copyright (c) Junmei Wang, Ross C. Walker, Michael F. Crowley, Scott Brozell and David A. Case
40
41 Molby is distributed under the GNU General Public License (version 2). See the file COPYING for more details.
42
43 4. How to Use
44
45 The document in HTML format is available. Try the tutorial to get familiar with Molby.
46
47 5. How to Build
48
49 The information in this section is only for those who want to build Molby from the source. If you use the binary distribution, you do not need to read this section.
50
51 Building Molby is somewhat complicated because you need static libraries of wxWidgets and Ruby (and CLAPACK in Windows). The procedures are described below for each platform.
52
53 (1) Mac OS X
54
55 (i) Xcode, gfortran
56
57 Install Xcode, if you have not done so yet. The Xcode project included in the source distribution is for Xcode 3.0 and later, thus you need Mac OS 10.5. It may work with Xcode 2.5 on Mac OS 10.4, but this have not been tested.
58
59 To build AmberTools, you need to have gfortran installed. The author uses a binary build available at the "R for Mac OS X" website (http://r.research.att.com/tools/).
60
61 (ii) wxWidgets
62
63 Get wxMac-2.8.9.tar.gz from the wxWidgets page in sourceforge.net (http://sourceforge.net/projects/wxwindows/files/). Newer versions may work, but they are not tested.
64
65 Unpack wxMac-2.8.9.tar.gz. Move the resulting directory wxMac-2.8.9 to $HOME/Development, and rename it to wxMac (or make a symbolic link). The console commands will be as follows:
66 $ mkdir -p $HOME/Development
67 $ cd $HOME/Development
68 $ mv somewhere/wxMac-2.8.9.tar.gz ./
69 $ tar xvzf wxMac-2.8.9.tar.gz
70 $ ln -s wxMac-2.8.9 wxMac
71
72 If you want to place wxMac in another place (and/or another name) than $HOME/Development, you will need to change the build settings in Xcode.
73
74 Build wxMac. The commands will be as follows. Take care of the configure options.
75 $ cd $HOME/Development/wxMac
76 $ mkdir osx-build
77 $ cd osx-build
78 $ ../configure --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4 --enable-universal_binary --disable-shared --with-opengl --enable-unicode --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
79 $ make
80 (You do not need to do "sudo make install".)
81
82 (iii) Ruby
83
84 Get ruby-1.8.7-p160.tar.gz from the Molby source distribution site. Unpack it, and move the resulting directory ruby-1.8.7-p160 to $HOME/Development. Rename it to ruby-1.8.7-static (or make a symbolic link).
85 $ cd $HOME/Development
86 $ mv somewhere/ruby-1.8.7-p160.tar.gz ./
87 $ tar xvzf ruby-1.8.7-p160.tar.gz
88 $ ln -s ruby-1.8.7-p160 ruby-1.8.7-static
89
90 If you want to place ruby-1.8.7-static in another place (and/or another name) than $HOME/Development, you will need to change the build settings in Xcode.
91
92 Patch the Ruby source.
93 $ cd $HOME/Development/ruby-1.8.7-static
94 $ patch --backup -p1 < $MOLBY/ruby-1.8.7-p160-tn.patch
95 ($MOLBY is the location of the Molby source.)
96
97 Build Ruby with --disable-shared option.
98 $ CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc -O2' ./configure --disable-shared --disable-thread
99 $ make
100
101 (iv) Build on Xcode
102
103 Open xcode-build/Molby.xcodeproj, and build. Note that there are two configurations, Debug and Release. In the "Release" build, the Ruby scripts update_version.rb and Documents/makedoc.rb are executed before compilation; update_version.rb modifies the version strings in the source files (by looking up the file Version), and makedoc.rb creates the HTML docments in the doc directory.
104
105 (2) Windows
106
107 The Windows binary is built by using MinGW/MSYS. If you use VC++ or Cygwin, you need to help yourself. I use Windows only occasionally, so there may be errors and misunderstandings in the following descriptions. Feedback is welcome!
108
109 (i) MinGW, MSYS, gfortran
110
111 Install MinGW and MSYS. The author uses MinGW-5.1.4 and MSYS-1.0.11.
112
113 To build AmberTools, you need to have gfortran installed. The author has experienced problems with the gfortran of MinGW, and instead is using the binary build taken from http://quatramaran.ens.fr/~coudert/gfortran/ (version 4.5.0, 20090421, trunk revision 146519).
114
115 (ii) wxWidgets
116
117 Get wxMSW-2.8.9.tar.gz from the wxWidgets page in sourceforge.net (http://sourceforge.net/projects/wxwindows/files/). Newer versions may work, but they are not tested.
118
119 Unpack wxMSW-2.8.9.tar.gz. Move the resulting directory wxMSW-2.8.9 to $HOME (the home directory of the MinGW The console commands will be as follows:
120 $ cd $HOME
121 $ mv somewhere/wxMSW-2.8.9.tar.gz ./
122 $ tar xvzf wxMSW-2.8.9.tar.gz
123
124 Build wxMSW. The commands will be as follows. Take care of the configure options.
125 $ cd $HOME/wxMSW-2.8.9
126 $ mkdir msw-build
127 $ cd msw-build
128 $ ../configure --with-msw --with-opengl --disable-shared --enable-unicode --with-libjpeg=builtin --with-zlib=builtin
129 $ make
130 (You do not need to do "sudo make install".)
131
132 (iii) Ruby
133
134 Get ruby-1.8.7-p160.tar.gz from the Molby source distribution site. Unpack it, and move the resulting directory ruby-1.8.7-p160 to $HOME. Rename it to ruby-1.8.7-static.
135 $ cd $HOME
136 $ mv somewhere/ruby-1.8.7-p160.tar.gz ./
137 $ tar xvzf ruby-1.8.7-p160.tar.gz
138 $ mv ruby-1.8.7-p160 ruby-1.8.7-static
139
140 Patch the Ruby source.
141 $ cd $HOME/ruby-1.8.7-static
142 $ patch --backup -p1 < $MOLBY/ruby-1.8.7-p160-tn.patch
143 ($MOLBY is the location of the Molby source.)
144
145 Build Ruby with --disable-shared option.
146 $ ./configure --disable-shared --disable-thread
147 $ make
148
149 (iv) CLAPACK
150
151 Get clapack-3.1.1.1.tar.gz from the CLAPACK official site (http://www.netlib.org/clapack/) and unpack it. (clapack-3.2.1 may cause trouble because it uses symbolic links.)
152 $ cd $HOME
153 $ mv somewhere/clapack-3.1.1.1.tgz ./
154 $ tar xvzf clapack-3.1.1.1.tgz
155
156 Patch the clapack source.
157 $ patch -p0 <$MOLBY/clapack-3.1.1.1-mingw.patch
158
159 Build CLAPACK.
160 $ cd CLAPACK-3.1.1.1
161 $ make
162
163 Modify libf2c.a, so that the 'main' entry does not interfere the main program.
164 $ cd F2CLIBS
165 $ cp libf2c.a libf2c_nomain.a
166 $ ar d libf2c_nomain.a main.o
167 $ cd ..
168
169 Copy the library and header files to /lib/clapack.
170 $ mkdir /lib/clapack
171 $ cp F2CLIBS/libf2c_nomain.a /lib/clapack
172 $ cp blasMinGW.a /lib/clapack/libblas.a
173 $ cp lapackMinGW.a /lib/clapack/liblapack.a
174 $ cp INCLUDE/f2c.h INCLUDE/blaswrap.h INCLUDE/clapack.h /lib/clapack
175
176 (v) Inno Setup 5
177
178 Install Inno Setup 5 (http://www.jrsoftware.org/isinfo.php). This is necessary to create the Molby Installer.
179
180 (vi) Build
181
182 Now you can start building Molby! Go to the project directory and do make.
183 $ cd somewhere/Molby/msw-build
184 $ make
185 $ make setup  #  To make the installer
186
187
188 2010.1.21.
189 2010.1.31. Added notice on AmberTools1.3
190 2010.4.29. Update description for MinGW/MSYS
191
192 Toshi Nagata