コード例 #1
0
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(density='analysis/water.pickle',
                          bulk='analysis/bulk.pickle',
                          psf='inp/XXX.psf',
                          dcd='trj/rmsfit_XXX.dcd'),
          outputfiles=dict(
              density='analysis/water.pickle',
              hopdcd='trj/hoptraj.dcd',
              hoppsf='trj/hoptraj.psf',
          ))
#
#------------------------------------------------------------

job.stage()

# commands
import hop.utilities

hop.utilities.matplotlib_interactive(False)
from hop.interactive import *
from hop.sitemap import Density
コード例 #2
0
ファイル: fulldensity.py プロジェクト: amrhamedp/hop
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

        
from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(psf = '1IFC/inp/XXX.psf',
                          dcd = '1IFC/trj/rmsfit_XXX.dcd'),
          outputfiles=dict(water = '1IFC/analysis/water.pickle',
                           bulk = '1IFC/analysis/bulk.pickle',
                           dx = '1IFC/analysis/*.dx',
                           ))
#
#------------------------------------------------------------

job.stage()

F = job.filenames
V = job.variables

# commands
import hop.utilities
hop.utilities.matplotlib_interactive(False)
from hop.interactive import *
コード例 #3
0
ファイル: graph.py プロジェクト: amrhamedp/hop
* creates hopping graph
* exports xgml file
* initial analysis and statistics
"""

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(
    hopdcd='trj/hops.dcd',
    hoppsf='trj/hops.psf',
    density='analysis/water.pickle',
),
          outputfiles=dict(
              xgmmlfiles='analysis/*.xgmml',
              hopgraph='analysis/hopgraph.pickle',
              survivaltimes='analysis/survival_times/*.png',
          ))
#
#------------------------------------------------------------

job.stage()

# commands
import hop.utilities
hop.utilities.matplotlib_interactive(False)  # no X11 available

from hop.interactive import build_hoppinggraph_fromfiles
コード例 #4
0
ファイル: hopanalysis_gsbp.py プロジェクト: amrhamedp/hop
    "\tSTATE=%(STATE)s  topdir=%(topdir)s\n"\
    "\tpsf=%(psf)s\n"\
    "\tdcd=%(dcd)s" % locals()

job = Job(
    variables=dict(
        trj=STATE,  # compute hop traj for trj = apo | holo HOP_TARGET
        survival_times_dir=survival_times_dir,
    ),
    inputfiles=dict(
        dens_apo=APO_DIR('analysis',
                         'water_' + ID + '.pickle'),  # is modified!
        dens_holo=HOLO_DIR('analysis', 'water_' + ID + '.pickle'),
        psf=psf,
        dcd=dcd,
    ),
    outputfiles=dict(
        equiv_graph=FIGS_DIR('equivalence_graph_1.png'),
        saved_apo=APO_DIR('analysis', '*.pickle'),
        saved_holo=HOLO_DIR('analysis', 'water_remapped_1IFC.pickle'),
        hopdcd=TRJ_DIR('hoptrj.dcd'),
        hoppsf=TRJ_DIR('hoptrj.psf'),
        hopgraph=ANALYSIS_DIR('hopgraph_' + ID + '.pickle'),
        xgmml=ANALYSIS_DIR('*.xgmml'),
        survivaltimes=os.path.join(survival_times_dir, '*.png'),
    ),
)
#
#------------------------------------------------------------
job.stage()
F = job.filenames
コード例 #5
0
#$ -v PYTHONPATH=/home/oliver/Library/python-lib
#$ -v LD_LIBRARY_PATH=/opt/intel/cmkl/8.0/lib/32:/opt/intel/itc60/slib:/opt/intel/ipp41/ia32_itanium/sharedlib:/opt/intel/ipp41/ia32_itanium/sharedlib/linux32:/opt/intel/fc/9.0/lib:/opt/intel/cc/9.0/lib
#$ -r n
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(variables=dict(), inputfiles=dict(), outputfiles=dict())
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
import hop.utilities  # must come first (for reasons unknown)

hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.analysis

job.unstage()
job.cleanup()
コード例 #6
0
ファイル: fulldensity_gsbp.py プロジェクト: amrhamedp/hop
def TRJ_DIR(*args):
    return os.path.join(GSBP_MD_DIR, *args)


psf_files = glob.glob(TRJ_DIR('*_gsbp_*.psf'))
psf_files.sort()
#ifabp_apo_gsbp_15_0.psf ifabp_apo_gsbp_gcmc_1.psf
psf = psf_files[-1]

dcd_files = glob.glob(TRJ_DIR('rmsfit_*_1.dcd'))
dcd_files.sort()
dcd = dcd_files[-1]

job = Job(inputfiles=dict(psf=psf, dcd=dcd),
          outputfiles=dict(dx='analysis/*.dx',
                           water_saved='analysis/water_' + id + '.pickle',
                           bulk_saved='analysis/bulk_' + id + '.pickle'))
#
#------------------------------------------------------------

job.stage()

# commands
import hop.utilities

hop.utilities.matplotlib_interactive(False)
from hop.interactive import *

density = make_density(job.filenames['psf'],
                       job.filenames['dcd'],
                       job.filenames['water_saved'],
コード例 #7
0
from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(variables=dict(),
          inputfiles=dict(
              psf="",
              trj="",
              hoppsf="",
              hoptrj="",
              density="",
          ),
          outputfiles=dict(
              fig_distance="figs/site_distance.pdf",
              fig_orbit="figs/site_orbit.pdf",
              fig_distance2="figs/site_distance2.pdf",
              fig_orbit2="figs/site_orbit2.pdf",
              fig_occupancy="figs/site_occupancy.pdf",
              fig_orbitoccupancy="figs/site_orbitoccupancy.pdf",
              saved="analysis/siteanalysis.pickle",
          ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
コード例 #8
0
# $Id: markovsampling.py 2044 2008-07-22 19:21:12Z oliver $
"""Run 20 independent Pscans to check convergence of MCMC model with Ntotal."""

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(variables=dict(
    repeats=20,
    parameter='Ntotal',
    pvalues=[
        3e3, 5e3, 8e3, 1e4, 3e4, 5e4, 8e4, 1e5, 3e5, 5e5, 8e5, 1e6, 5e6, 1e7,
        3e7
    ],
),
          inputfiles=dict(hopgraph='analysis/hopgraph.pickle'),
          outputfiles=dict(
              scan='analysis/pscan_Ntotal.pickle',
              scanfig='figs/pscan_Ntotal.pdf',
          ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
import hop.utilities  # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available
コード例 #9
0
ファイル: rmsfit_gsbp.py プロジェクト: amrhamedp/hop
#---------------- EDIT JOB NAME -------------------
#$ -N gsbpRMSfit
#--------------------------------------------------
#$ -S /usr/bin/python
# Importing the whole environment is important for setting up Charmm:
#$ -V
#$ -v PYTHONPATH=/home/oliver/Library/python-lib
#$ -v LD_LIBRARY_PATH=/opt/intel/cmkl/8.0/lib/32:/opt/intel/itc60/slib:/opt/intel/ipp41/ia32_itanium/sharedlib:/opt/intel/ipp41/ia32_itanium/sharedlib/linux32:/opt/intel/fc/9.0/lib:/opt/intel/cc/9.0/lib
#$ -r n
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$
#
"""RMS-fit a GSBP trajectory (with fixed atoms and gaps in the
protein) to a reference structure.  This requires a sequence
alignment, the reference, and the trajectory.  All intermediate steps
such as creating the initial aligned frame (using MDAnalysis) are
performed, as is the actual fitting using Charmm with the CONSFIX=1
ORIENT=1 options.

Currently, this is geared towards GSBP_MD simulations. Set GSBP_MD_DIR in the environment or with

  qsub -v GSBP_MD_DIR=./GSBP_MD_1 rmsfit_gsbp.py

It automatically find the psf file for the dcd in GSBP_MD_DIR, but other values have to be set in 
Job() as usual.
"""

from staging.SunGridEngine import Job
コード例 #10
0
# $Id$

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(
    inputfiles=dict(
        psf='inp/XXX.psf',
        dcd='trj/rmsfit_XXX.dcd',
        bulkdensity='analysis/bulk.pickle',  # remove if needs computing
    ),
    outputfiles=dict(TAP_dcd='trj/TAP_rmsfit_XXX.dcd',
                     dx='analysis/*.dx',
                     waterdensity='analysis/water_TAP.pickle',
                     bulkdensity_saved='analysis/bulk.pickle'),
    variables=dict(
        water_selection="name OH2",
        rho_cut=2.72,
        rho_cut_bulk=0.6,
    ))
#
#------------------------------------------------------------

job.stage()
F = job.filenames
V = job.variables

# commands
コード例 #11
0
ファイル: combinedgraph.py プロジェクト: amrhamedp/hop
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

        
from staging.SunGridEngine import Job
# from staging.Local import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(hg_apo =  '1IFC/analysis/hopgraph.pickle',
                          hg_holo = '2IFB/analysis/hopgraph.pickle'),
          outputfiles=dict(cg = 'analysis/cg_1IFC_2IFB.pickle',
                           png = 'fig/*.png') )
#
#------------------------------------------------------------

job.stage()

# commands
import hop.utilities    # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.sitemap,hop.graph


class Struct:
    pass
コード例 #12
0
"""Align coordinate to reference, using a fasta alignment to find the
common atoms."""

from staging.SunGridEngine import Job
#from staging.Local import Job

job = Job(inputfiles=dict(
    sequence='sequences/1IFC_R151IFC.fasta',
    ref_psf='coord/1ifc_xtal.psf',
    ref_pdb='coord/1ifc_xtal.pdb',
    trj_psf='GSBPsetup/ifabp_apo_gsbp_15_0.psf',
    trj_pdb='GSBPsetup/ifabp_apo_gsbp_15_0.pdb',
),
          outputfiles=dict(
              fit_pdb='GSBPsetup/rmsfit_ifabp_apo_gsbp_15_0.pdb', ))

job.stage()

from MDAnalysis import Universe
import hop.trajectory

print "Setting up the Universes..."
ref = Universe(job.filenames['ref_psf'], pdbfilename=job.filenames['ref_pdb'])
trj = Universe(job.filenames['trj_psf'], job.filenames['trj_pdb'])

ref_resids = [a.resid for a in ref.selectAtoms('name CA')]
target_resids = [a.resid for a in trj.selectAtoms('name CA')]

print "Alignment and selection string..."
selection = hop.trajectory.fasta2select(job.filenames['sequence'],
                                        ref_resids=ref_resids,
コード例 #13
0
ファイル: recenter_orient.py プロジェクト: amrhamedp/hop
# see http://gonzo.med.jhmi.edu/woolfwiki/index.php/Making_proteins_whole_in_LAMMPS_trajectories
#

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(
    HEADER='str/header.str',
    PSF='inp/ifabp_apo_100mM_charmm.psf',
    DCD='trj/ifabp_apo_100mM_0-20ns_dt1ns.dcd',
    REF_PDB='coord/1ifc_xtal.pdb',
),
          outputfiles=dict(
              DCD_RMS='trj/rmsfit_ifabp_apo_100mM_0-20ns_dt1ns.dcd',
              RESINDEX='inp/ifabp_apo_100mM_charmm.resindex',
              LOG_1='log/1_remap.log',
              LOG_2='log/2_unfold.log',
              LOG_3='log/3_remap.log',
              LOG_4='log/4_orient.log',
          ))
#
#------------------------------------------------------------

job.stage()

#------------------------------------------------------------
# python script proper starts here
# (build commandlines using python named string interpolation)
#
コード例 #14
0
ファイル: equivalencesites.py プロジェクト: amrhamedp/hop
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(dens_apo='1IFC/analysis/water.pickle',
                          dens_holo='2IFB/analysis/water.pickle'),
          outputfiles=dict(
              saved_apo='1IFC/analysis/water.pickle',
              saved_holo='2IFB/analysis/water_remapped_1IFC.pickle',
              graph='figs/equivalence_graph.png',
              sitestats_apo='1IFC/figs/sitestats.pdf',
              sitestats_holo='2IFB/figs/sitestats.pdf'))
#
#------------------------------------------------------------

job.stage()

# commands
import hop.utilities  # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.sitemap

コード例 #15
0
    TOP_DIR('analysis', 'water_remapped*_' + id + '.pickle'))
if len(density_files) == 0:
    density_files = glob.glob(TOP_DIR('analysis', 'water_' + id + '.pickle'))
density_files.sort()
# 2IFB/analysis/water_1.pickle 2IFB/analysis/water_remapped_1IFC_1.pickle
density = density_files[-1]  # pick remapped if available

job = Job(variables=dict(),
          inputfiles=dict(
              psf=psf,
              trj=dcd,
              hoppsf=TRJ_DIR('hoptrj.psf'),
              hoptrj=TRJ_DIR('hoptrj.dcd'),
              density=density,
          ),
          outputfiles=dict(
              fig_distance=TOP_DIR('figs', 'site_distance_' + id + '.pdf'),
              fig_orbit=TOP_DIR('figs', 'site_orbit_' + id + '.pdf'),
              fig_distance2=TOP_DIR('figs', 'site_distance2_' + id + '.pdf'),
              fig_orbit2=TOP_DIR('figs', 'site_orbit2_' + id + '.pdf'),
              fig_occupancy=TOP_DIR('figs', 'site_occupancy_' + id + '.pdf'),
              fig_orbitoccupancy=TOP_DIR('figs',
                                         'site_orbitoccupancy_' + id + '.pdf'),
              saved=TOP_DIR('analysis', 'siteanalysis_' + id + '.pickle'),
          ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
コード例 #16
0
ファイル: rmsfit.py プロジェクト: amrhamedp/hop
ref_dir = os.path.join(top_dir, 'FABP', 'I-FABP', '1IFC', 'coord')
ref_psf = os.path.join(ref_dir, '1ifc_xtal.psf')
ref_pdb = os.path.join(ref_dir, '1ifc_xtal.pdb')

trj_dir = os.path.join(top_dir, 'FABP', 'I-FABP', '1IFC', 'GSBP', 'NVT')
trj_psf = os.path.join(trj_dir, 'inp', 'ifabp_gsbp_15_0.psf')
trj_dcd = os.path.join(trj_dir, 'trj', 'ifabp_gsbp_15_1.dcd')

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(
    sequence=seq_fasta,
    ref_psf=ref_psf,
    ref_pdb=ref_pdb,
    trj_psf=trj_psf,
    trj_dcd=trj_dcd,
),
          outputfiles=dict(fit_dcd='trj/rmsfit_*.dcd', ))
#
#------------------------------------------------------------

job.stage()

from MDAnalysis import Universe
import hop.trajectory

print "Alignment and selection string..."
selection = hop.trajectory.fasta2select(seq_fasta, is_aligned=True)

print "Setting up the Universes..."
コード例 #17
0
ファイル: markovsampling.py プロジェクト: amrhamedp/hop
#$ -j y
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(variables=dict(state='apo'),
          inputfiles=dict(hopgraph='analysis/hopgraph.pickle'),
          outputfiles=dict(
              scan='analysis/pscan.pickle',
              occupancy_pdf='figs/mcmc_occupancy.pdf',
              correl_pdf='figs/mcmc_occupancy_correl.pdf',
          ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
import hop.utilities  # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.MCMC
from pylab import *
コード例 #18
0
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

        
from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(HEADER='str/header.str',
                          PSF='inp/crbp_apo.psf',
                          DCD='trj/1opa_salt_ewald_shake_10ang_prod.dcd',    
                          REF_PDB='coord/rmsfit_1opa_a_xtal.pdb',
                          ),
          outputfiles=dict(DCD_RMS='trj/rmsfit_1opa_salt_ewald_shake_10ang_prod.dcd',
                           CHARMM_LOG='log/rmsfit.log',
                           ))
#
#------------------------------------------------------------

job.stage()

# commands
import os

# This setup requires my canonical filesystem layout under CHARMM:
if not 'CHARMM' in os.environ:   # get sane value for CHARMM top dir
    os.environ['CHARMM'] = os.path.join(os.environ['BIO_D'],'Library','Charmm')
    os.environ['CHARMM_TOP'] = os.path.join(os.environ['CHARMM'],'toppar')
コード例 #19
0
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

        
from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(variables=dict(state='apo'),
          inputfiles=dict(hopgraph='analysis/hopgraph.pickle'
                          ),
          outputfiles=dict(scan = 'analysis/pscan.pickle',
                           occupancy_pdf = 'figs/mcmc_occupancy.pdf',
                           correl_pdf = 'figs/mcmc_occupancy_correl.pdf',                           
                           ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames
V = job.variables

# commands
import hop.utilities    # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.MCMC
from pylab import *
コード例 #20
0
ファイル: analysis.py プロジェクト: amrhamedp/hop
# Using the current working directory is IMPORTANT with the default settings for Job()
#$ -cwd
#$ -m e
# $Id$

        
from staging.SunGridEngine import Job

#------------------------------------------------------------
# EDIT THE inputfiles AND outputfiles DICTIONARIES.
#------------------------------------------------------------
# record input and output files relative to top_dir = cwd
job = Job(inputfiles=dict(dens_apo  = '1IFC/analysis/water.pickle',
                          bulk_apo =  '1IFC/analysis/bulk.pickle',
                          dens_holo = '2IFB/analysis/water.pickle',
                          bulk_holo = '2IFB/analysis/bulk.pickle',
                          ),
          outputfiles=dict(scan = 'analysis/scan.pickle',
                           scan_pdf = 'figs/scan.pdf',
                           ))
#
#------------------------------------------------------------
job.stage()
F = job.filenames

# commands
import hop.utilities    # must come first (for reasons unknown)
hop.utilities.matplotlib_interactive(False)  # no X11 available

import hop.analysis
import numpy