Gary Thompson | 11 Jun 2013 11:33
Picon
Gravatar

python potentials signatures and simulations

Hi charles and all

A quick question about potentials, python potentials and swig to aid my 
understanding

If i look for example  at PyPot the signature of its constructor is 
PyPot.__init__(self,name). However, the signature of the underlying 
potential is PyPot(const String& instanceName, PyObject* pyObject,  
Simulation* defaultSimulation); so my question is where does the 
Simulation* come from? My suspicion (from staring at the swig code; 
which is definitely painful) is that it is filled in by swig possibly 
using a default entry in the typemap, but I could be way off the mark 
here ;-)

regards
gary

--

-- 
-------------------------------------------------------------------
Dr Gary Thompson                  [Homans Lab Research Coordinator]

Astbury Centre for Structural Molecular Biology,
University of Leeds,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: garyt <at> bmb.leeds.ac.uk                   Fax  +44-113-3431935
-------------------------------------------------------------------
Gary Thompson | 10 Jun 2013 12:09
Picon
Gravatar

cross compiling xplor to another python version

Dear All (and charles!)

I am trying to re-compile xplor on my computer from the source. However, 
the version of python distributed with my linux distribution doesn't 
match the python that xplor nih is compiled against. How do I control 
which version of python xplor nih compiles against when using make?

regards
gary
Gary Thompson | 10 Jun 2013 12:08
Picon
Gravatar

problems with swig files


Dear All (most probably charles!)

I am trying to generate a swig wrapper for a c++ class using the 
following command line (I am doing this outside xplor currently)

swig -python -classptr -c++ -keyword -shadow -I/usr/include/python2.7 
-I/home/garyt/programs/xplor-nih/2.31.0/CDSlib 
-I/home/garyt/programs/xplor-nih/2.31.0/common 
-I/home/garyt/programs/xplor-nih/2.31.0/intVar 
-I/home/garyt/programs/xplor-nih/2.31.0/nmrPot 
-I/home/garyt/programs/xplor-nih/2.31.0/vmd 
-I/home/garyt/programs/xplor-nih/2.31.0/surfD 
-I/home/garyt/programs/xplor-nih/2.31.0/cminpack 
-I/home/garyt/programs/xplor-nih/2.31.0/sparta 
-I/home/garyt/programs/xplor-nih/2.31.0/devel 
-I/home/garyt/programs/xplor-nih/2.31.0/fortlib -I. 
-I/home/garyt/programs/xplor-nih/2.31.0/python -o 
pyEnsemblePotProxy_wrap.cpp pyEnsemblePotProxy.i

where  pyEnsemblePotProxy.i contains an empty(ish) potential class

// -*- c++ -*-
#ifndef PY_ENSEMBLE_POT_PROXY_H
#define PY_ENSEMBLE_POT_PROXY_H 1

#include "ensemblePot.hh"

struct _object;
typedef _object PyObject;
(Continue reading)

Katherine Edmonds | 5 Jun 2013 18:36
Favicon

Modeling a loop, without breaking bonds

Hi,

I have a model of a protein-protein complex, where several residues in a loop in the interface are undefined. I want to use xplor to add the loop residues, and put them in a location that does not clash with the rest of the protein or with the binding partner.

I used addAtoms2.py to generate the loop residues without disturbing the rest of the structure. The loop that was generated clashed with the binding partner, so I wanted to run some dynamics to move the loop into a more suitable position, again without disturbing the rest of the model.

I found the dock.py script has some features to treat the proteins as rigid bodies, and to prevent sidechain movement, while allowing some movement in a defined part of the protein(s). So I'm trying to use the dock.py script, with lines like:
dyn_fix.group( 'resid 1022:1237')
dyn_fix.group( 'resid 1238:1329' )
dyn_fix.group( 'resid 1338:1428' )
dyn_fix.fix( 'resid 1022:1237')
dyn_fix.fix( 'resid 1238:1329')
dyn_fix.fix( 'resid 1338:1428' )

I'm trying to set the protein without the modified loop as fixed, and the N-terminal and C-terminal parts of the other protein, before and after the loop as a fixed group, and let the loop itself be moved. However, no matter what I do, a bond at the C-terminal end of the loop is always broken.

Is there a more appropriate approach to finding a possible conformation of a flexible loop, while keeping all other residues in a model fixed?

Thank you,
Katie Edmonds
_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih
Fernando Correa | 4 Jun 2013 23:30
Favicon

PRE homodimer complex

Hi everyone,

I am trying to backcalculate PREs from a pdb structure, in which I
have a homodimer forming a complex with another protein. The paramagnetic
centers are attached to the homodimer.

I tried setting npc = 2 (pre.setNpc(2)) at runSBMF() function, using calc.py
script as in (eginput/pre/fitting). I got the following error message:

SystemError: xplor-nih error: Change npc to 1

I am not sure what additional parameter should be adjusted.

For the input table (as zeros.tbl of eginput/pre/fitting), I wrote in the
following manner:

assign (resid 605 and name NS1) (resid 362 and name HN) 1.00 1.00
assign (resid 1605 and name NS1) (resid 362 and name HN) 1.00 1.00

I am not sure if that is the right way write the table for two paramagnetic centers.

Or should I consider them as some sort of pseudo ambiguous restraint:

assign ((resid 605 and name NS1) or (resid 1605 and name NS1))
    (resid 362 and name HN) 1.0 1.0

Any help would be appreciated.

Fernando




UT Southwestern Medical Center
The future of medicine, today.
_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih
Earl, Christopher | 29 May 2013 19:27
Picon
Picon
Favicon

Thioether linkage/lanthionine

Hi all,

My apologies, There was a mistake in my last message, please exchange "thioester for thioether":

I am having some trouble producing the structure of a lanthionine-containing peptide. I have taken the
approach of supplying the peptide sequence including cysteines and adding a presidue to the topology
file (essentially like using DISU but including the removal of an S):

presidue THET                ! Thioether linkage  ...CYS - S - CYS...     
  group
    delete    atom 1HG               end  	
  group
    delete    atom 2HG               end
    delete    atom 2SG               end
    modify    atom 2CB  type=CT      end

  add bond 1SG 2CB 

  add angle 1CB 1SG 2CB

end

I then get the following error:

%HBUILD-ERR: error building hydrogen for donor:
"    5   CYS CB  "
 Some bond angles are missing in the topology
 and parameter file that involve this donor atom.
 %<HBUILD>-ERR: Unknown angles involving donor atom.

I would greatly appreciate any help you can offer.

Thanks,

Chris
Earl, Christopher | 29 May 2013 18:39
Picon
Picon
Favicon

Thioester linkage/lanthionine

Hi all,

I am having some trouble producing the structure of a lanthionine-containing peptide. I have taken the
approach of supplying the peptide sequence including cysteines and adding a presidue to the topology
file (essentially like using DISU but including the removal of an S):

presidue THES                ! Thioester linkage  ...CYS - S - CYS...     
  group
    delete    atom 1HG               end         
  group
    delete    atom 2HG               end
    delete    atom 2SG               end

  add bond 1SG 2CB 

  add angle 1CB 1SG 2CB

end

I then get the following error:

%HBUILD-ERR: error building hydrogen for donor:
"    5   CYS CB  "
 Some bond angles are missing in the topology
 and parameter file that involve this donor atom.
 %<HBUILD>-ERR: Unknown angles involving donor atom.

I would greatly appreciate any help you can offer.

Thanks,

Chris
wangtian780 | 21 May 2013 05:42
Picon
Favicon

Deviations from idealized geometry

Hi All,

how to generate deviation from idealized geomtry in xplor(such as bond)?  should we compare with an X-ray structure as an idealized geomtry?
 
Many thanks. 
_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih
santhu kumar | 13 May 2013 23:38
Picon

barrier: error reading from process 1 .. Error during ensemble refinement

Hello Charles,

I have written a script for ensemble refinement based on dna_ensembe/ensemble.py and gb1_rdc/refine.py. The script is along with the mail below. 

When running the simulation, one of the child process stops working and in the log files I found this line :
barrier: error reading from process 1
The simulation proceeds with computing only one structure. 

While the killed process has :
StructureLoop: this process has no work. Exiting...

Can you tell me where am I going wrong ? The below script is executed this way: 
xplor -smp 2 -py -o refine.out 5050.py

xplor.requireVersion("2.17")

numberOfStructures=1
ensembleSize=2           # number of ensemble members
outFilename = "SCRIPT_%d_STRUCTURE_MEMBER.sa" % ensembleSize


import protocol
protocol.initRandomSeed()

command = xplor.command
protocol.initParams("protein")

#load pdb and covalently minimize the protein
protocol.loadPDB("model.pdb")
xplor.simulation.deleteAtoms("not known")

protocol.fixupCovalentGeom(maxIters=1000,useVDW=1)


#initilize ensemble simulations
from ensembleSimulation import EnsembleSimulation
esim = EnsembleSimulation("ensemble",ensembleSize)

#
# a PotList contains a list of potential terms. This is used to specify which
# terms are active during refinement.
#
from potList import PotList
potList = PotList()
# parameters to ramp up during the simulated annealing protocol
#
from simulationTools import MultRamp, StaticRamp, InitialParams

rampedParams=[]
highTempParams=[]

# orientation Tensor - used with the dipolar coupling term
#  one for each medium
#   For each medium, specify a name, and initial values of Da, Rh.
#
from varTensorTools import create_VarTensor
media={}
expdatadir = 'xplor5050/'
import os,re
mediaList = open(expdatadir+'mediaList.txt').readlines()
#media[medium] = create_VarTensor(medium)
for mediaName in mediaList:
    mediaName = mediaName.strip()
    if not mediaName in media.keys():
        media[mediaName] = create_VarTensor(mediaName)
            

from rdcPotTools import create_RDCPot, scale_toNH,correctGyromagneticSigns
correctGyromagneticSigns()
bondTypes = ['NH','CAC','CAHA','CN','CHN']
#xplorBondTypes = {'NH':'NH','CN':'NCO','HNC':'CHN','CAHA':'CAHA', 'CAC':'CACO'}
#bondTypeScales = {'NH':15, 'CAHA':3, 'CN':100, 'CAC':100, 'CHN':3}
bondTypeScales = {'NH':1, 'CAHA':1, 'CN':1, 'CAC':1, 'CHN':1}
rdcs = PotList('rdc') 
for medium in media.keys():
    #rdc = create_RDCPot("%s_%s"%(medium,expt),file,media[medium])
    for btype in bondTypes:
        if os.path.isfile(expdatadir+medium+'_'+btype+'.tbl'):
            rdc = create_RDCPot("%s_%s"%(medium,btype),expdatadir+medium+'_'+btype+'.tbl',media[medium])    
            rdc.setScale(bondTypeScales[btype])
            rdc.setAveType("sum")    # its set to be average by default         
            rdc.setShowAllRestraints(1)            
            rdcs.append(rdc)


potList.append(rdcs)
rampedParams.append( MultRamp(0.05,5.0, "rdcs.setScale( VALUE )") )

# calc. initial tensor orientation
# and setup tensor calculation during simulated annealing
#
from varTensorTools import calcTensorOrientation, calcTensor
for medium in media.keys():
    calcTensor(media[medium])
    rampedParams.append( StaticRamp("calcTensor(media['%s'])" % medium) )
    pass

#add other things about NOE later
from avePot import AvePot
from xplorPot import XplorPot
potList.append( AvePot(XplorPot,'VDW') )
rampedParams.append( StaticRamp("protocol.initNBond()") )
rampedParams.append( MultRamp(0.9,0.8,
                              "command('param nbonds repel VALUE end end')") )
rampedParams.append( MultRamp(.004,4,
                              "command('param nbonds rcon VALUE end end')") )
                              
potList.append( AvePot(XplorPot,"BOND") )
potList.append( AvePot(XplorPot,"ANGL") )
potList['ANGL'].setThreshold( 5 )
rampedParams.append( MultRamp(0.4,1,"potList['ANGL'].setScale(VALUE)") )
potList.append( AvePot(XplorPot,"IMPR") )
potList['IMPR'].setThreshold( 5 )
rampedParams.append( MultRamp(0.1,1,"potList['IMPR'].setScale(VALUE)") )

# Give atoms uniform weights, except for the anisotropy axis
#
protocol.massSetup()


# IVM setup
#   the IVM is used for performing dynamics and minimization in torsion-angle
#   space, and in Cartesian space.
#
from ivm import IVM
dyn = IVM()

dyn.reset()

for m in media.values():
    m.setFreedom("varyDa, varyRh")      #vary tensor Rh, Da, vary orientation
protocol.torsionTopology(dyn)


#for ending with cartesian minimzation
minc = IVM()
protocol.initMinimize(minc)

for m in media.values():
    m.setFreedom("varyDa, varyRh")    #allow all tensor parameters float here
    pass
    
protocol.cartesianTopology(minc)
# object which performs simulated annealing
#
from simulationTools import AnnealIVM
init_t  = 3000.     # Need high temp and slow annealing to converge
cool = AnnealIVM(initTemp =init_t,
                 finalTemp=25,
                 tempStep =12.5,
                 ivm=dyn,
                 rampedParams = rampedParams)

#criteria to accept a structure
def accept(potList):
    """
    return True if current structure meets acceptance criteria
    """
    #if potList['noe'].violations()>0:
    #    return False
    if potList['rdc'].rms()>1.2: #this might be tightened some
        return False
    #if potList['CDIH'].violations()>0:
    #    return False
    if potList['BOND'].violations()>0:
        return False
    if potList['ANGL'].violations()>0:
        return False
    if potList['IMPR'].violations()>1:
        return False
    
    return True

def calcOneStructure(loopInfo):
    """ this function calculates a single structure, performs analysis on the
    structure, and then writes out a pdb file, with remarks.
    """

    # initialize parameters for high temp dynamics.
    InitialParams( rampedParams )
    # high-temp dynamics setup - only need to specify parameters which
    #   differfrom initial values in rampedParams
    InitialParams( highTempParams )

    # high temp dynamics
    #
    protocol.initDynamics(dyn,
                          potList=potList, # potential terms to use
                          bathTemp=init_t,
                          initVelocities=1,
                          finalTime=10,    # stops at 10ps or 5000 steps
                          numSteps=5000,   # whichever comes first
                          printInterval=100)

    dyn.setETolerance( init_t/100 )  #used to det. stepsize. default: t/1000 
    dyn.run()

    # initialize parameters for cooling loop
    InitialParams( rampedParams )


    # initialize integrator for simulated annealing
    #
    protocol.initDynamics(dyn,
                          potList=potList,
                          numSteps=100,       #at each temp: 100 steps or
                          finalTime=.2 ,       # .2ps, whichever is less
                          printInterval=100)

    # perform simulated annealing
    #
    cool.run()
              
              
    # final torsion angle minimization
    #
    protocol.initMinimize(dyn,
                          printInterval=50)
    dyn.run()

    # final all- atom minimization
    #
    protocol.initMinimize(minc,
                          potList=potList,
                          dEPred=10)
    minc.run()

    #do analysis and write structure
    loopInfo.writeStructure(potList)
    pass


from simulationTools import StructureLoop, FinalParams
StructureLoop(numStructures=numberOfStructures,
              pdbTemplate=outFilename,
              structLoopAction=calcOneStructure,
              genViolationStats=1,
              averagePotList=potList,
              averageTopFraction=0.5, #report only on best 50% of structs
              averageAccept=accept,   #only use structures which pass accept()
              averageContext=FinalParams(rampedParams),
              averageFilename="SCRIPT_ave.pdb",    #generate regularized ave structure
              averageFitSel="name CA",
              averageCompSel="not resname ANI and not name H*"     ).run()

Thanks for your support,
Santhosh

_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih
Marie-Laurence Tremblay | 13 May 2013 16:45
Picon

exporting DIHE from water refinement script

Hello, 

I've been doing some water refinements using the script from the gb1_rdc example in eginput and I get this term DIHE (it wasn't present while running the annealing script) that has rather large energies comparatively to noes or CDIH.  How do I output those violations or how do I know what's creating this term.  Shouldn't it be part of the IMPR term?

Thanks, 
Marie

--
Marie-Laurence Tremblay, PhD candidate
Department of Biochemistry and Molecular Biology
Dalhousie University
5850 College St.
Halifax NS, Canada
B3H 1X5
mltremblay <at> dal.ca
Phone:902-494-4812
_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih
santhu kumar | 11 May 2013 00:08
Picon

Multiple RDC datasets

Hello Charles,

I think I know the answer for these questions but just want to confirm with you.

In refinement of structures using RDC's, we use 4 pseudo-atoms to define an axis and these are part of the PDB also. For more than one RDC dataset, we should have more than such 4 pseudo-atoms. Now the questions are :

1). Should the four atoms be created as a axis? I mean should O-XX be perpendicular to O-YY and so on? Or could it be any four atoms far away from the protein? In the examples, they are mostly perpendicular. 

2). In case of multiple RDC constraints, would there be a problem if I overlap many such pseudo-atoms on top of each other?
eg : 
ATOM    856  X   ANI   500     322.383 -47.025 154.522  1.00  3.06          
ATOM    857  Y   ANI   500     322.080 -50.957 156.088  1.00  4.37          
ATOM    858  Z   ANI   500     323.128 -50.368 152.019  1.00  4.35          
ATOM    859  OO  ANI   500     324.205 -49.405 154.647  1.00  4.04          
ATOM    860  X   ANI   600     322.383 -47.025 154.522  1.00  3.06          
ATOM    861  Y   ANI   600     322.080 -50.957 156.088  1.00  4.37          
ATOM    862  Z   ANI   600     323.128 -50.368 152.019  1.00  4.35          
ATOM    863  OO  ANI  600     324.205 -49.405 154.647  1.00  4.04          

Would this be fine as per VDW calculations or anything.  I am hoping that they could overlap as I have many RDC datasets and it would be tricky to create many such random points. 

Thanks a lot,
Santhosh

_______________________________________________
Xplor-nih mailing list
Xplor-nih <at> nmr.cit.nih.gov
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih

Gmane