In [1]:
import AlGDock.BindingPMF_plots
from AlGDock.BindingPMF_plots import *
import os, shutil, glob

phases = ['NAMD_Gas', 'NAMD_OBC', 'OpenMM_OBC2']
# phases = ['sander_Gas', \
#   'sander_HCT', 'sander_OBC1', 'sander_OBC2', 'sander_GBn', 'sander_GBn2', \
#   'sander_PBSA', 'sander_ALPB_HCT', 'sander_ALPB_OBC1', 'sander_ALPB_OBC2', \
#   'sander_ALPB_GBn', 'gbnsr6_Still', 'gbnsr6_CHA']

self = AlGDock.BindingPMF_plots.BPMF_plots(\
  dir_dock='dock', dir_cool='cool',\
  ligand_database='prmtopcrd/ligand.db', \
  forcefield='prmtopcrd/gaff2.dat', \
  ligand_prmtop='prmtopcrd/ligand.prmtop', \
  ligand_inpcrd='prmtopcrd/ligand.trans.inpcrd', \
  ligand_mol2='prmtopcrd/ligand.mol2', \
  ligand_rb='prmtopcrd/ligand.rb', \
  receptor_database='prmtopcrd/receptor.db', \
  receptor_prmtop='prmtopcrd/receptor.prmtop', \
  receptor_inpcrd='prmtopcrd/receptor.trans.inpcrd', \
  receptor_fixed_atoms='prmtopcrd/receptor.pdb', \
  complex_prmtop='prmtopcrd/complex.prmtop', \
  complex_inpcrd='prmtopcrd/complex.trans.inpcrd', \
  complex_fixed_atoms='prmtopcrd/complex.pdb', \
  score = 'prmtopcrd/xtal_plus_dock6_scored.mol2', \
  temperature_scaling = 'Quadratic', \
  pose = 0, \
  rmsd=True, \
  dir_grid='grids', \
  protocol='Adaptive', cool_therm_speed=25.0, dock_therm_speed=0.25, \
  T_HIGH=450.0, T_SIMMIN=300.0, T_TARGET=300.0, \
  sampler='HMC', \
  MCMC_moves=1, \
  sampling_importance_resampling = True, \
  solvation = 'Full', \
  seeds_per_state=10, steps_per_seed=200, darts_per_seed=0, \
  sweeps_per_cycle=50, snaps_per_cycle=25, attempts_per_sweep=100, \
  steps_per_sweep=50, darts_per_sweep=0, \
  cool_repX_cycles=3, dock_repX_cycles=4, \
  site='Sphere', site_center=[1.7416, 1.7416, 1.7416], \
  site_max_R=1.0, \
  site_density=10., \
  phases=phases, \
  cores=-1, \
  random_seed=-1, \
  max_time=240, \
  keep_intermediate=True)


###########
# AlGDock #
###########
Molecular docking with adaptively scaled alchemical interaction grids

in /miniconda2/envs/algdock/lib/python2.7/site-packages/AlGDock/BindingPMF.py
last modified Wed Feb 27 09:16:35 2019
    
using 12/12 available cores
using random number seed of -1

*** Directories ***
  start: /Users/dminh/Documents/Code/AlGDock-0.0.1/Example
  cool: /Users/dminh/Documents/Code/AlGDock-0.0.1/Example/cool
  dock: /Users/dminh/Documents/Code/AlGDock-0.0.1/Example/dock

*** Files ***
previously stored in cool directory:
  prmtop:
    L: prmtopcrd/ligand.prmtop
  ligand_database: prmtopcrd/ligand.db
  forcefield: prmtopcrd/gaff2.dat
  inpcrd:
    L: prmtopcrd/ligand.trans.inpcrd

previously stored in dock directory:
  namd: ../../../Applications/NAMD_2.10/namd2
      DOES NOT EXIST
  prmtop:
    L: prmtopcrd/ligand.prmtop
    R: prmtopcrd/receptor.prmtop
    RL: prmtopcrd/complex.prmtop
  ligand_database: prmtopcrd/ligand.db
  dock6: ../../dock6/bin/dock6
  fixed_atoms:
    R: prmtopcrd/receptor.pdb
    RL: prmtopcrd/complex.pdb
  grids:
    LJr: grids/LJr.nc
    LJa: grids/LJa.nc
    sELE: grids/pbsa.nc
    ELE: grids/direct_ELE.nc
    desolv: grids/desolv.nc
  mol2:
    L: prmtopcrd/ligand.mol2
  score: prmtopcrd/xtal_plus_dock6_scored.mol2
  forcefield: prmtopcrd/gaff2.dat
  dir_cool: cool
  inpcrd:
    L: prmtopcrd/ligand.trans.inpcrd
    R: prmtopcrd/receptor.trans.inpcrd
    RL: prmtopcrd/complex.trans.inpcrd

from arguments and defaults:
  ligand_database: prmtopcrd/ligand.db
  receptor_database: prmtopcrd/receptor.db
  forcefield: prmtopcrd/gaff2.dat
  prmtop:
    L: prmtopcrd/ligand.prmtop
    R: prmtopcrd/receptor.prmtop
    RL: prmtopcrd/complex.prmtop
  inpcrd:
    L: prmtopcrd/ligand.trans.inpcrd
    R: prmtopcrd/receptor.trans.inpcrd
    RL: prmtopcrd/complex.trans.inpcrd
  mol2:
    L: prmtopcrd/ligand.mol2
  fixed_atoms:
    R: prmtopcrd/receptor.pdb
    RL: prmtopcrd/complex.pdb
  grids:
    LJr: grids/LJr.nc
    LJa: grids/LJa.nc
    sELE: grids/pbsa.nc
    ELE: grids/direct_ELE.nc
    desolv: grids/desolv.nc
  score: prmtopcrd/xtal_plus_dock6_scored.mol2
  dir_cool: cool

to be used:
  ligand_database: prmtopcrd/ligand.db
  receptor_database: prmtopcrd/receptor.db
  forcefield: prmtopcrd/gaff2.dat
  frcmodList: ['/Users/dminh/Documents/Code/AlGDock-0.0.1/Example/prmtopcrd/ligand.frcmod']
  prmtop:
    L: prmtopcrd/ligand.prmtop
    R: prmtopcrd/receptor.prmtop
    RL: prmtopcrd/complex.prmtop
  inpcrd:
    L: prmtopcrd/ligand.trans.inpcrd
    R: prmtopcrd/receptor.trans.inpcrd
    RL: prmtopcrd/complex.trans.inpcrd
  mol2:
    L: prmtopcrd/ligand.mol2
  fixed_atoms:
    R: prmtopcrd/receptor.pdb
    RL: prmtopcrd/complex.pdb
  grids:
    LJr: grids/LJr.nc
    LJa: grids/LJa.nc
    sELE: grids/pbsa.nc
    ELE: grids/direct_ELE.nc
    desolv: grids/desolv.nc
  score: prmtopcrd/xtal_plus_dock6_scored.mol2
  dir_cool: cool
  namd: ../../../Applications/NAMD_2.10/namd2
      DOES NOT EXIST
  dock6: ../../dock6/bin/dock6

ligand residue name: iga

*** Simulation parameters and constants ***

for cool:
  protocol: Adaptive
  therm_speed: 25.0
  T_HIGH: 450.0
  T_SIMMIN: 300.0
  T_TARGET: 300.0
  H_mass: 4.0
  fraction_CD: 0.5
  CD_steps_per_trial: 5
  delta_t: 4.0
  sampler: HMC
  steps_per_seed: 200
  seeds_per_state: 10
  darts_per_seed: 0
  repX_cycles: 3
  min_repX_acc: 0.4
  sweeps_per_cycle: 50
  snaps_per_cycle: 25
  attempts_per_sweep: 100
  steps_per_sweep: 50
  darts_per_sweep: 0
  phases: ['NAMD_Gas', 'NAMD_OBC', 'OpenMM_OBC2']
  sampling_importance_resampling: True
  solvation: Full
  keep_intermediate: True
  GMC_attempts: 0
  GMC_tors_threshold: 0.0
  delta_t_CD: 4.0

for dock:
  protocol: Adaptive
  therm_speed: 0.25
  T_HIGH: 450.0
  T_SIMMIN: 300.0
  T_TARGET: 300.0
  H_mass: 4.0
  fraction_CD: 0.5
  CD_steps_per_trial: 5
  delta_t: 4.0
  sampler: HMC
  steps_per_seed: 200
  seeds_per_state: 10
  darts_per_seed: 0
  repX_cycles: 4
  min_repX_acc: 0.4
  sweeps_per_cycle: 50
  snaps_per_cycle: 25
  attempts_per_sweep: 100
  steps_per_sweep: 50
  darts_per_sweep: 0
  phases: ['NAMD_Gas', 'NAMD_OBC', 'OpenMM_OBC2']
  sampling_importance_resampling: True
  solvation: Full
  keep_intermediate: True
  GMC_attempts: 0
  GMC_tors_threshold: 0.0
  temperature_scaling: Quadratic
  site: Sphere
  site_center: array([ 1.7416,  1.7416,  1.7416])
  site_max_R: 1.0
  site_density: 10.0
  pose: 0
  k_pose: 1000.0
  MCMC_moves: 1
  rmsd: True
  receptor_NAMD_Gas: array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]])
  receptor_NAMD_OBC: array([[     0.      ,      0.      ,      0.      ,      0.      ,
        -56747.052264,      0.      ,      0.      , -56747.052264]])
  delta_t_CD: 4.0

In [9]:
import time
time_i = time.time()
print self.get_rmsds(self.confs['dock']['samples'][-1][-1])
print time.time() - time_i


[ 0.02692  0.0229   0.02479  0.02656  0.02902]
0.027822971344

In [3]:
X = self.confs['dock']['samples'][-1][-1][1]
Y = self.confs['rmsd']

In [4]:
np.sqrt(np.sum(np.square(X[self.molecule.heavy_atoms,:] - Y[self.molecule.heavy_atoms,:]))/len(self.molecule.heavy_atoms))


Out[4]:
0.021945161698806698

In [5]:
from AlGDock.RMSD import hRMSD

In [6]:
get_rmsds = hRMSD(self._FNs['prmtop']['L'], self.molecule.inv_prmtop_atom_order, ref_conf = self.confs['rmsd'])

In [7]:
time_i = time.time()
get_rmsds(self.confs['dock']['samples'][-1][-1])
print time.time() - time_i


0.00917291641235

In [8]:
print get_rmsds(self.confs['dock']['samples'][-1][-1])


[0.022647446388939323, 0.021945161698806698, 0.022212560117523747, 0.027470998186581636, 0.024546696071719915]

In [ ]: