User:Tlinnet/Linux Install: Difference between revisions
No edit summary |
|||
Line 135: | Line 135: | ||
t="'" | t="'" | ||
echo "import sys,os" >> $modules/pymol/pymol_path/run_on_startup.py | echo "import sys,os" >> $modules/pymol/pymol_path/run_on_startup.py | ||
echo "import | echo "import pymol.plugins" >> $modules/pymol/pymol_path/run_on_startup.py | ||
echo "pymol.plugins.preferences = {'instantsave': False, 'verbose': False}" >> $modules/pymol/pymol_path/run_on_startup.py | echo "pymol.plugins.preferences = {'instantsave': False, 'verbose': False}" >> $modules/pymol/pymol_path/run_on_startup.py | ||
echo "pymol.plugins.autoload = {'apbs_tools': False}" >> $modules/pymol/pymol_path/run_on_startup.py | echo "pymol.plugins.autoload = {'apbs_tools': False}" >> $modules/pymol/pymol_path/run_on_startup.py |
Revision as of 14:41, 8 June 2012
These are customized installation scripts. For more general instructions, see Linux Install.
Ubuntu/Mint 12 compile and install with MPEG support
First install dependencies.
sudo apt-get install subversion git
sudo apt-get install python-imaging python-pygame apbs
sudo apt-get install build-essential python-dev python-pmw libglew-dev freeglut3-dev libpng-dev libfreetype6-dev
bash installpymol.sh
Red Hat Enterprise Linux RHEL 6 compile and install with MPEG support for x86_64 bit
Install the EPEL repository: The .rpm will be download from here
http://fedoraproject.org/wiki/EPEL
And the CentOS repository for additional .rpm are located here
http://mirror.centos.org/centos/6/os/x86_64/Packages/
bash
cd && wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
sudo rpm -i epel-release-6-5.noarch.rpm
rm epel-release-6-5.noarch.rpm</pre>
Then add Centos repository
rpm --import http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
sudo gedit /etc/yum.repos.d/centos.repo
Write these lines.
[centos]
name=Centos for RHEL/ CentOS $releasever - $basearch
baseurl=http://mirror.centos.org/centos/6/os/x86_64
enabled=1
Then check configuration. Do NOT UPGRADE PACKAGES from CentOS. It will replace RHEL packages.
If you do upgrade packages, you will now see Centos login and such, but not much is problematic.
sudo yum repolist all
sudo yum install subversion git
sudo yum install python-imaging pygame apbs
sudo yum install gcc-c++ python-devel python-pmw glew-devel freeglut-devel libpng-devel freetype-devel
Then disable centos repository. Set enabled=0
sudo gedit /etc/yum.repos.d/centos.repo
Now install pymol
bash installpymol.sh
Make sure, that you will have ~/bin as part of your path
gedit ~/.cshrc
Make sure this lines is in the file. Only if you use tcsh shell.
setenv PATH ${PATH}:{$HOME}/bin
Install script
Make a text file "installpymol.sh" and make it executable
chmod u+x installpymol.sh
Put this in the file, modify the first line
#!/bin/bash -e
pymoldir=$HOME/software/pymol
modules=$pymoldir/modules
svnpymol=svnpymol
svnfreemol=svnfreemol
pymolscriptrepo=Pymol-script-repo
###################################################
[ -d $pymoldir ] || mkdir -p $pymoldir
[ -d $HOME/bin ] || mkdir $HOME/bin
###### Checkout pymol svn
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol $pymoldir/$svnpymol
###### Build and install pymol
cd $pymoldir/$svnpymol
python setup.py build install --home=$pymoldir --install-lib=$modules
export PYTHONPATH=$modules:$PYTHONPATH
python setup2.py install
install pymol $pymoldir/
########## Setup freemol - for MPEG support ############
svn co svn://bioinformatics.org/svnroot/freemol/trunk $pymoldir/$svnfreemol
cd $pymoldir/$svnfreemol/src/mpeg_encode
export FREEMOL=$pymoldir/$svnfreemol/freemol
./configure
make
make install
########## Install Pymol-script-repo ############
git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git $pymoldir/$pymolscriptrepo
## Make a shortcut to an extended pymol execution
echo "#!/bin/bash" >> $pymoldir/pymolMPEG.sh
echo "if [ ! -f $HOME/.local/share/applications/pymolsvn.desktop ];" >> $pymoldir/pymolMPEG.sh
echo "then" >> $pymoldir/pymolMPEG.sh
echo "ln -s $pymoldir/pymolsvn.desktop $HOME/.local/share/applications/pymolsvn.desktop" >> $pymoldir/pymolMPEG.sh
echo "fi" >> $pymoldir/pymolMPEG.sh
echo "export FREEMOL=$pymoldir/$svnfreemol/freemol" >> $pymoldir/pymolMPEG.sh
echo "export PYMOL_GIT_MOD=$pymoldir/$pymolscriptrepo/modules" >> $pymoldir/pymolMPEG.sh
echo '#export PYTHONPATH=$PYTHONPATH:/path/to/shared/python/site-packages/PIL' >> $pymoldir/pymolMPEG.sh
echo '#export PYTHONPATH=$PYTHONPATH:/path/to/shared/python/site-packages/lib-dynload' >> $pymoldir/pymolMPEG.sh
echo "export PYTHONPATH=$pymoldir/$pymolscriptrepo/modules"':$PYTHONPATH' >> $pymoldir/pymolMPEG.sh
echo "export PYTHONPATH=$pymoldir/$pymolscriptrepo"':$PYTHONPATH' >> $pymoldir/pymolMPEG.sh
echo '#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/shared/lib/pymollib' >> $pymoldir/pymolMPEG.sh
echo '#export LIBGL_ALWAYS_INDIRECT=no' >> $pymoldir/pymolMPEG.sh
tail -n +2 $pymoldir/pymol >> $pymoldir/pymolMPEG.sh
chmod u+x $pymoldir/pymolMPEG.sh
## Make a link, so we execute pymol with the freemol env exported
ln -s $pymoldir/pymolMPEG.sh $HOME/bin/pymol
## Make a pymolsvn.desktop
echo "#!/bin/env xdg-open" >> $pymoldir/pymolsvn.desktop
echo "[Desktop Entry]" >> $pymoldir/pymolsvn.desktop
echo "Version=1.5.x" >> $pymoldir/pymolsvn.desktop
echo "Name=PyMOL Molecular Graphics System - Open source" >> $pymoldir/pymolsvn.desktop
echo "GenericName=Molecular Modeller" >> $pymoldir/pymolsvn.desktop
echo "Comment=Model molecular structures and produce high-quality images of them" >> $pymoldir/pymolsvn.desktop
echo "Type=Application" >> $pymoldir/pymolsvn.desktop
echo "Exec=env $pymoldir/pymolMPEG.sh" >> $pymoldir/pymolsvn.desktop
echo "Icon=$pymoldir/$pymolscriptrepo/files_for_examples/pymol.xpm" >> $pymoldir/pymolsvn.desktop
echo "MimeType=chemical/x-pdb" >> $pymoldir/pymolsvn.desktop
echo "Categories=Education;Science;Chemistry;" >> $pymoldir/pymolsvn.desktop
echo "Terminal=false" >> $pymoldir/pymolsvn.desktop
## Make a startup files, which is always executed on startup.
t="'"
echo "import sys,os" >> $modules/pymol/pymol_path/run_on_startup.py
echo "import pymol.plugins" >> $modules/pymol/pymol_path/run_on_startup.py
echo "pymol.plugins.preferences = {'instantsave': False, 'verbose': False}" >> $modules/pymol/pymol_path/run_on_startup.py
echo "pymol.plugins.autoload = {'apbs_tools': False}" >> $modules/pymol/pymol_path/run_on_startup.py
echo "pymol.plugins.set_startup_path( [$t$pymoldir/$pymolscriptrepo/plugins$t,$t$modules/pmg_tk/startup$t] )" >> $modules/pymol/pymol_path/run_on_startup.py
echo "pymol.plugins.preferences = {'instantsave': True, 'verbose': False}" >> $modules/pymol/pymol_path/run_on_startup.py
Change MPEG settings
Change settings in
$HOME/Software/pymol/svnfreemol/freemol/libpy/freemol/mpeg_encode.py
For example, change in line 205:
FRAME_RATE 24
(Note, only legal values is allowed: 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60)
Then restart PyMOL.