User:Tlinnet/Linux Install: Difference between revisions
(3 intermediate revisions by the same user not shown) | |||
Line 73: | Line 73: | ||
svnfreemol=svnfreemol | svnfreemol=svnfreemol | ||
pymolscriptrepo=Pymol-script-repo | pymolscriptrepo=Pymol-script-repo | ||
update=$prefix/updatepymol.sh | |||
################################################### | ################################################### | ||
mkdir -p $prefix | mkdir -p $prefix | ||
Line 83: | Line 84: | ||
cd $prefix/$svnpymol | cd $prefix/$svnpymol | ||
python setup.py build install --home=$prefix --install-lib=$modules --install-scripts=$prefix | python setup.py build install --home=$prefix --install-lib=$modules --install-scripts=$prefix | ||
########## Setup freemol - for MPEG support ############ | ########## Setup freemol - for MPEG support ############ | ||
Line 97: | Line 97: | ||
## Make a shortcut to an extended pymol execution | ## Make a shortcut to an extended pymol execution | ||
echo "#!/bin/bash" | echo "#!/bin/bash" > $prefix/pymolMPEG.sh | ||
echo "export FREEMOL=$prefix/$svnfreemol/freemol" >> $prefix/pymolMPEG.sh | echo "export FREEMOL=$prefix/$svnfreemol/freemol" >> $prefix/pymolMPEG.sh | ||
echo "export PYMOL_GIT_MOD=$prefix/$pymolscriptrepo/modules" >> $prefix/pymolMPEG.sh | echo "export PYMOL_GIT_MOD=$prefix/$pymolscriptrepo/modules" >> $prefix/pymolMPEG.sh | ||
echo "export PYTHONPATH=$prefix/$pymolscriptrepo/modules"':$PYTHONPATH' >> $prefix/pymolMPEG.sh | echo "export PYTHONPATH=$prefix/$pymolscriptrepo/modules"':$PYTHONPATH' >> $prefix/pymolMPEG.sh | ||
echo "export PYTHONPATH=$prefix/$pymolscriptrepo"':$PYTHONPATH' >> $prefix/pymolMPEG.sh | echo "export PYTHONPATH=$prefix/$pymolscriptrepo"':$PYTHONPATH' >> $prefix/pymolMPEG.sh | ||
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sbinlab2/software/x64/lib/pymollib' >> $prefix/pymolMPEG.sh | echo '#export PYTHONPATH=$PYTHONPATH:/sbinlab2/software/x64/lib64/python2.6/site-packages/PIL' >> $prefix/pymolMPEG.sh | ||
echo 'export LIBGL_ALWAYS_INDIRECT=no' >> $prefix/pymolMPEG.sh | echo '#export PYTHONPATH=$PYTHONPATH:/sbinlab2/software/x64/lib64/python2.6/site-packages/lib-dynload' >> $prefix/pymolMPEG.sh | ||
echo '#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sbinlab2/software/x64/lib/pymollib' >> $prefix/pymolMPEG.sh | |||
echo '#export LIBGL_ALWAYS_INDIRECT=no' >> $prefix/pymolMPEG.sh | |||
tail -n +2 $prefix/pymol >> $prefix/pymolMPEG.sh | tail -n +2 $prefix/pymol >> $prefix/pymolMPEG.sh | ||
chmod | chmod ugo+x $prefix/pymolMPEG.sh | ||
## Make a startup files, which is always executed on startup. | ## Make a startup files, which is always executed on startup. | ||
t="'" | t="'" | ||
echo "import sys,os" | 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 "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 | ||
Line 117: | Line 117: | ||
echo "pymol.plugins.set_startup_path( [$t$prefix/$pymolscriptrepo/plugins$t,$t$modules/pmg_tk/startup$t] )" >> $modules/pymol/pymol_path/run_on_startup.py | echo "pymol.plugins.set_startup_path( [$t$prefix/$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 | echo "pymol.plugins.preferences = {'instantsave': True, 'verbose': False}" >> $modules/pymol/pymol_path/run_on_startup.py | ||
## Make a update script | |||
cat > "$update" <<EOF | |||
#!/bin/bash -e | |||
prefix=$prefix | |||
modules=$modules | |||
svnpymol=svnpymol | |||
svnfreemol=svnfreemol | |||
pymolscriptrepo=Pymol-script-repo | |||
###### Checkout pymol svn | |||
svn co svn://svn.code.sf.net/p/pymol/code/trunk/pymol \$prefix/\$svnpymol | |||
###### Build and install pymol | |||
cd \$prefix/\$svnpymol | |||
python setup.py build install --home=\$prefix --install-lib=\$modules --install-scripts=\$prefix | |||
########## Setup freemol - for MPEG support ############ | |||
svn co svn://bioinformatics.org/svnroot/freemol/trunk \$prefix/\$svnfreemol | |||
cd \$prefix/$svnfreemol/src/mpeg_encode | |||
export FREEMOL=\$prefix/\$svnfreemol/freemol | |||
./configure | |||
make | |||
make install | |||
########## Update Pymol-script-repo ############ | |||
cd \$prefix/\$pymolscriptrepo | |||
git pull origin master | |||
cd \$prefix | |||
EOF | |||
chmod +x $update | |||
</source> | </source> | ||
=== Change MPEG settings === | === Change MPEG settings === |
Latest revision as of 05:48, 15 April 2013
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
prefix=$PWD/pymol
modules=$prefix/modules
svnpymol=svnpymol
svnfreemol=svnfreemol
pymolscriptrepo=Pymol-script-repo
update=$prefix/updatepymol.sh
###################################################
mkdir -p $prefix
mkdir -p $HOME/bin
###### Checkout pymol svn
svn co svn://svn.code.sf.net/p/pymol/code/trunk/pymol $prefix/$svnpymol
###### Build and install pymol
cd $prefix/$svnpymol
python setup.py build install --home=$prefix --install-lib=$modules --install-scripts=$prefix
########## Setup freemol - for MPEG support ############
svn co svn://bioinformatics.org/svnroot/freemol/trunk $prefix/$svnfreemol
cd $prefix/$svnfreemol/src/mpeg_encode
export FREEMOL=$prefix/$svnfreemol/freemol
./configure
make
make install
########## Install Pymol-script-repo ############
git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git $prefix/$pymolscriptrepo
## Make a shortcut to an extended pymol execution
echo "#!/bin/bash" > $prefix/pymolMPEG.sh
echo "export FREEMOL=$prefix/$svnfreemol/freemol" >> $prefix/pymolMPEG.sh
echo "export PYMOL_GIT_MOD=$prefix/$pymolscriptrepo/modules" >> $prefix/pymolMPEG.sh
echo "export PYTHONPATH=$prefix/$pymolscriptrepo/modules"':$PYTHONPATH' >> $prefix/pymolMPEG.sh
echo "export PYTHONPATH=$prefix/$pymolscriptrepo"':$PYTHONPATH' >> $prefix/pymolMPEG.sh
echo '#export PYTHONPATH=$PYTHONPATH:/sbinlab2/software/x64/lib64/python2.6/site-packages/PIL' >> $prefix/pymolMPEG.sh
echo '#export PYTHONPATH=$PYTHONPATH:/sbinlab2/software/x64/lib64/python2.6/site-packages/lib-dynload' >> $prefix/pymolMPEG.sh
echo '#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sbinlab2/software/x64/lib/pymollib' >> $prefix/pymolMPEG.sh
echo '#export LIBGL_ALWAYS_INDIRECT=no' >> $prefix/pymolMPEG.sh
tail -n +2 $prefix/pymol >> $prefix/pymolMPEG.sh
chmod ugo+x $prefix/pymolMPEG.sh
## 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$prefix/$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
## Make a update script
cat > "$update" <<EOF
#!/bin/bash -e
prefix=$prefix
modules=$modules
svnpymol=svnpymol
svnfreemol=svnfreemol
pymolscriptrepo=Pymol-script-repo
###### Checkout pymol svn
svn co svn://svn.code.sf.net/p/pymol/code/trunk/pymol \$prefix/\$svnpymol
###### Build and install pymol
cd \$prefix/\$svnpymol
python setup.py build install --home=\$prefix --install-lib=\$modules --install-scripts=\$prefix
########## Setup freemol - for MPEG support ############
svn co svn://bioinformatics.org/svnroot/freemol/trunk \$prefix/\$svnfreemol
cd \$prefix/$svnfreemol/src/mpeg_encode
export FREEMOL=\$prefix/\$svnfreemol/freemol
./configure
make
make install
########## Update Pymol-script-repo ############
cd \$prefix/\$pymolscriptrepo
git pull origin master
cd \$prefix
EOF
chmod +x $update
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.