Random notes: physics

Useful quantities

  • 1kBT @ 295 K = 0.586 kcal/mol = 2.452 kJ/mol
  • 1 kcal = 4.184 kJ; 1 kJ = 0.2390 kcal
  • 1 L = 1027 ų

  • Volume of 1 mol of H2O = 18/10³ L = 0.018 L; 1 L of H2O contains 10³/18 mol = 55.5 mol
  • Volume of 1 molecule of H2O = 2.99e-26 L = 29.9 ų

  • [X] (M) = no. of molecules of X / (no. of molecules of H2O/55.6) = 1661 ų * no. of molecules of X / V

  • Additional volume for restraint: d'i = di + sqrt(2*π*kB*T/ki)

Diffusion coefficients

Methods from http://www.ks.uiuc.edu/Training/SumSchool/materials/lectures/6-3-Statistical-Mechanics-Proteins/1-ik_diffusion.pdf

  1. Mean squared path increases linearly with time
  2. Velocity autocorrelation decays with tau; D=<v²> tau

  3. Velocity distribution of components is a gaussian with 2D stdev
  4. Maxwell distribution

Lifson Roig

Kelley says that the Lifson-Roig helix-coil theory

  • phi = -60 +- x
  • psi = -47 +- x
  • x = 40 deg
  • helical segment =def= 3 or more consecutive helical residues
  • each segment has length n-2
  • helical content =def= sum over all helical segments of (length of segment) / max possible helical length

CGenFF

  1. Upload the molecule to https://www.paramchem.org/index.html .

  2. Save the result as toppar_xxx.str .
  3. Run it through split_stream.pl: you will get

    • top_xxx.rtf
    • par_xxx.inp
  4. When using autopsf or psfgen, add the top_xxx.rtf file to the list of topology files which are searched.
  5. Combine the parameter files:

 perl -w combine_parameters.pl par_xxx.inp  par_all36_cgenff.inp  ... > par_combined.inp
  1. Use them in simulation.

Papers

D. Lucent, C. D. Snow, C. E. Aitken, and V. S. Pande, “Non-Bulk-Like Solvent Behavior in the Ribosome Exit Tunnel,” PLoS Comput Biol, vol. 6, no. 10, p. e1000963, Oct. 2010.

Explains how to compute:

  • water PMF
  • rotational entropy
  • local dielectric flucuation tensor
  • local diffusion coefficient

T. Jain and B. Jayaram, “An all atom energy based computational protocol for predicting binding affinities of protein-ligand complexes,” FEBS Letters, vol. 579, no. 29, pp. 6659-6666, Dicembre. 2005.

Compute binding affinity at +-1 kcal/mol from all atoms.

Convergence of Markov models

Time scales derived from Markov models are affected by the chosen lag time in two ways:

  1. Time scales are reliable only when lag >> λ where λ is the time scale which guarantees memoryless-ness. Until that regime, timescales (typically) increase with lag*.

  2. One can not resolve time scales smaller than the chosen lag. This is due to the fact that all of the motions which occur faster than lag are averaged out.

The above rules apply both to implied timescales (ITS) and mean first passage times (MFPT). The regime for quantitative deductions of timescales (TS) is therefore λ << lag << TS.

* Tentative explanation: one observes what's moving after a lag time τ, 2 τ, etc. If the flux across states does not double when doubling the lag time, it means that the state is still "sticky".

Table of protein temini in CHARMM

NTER

Charged

NH3+-Cα

ACE

Acetylated

CH3-CO-NH-Cα

NNEU

Neutral

NH2-Cα

CTER

Charged

Cα-COO-

CT1

Methylated

Cα-CO-O-CH3

CT2

Amidated

Cα-CO-NH2

CT3

N-Methylamide

Cα-CO-NH-CH3 (NME)

CNEU

Neutral

Cα-COOH

NTER has variants GLYP and PROP. ACE has variants ACED, ACP, ACPD.

Random notes: computing

SVN initialization

On one machine only: create a directory (e.g. dir_name) and put initial files in it. Then go to the parent directory and...

svn import dir_name svn+ssh://yourname@tuo/home/svn/lab/papers/dir_name
mv dir_name dir_name_old
svn co svn+ssh://yourname@tuo/home/svn/lab/papers/dir_name dir_name

On all remaining machines: use the last line only.

SVN use

  • Update means pull other's changes into yours: svn update.

  • Commit, also known as checkin, means pushing your changes when you are sure of them: svn commit

  • Add new files: svn add file_name. Do not add auto-generated files such as log or pdf files!

Using plumed from VMD

Allow invokation of PLUMED from VMD.

source ~/shared/vmd-utils/vmd_plumed/plumed_proc.tcl

set metric [ Plumed::plumed 1 {
  lig-> [resname LIG] lig<-
  POSITION LIST <lig>   DIR Z
}  ]

Then, e.g.

 multiplot -y $metric -plot 

The first argument (1) is the number of CVs. Limitations: does not support PBC. Make sure you have a psf or prmtop loaded if using masses/charges.

Batch plumed on commandline

  ls *.dcd| xargs  -i+ bash -c '(driver -dcd + -pdb filtered.pdb -plumed META_INP -ncv 3; mv COLVAR +.cv)' 
  n=rama; awk '!/FIELDS/{print FILENAME $0}' *.$n > $n.all
  rm *.$n
  sort -k5,5 -g rama.all |less

Acemd restraints

 $file --readpdb--> $pdb --loadsystem--+--> $id1  ---+--addgroup---> $gcom1
                                       |             |
                                       +--> $coor1   +--get_groups---> $glist1


 $glist1 ---+---> center_of_mass --> { x y z }
            |
 $coor1 ----+

ggplot legends

  p+geom_point(aes(1:10,5:14,colour="Pippo"))+
  geom_line(aes(4:10,4:10,colour="Pluto"))+
  scale_colour_manual("Source",c("blue","red"))

ggplot multiplot

http://gettinggeneticsdone.blogspot.com/2010/03/arrange-multiple-ggplot2-plots-in-same.html

Install python packages as user

Do this stuff in random order

export PYTHONPATH=~/python/lib/python2.5/site-packages/
mkdir -p ~/python//lib/python2.5/site-packages
sh setuptools-0.6c11-py2.5.egg --prefix=~/python/
~/python/bin/easy_install --prefix=~/python/

Install perl packages as user

Assuming you already have cpan.

export PERL5LIB=/shared/lab/software/rboinc/lib/5.012003/
cpan
o conf makepl_arg "PREFIX=/shared/lab/software/rboinc/lib/5.012003 LIB=/shared/lab/software/rboinc/lib/5.012003/"
o conf commit

Install msmbuilder as user

install epd, add epd to path

module add msmbuilder/svn

cp -a /shared/lab/milestoning/msmbuilder2/msmbuilder $HOME
src=$HOME/msmbuilder
dest=/shared/lab/software/msmbuilder_linux-2.0-SVN
cd $src

LDFLAGS=-L/shared/lab/software/epd-7.1-2-rh5-x86_64/lib/ python setup.py build
LDFLAGS=-L/shared/lab/software/epd-7.1-2-rh5-x86_64/lib/ python setup.py install --home=$dest

# msmbuilder/msmbuilder/Scripts -> bin

cp -a $src/Extras $dest
chmod a+x $dest/Extras/InstallExtras.sh

cp -a $src/Docs $dest
cp -a $src/Tutorial $dest

Generate compressed EPS

  convert wallpaper_test.png eps3:wal.eps

Works with input files of any format. The output size should be more or less the same as the input. Add -compress jpeg or -compress zip or -quality XX to force compression if necessary. See http://daicas.net/compressed-images-in-PS-PDF/article.html and http://www.imagemagick.org/script/command-line-options.php?ImageMagick=tbv38oqplsrps97q3p3ga5uus5#compress for details.

CUDA environment variables

http://www.ks.uiuc.edu/Research/vmd/current/ug/node205.html: VMDNOCUDA and

http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/cudatoolkit_release_notes_linux.txt CUDA_VISIBLE_DEVICES

Wrap

pbc set [pbc get -all] -all
pbc wrap -center bb -centersel protein -compound res -all

Troia, ie. fetch through UPF proxy

Drag this bookmarklet to your bookmarks.

Or, create a bookmark with this destination: javascript:location.href=location.href.replace(new%20RegExp('http://'),'http://troia.upf.edu/http/')

Making videos

Making portable videos is almost impossible. -qscale is because it seems to ignore -b (bitrate). The quality/size ends up being the same for all codecs (for what I'm concerned).

 in=sh2p
 ffmpeg -y -i $in.%05d.ppm -vcodec mpeg2video -qscale 10 $in.mpg
 ffmpeg -y -i $in.%05d.ppm -vcodec msmpeg4v2 -qscale 10 $in.avi
 ffmpeg -y -i $in.%05d.ppm -vcodec libx264 -threads 0 -vpre ipod640 $in.mp4
Copyright 2008-2011. All rights reserved.