Dear Charles,
I tried both approaches (1) wrefine_Zn.py & (2) wrefine_Zn_cs.py (below), but
both give what might be the same error (with the errors at the bottom) and
might be due to the way the indentation of the “try’ block is written in my
scripts (4 spaces)?
end
""")
try:
protocol.addUnknownAtoms()
except protocol.CovalentViolation:
pass
could you give me some pointers?
I attach the directory with the scrips and input files.
Thanks again for all your help with this.
Best,
Mark
(1) making a psf file (wrefine_Zn.py), but it did run with
'protocol.initCoords("t.init”)\'
using:
#Nilges topology/parameters
xplor.command('evaluate ($par_nonbonded = "OPLSX")')
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
protocol.topology['protein'] ="waterRef/topallhdg5.3.pro.new"
protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
protocol.initStruct("ZF53.psf")
protocol.initCoords("t.init")
waterResname="TIP3"
protocol.initTopology('ion')
protocol.initParams(("protein","ion.par"))
protocol.initParams('extra/zn-finger.par')
(2) Using the script you attached (wrefine_Zn_cs.py).
Xplor outputs for (1) & (2):
=====================
(1) xplor wrefine_Zn.py
[TomCatVI:Projects/ZF53/Cyana2Xplor_Zn_auto_20231103_6] markkelly% xplor
wrefine_Zn.py
Xplor-NIH version 3.5
C.D. Schwieters, J.J. Kuszewski, Progr. NMR Spectr. 48, 47-62 (2006).
N. Tjandra, and G.M. Clore J. Magn. Res., 160, 66-74 (2003).
http://nmr.cit.nih.gov/xplor-nih based on X-PLOR 3.851 by A.T. Brunger
User: markkelly on: TomCatVI.a(darwin/x86_64 ) at: 27-Nov-23 07:16:30
[stdin](1): xplor.execfile('wrefine_Zn.py')
wrefine_Zn.py(2): xplor.requireVersion("2.26")
wrefine_Zn.py(4): inputStructuresGlob="refine_Zn_[0-9]*.sa"
wrefine_Zn.py(6): import glob
wrefine_Zn.py(7): inputStructures=glob.glob(inputStructuresGlob)
wrefine_Zn.py(11): simWorld.setRandomSeed( 785 )
wrefine_Zn.py(15): import protocol
wrefine_Zn.py(17): backbone="name C or name CA or name N or name O or name HN"
wrefine_Zn.py(20): xplor.command('evaluate ($par_nonbonded = "OPLSX")')
X-PLOR>evaluate ($par_nonbonded = "OPLSX")
EVALUATE: symbol $PAR_NONBONDED set to "OPLSX" (string)
X-PLOR>end
wrefine_Zn.py(21):
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
wrefine_Zn.py(22): protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
wrefine_Zn.py(23): protocol.topology['protein']
="waterRef/topallhdg5.3.pro.new"
wrefine_Zn.py(24): protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
wrefine_Zn.py(25): protocol.initStruct("ZF53.psf")
X-PLOR>struct @ZF53.psf end
ASSFIL: file ZF53.psf opened.
STRUcture>PSF
REMARKS FILENAME="ZF53.psf"
REMARKS autogenerated by psfGen.py
REMARKS DATE:26-Nov-23 10:48:49 created by user: markkelly
XPLOR: current counts (number in parenthesis is maximum)
NATOM= 458(MAXA= 800) NBOND= 462(MAXB= 800)
NTHETA= 822(MAXT= 1600) NGRP= 29(MAXGRP= 100)
NPHI= 680(MAXP= 800) NIMPHI= 255(MAXIMP= 400)
NDON= 73(MAXPAD= 100) NACC= 34(MAXPAD= 100)
NNB= 138(MAXNB= 200)
STRUcture> end
X-PLOR>end
wrefine_Zn.py(26): protocol.initCoords("t.init")
wrefine_Zn.py(27): waterResname="TIP3"
wrefine_Zn.py(28): protocol.initTopology('ion')
X-PLOR>rtf @TOPPAR:ion.top end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/ion.top opened.
RTFRDR>!contributed by Jack Howarth
RTFRDR>!updated for Xplor-NIH 2007/05/15 CDS
RTFRDR>
RTFRDR>remarks file toppar/ion.top
RTFRDR>remarks topology and masses for common ions
RTFRDR>remarks Dingle atom ion residues are given the name of the element.
RTFRDR>remarks By default the atom will be uncharged (eg. the residue MG will
RTFRDR>remarks contain the atom called MG with zero charge).
RTFRDR>remarks To use the charged species the charge state is appended to
RTFRDR>remarks the atom name (eg to use MG2+ the residue name is MG2, and the
RTFRDR>remarks atom name is MG+2 and has charge +2.0).
RTFRDR>remarks NOTE: not all ionic species are represented
RTFRDR>remarks PDA 02/09/99
RTFRDR>
RTFRDR>set echo=false end
EVALUATE: symbol $LOADFILE set to FALSE (logical)
NEXTCD: condition evaluated as false
EVALUATE: symbol $LOADFILE set to TRUE (logical)
NEXTCD: condition evaluated as true
EVALUATE: symbol $IONTOPOINIT set to TRUE (logical)
RTFRDR> end
X-PLOR>end
wrefine_Zn.py(29): protocol.initParams(("protein","ion.par"))
X-PLOR>param @TOPPAR:waterRef/parallhdg5.3.pro.new end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/waterRef/parallhdg5.3.pro.new
opened.
PARRDR>remark file protein-allhdg-ucl.param version UCL date 07-JUL-01
PARRDR>remark for file protein-allhdg-ucl.top version UCL date 14-MAR-00
PARRDR>remark for file protein-allhdg-dih-ucl.top version UCL date
07-JUL-01
PARRDR>remark Geometric energy function parameters for distance geometry and
PARRDR>remark simulated annealing.
PARRDR>remark Original author: Michael Nilges, EMBL Heidelberg
PARRDR>remark Modifications: Mark A. Williams, UCL London
PARRDR>remark last modification: NBFIX for hydrogens in OPLSX nonbonded
term. MN, 30-01-04
PARRDR>
PARRDR>set echo off message off end
PARRDR> end
X-PLOR>end
X-PLOR>param @TOPPAR:ion.par end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/ion.par opened.
PARRDR>!contributed by Jack Howarth
PARRDR>!updated for Xplor-NIH 2007/05/15 CDS
PARRDR>
PARRDR>remarks file toppar/ion.par
PARRDR>remarks nonbonded parameters for common ions
PARRDR>remarks new parameters derived from literature for single atom species
PARRDR>remarks PDA 02/09/99
PARRDR>
PARRDR>set echo=off end
EVALUATE: symbol $LOADFILE set to FALSE (logical)
NEXTCD: condition evaluated as false
EVALUATE: symbol $LOADFILE set to TRUE (logical)
NEXTCD: condition evaluated as true
EVALUATE: symbol $IONPARAMSINIT set to TRUE (logical)
PARRDR> end
X-PLOR>end
wrefine_Zn.py(30): protocol.initParams('extra/zn-finger.par')
X-PLOR>param @TOPPAR:extra/zn-finger.par end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/extra/zn-finger.par opened.
PARRDR>
PARRDR> bond s zn+2 500.0 2.30
PARRDR> bond NB zn+2 500.0 2.30 !FIX!
PARRDR> bond NA zn+2 500.0 2.30 !FIX!!!
PARRDR> bond NR1 zn+2 500.0 2.30 !FIX31012020
PARRDR>
PARRDR> angle s zn+2 s 500.0 109.0
PARRDR> angle NB zn+2 NB 500.0 109.0
PARRDR> angle NB zn+2 S 500.0 109.0
PARRDR> angle NA zn+2 NB 500.0 109.0 !FIX!
PARRDR>! angle NA zn+2 NA 500.0 109.0 !FIX!
PARRDR> angle NA zn+2 S 500.0 109.0 !FIX!
PARRDR> angle s zn+2 NR1 500.0 109.0 !FIX!31012020
PARRDR> angle NR2 zn+2 NR1 500.0 109.0 !FIX!31012020
PARRDR>
PARRDR> end
X-PLOR>end
wrefine_Zn.py(33): import psfGen
wrefine_Zn.py(35): xplor.command("""
X-PLOR>
X-PLOR>
X-PLOR> topology
RTFRDR>
RTFRDR> AUTO ANGLe=False DIHEdral=False END
RTFRDR>
RTFRDR>! patch to create Zn (Cys)2 (His)2
RTFRDR>!
RTFRDR>! 1 and 2 should be CYS
RTFRDR>!
RTFRDR>! 3 and 4 should be HIS
RTFRDR>
RTFRDR> presidue ZnC2H2
RESIDUE>
RESIDUE> delete atom 1hg end
RESIDUE>
RESIDUE> delete atom 2hg end
RESIDUE>
RESIDUE> delete atom 3he2 end
RESIDUE>
RESIDUE> delete atom 4he2 end
RESIDUE>
RESIDUE> add bond 5ZN+2 1sg
RESIDUE>
RESIDUE> add bond 5ZN+2 2sg
RESIDUE>
RESIDUE> add bond 5ZN+2 3ne2
RESIDUE>
RESIDUE> add bond 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 2SG
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 3ne2
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 2SG 5ZN+2 3ne2
RESIDUE>
RESIDUE> add angle 2SG 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 3NE2 5ZN+2 4ne2
RESIDUE>
RESIDUE> end
RTFRDR>
RTFRDR>end
X-PLOR>
X-PLOR>!add the Zn2 atom
X-PLOR>
X-PLOR>segment
SEGMENT>
SEGMENT>setup=true
SEGMENT>
SEGMENT>number=401
SEGMENT>
SEGMENT>chain
CHAIN>
CHAIN>sequence ZN2 end
CHAIN>
CHAIN>end
SEGMENT>
SEGMENT>end
SEGMNT: 401 residues were inserted into segment " "
SCRATC-warning: STORe selections erased.
XPLOR: current counts (number in parenthesis is maximum)
NATOM= 459(MAXA= 800) NBOND= 462(MAXB= 800)
NTHETA= 822(MAXT= 1600) NGRP= 30(MAXGRP= 100)
NPHI= 680(MAXP= 800) NIMPHI= 255(MAXIMP= 400)
NDON= 73(MAXPAD= 100) NACC= 34(MAXPAD= 100)
NNB= 138(MAXNB= 200)
X-PLOR>
X-PLOR>!do patch
X-PLOR>
X-PLOR>patch ZnC2H2 reference=1=(resid 6)
SELRPN: 11 atoms have been selected out of 459
PATCH>
PATCH> reference=2=(resid 3)
SELRPN: 11 atoms have been selected out of 459
PATCH>
PATCH> reference=3=(resid 19)
SELRPN: 18 atoms have been selected out of 459
PATCH>
PATCH> reference=4=(resid 23)
SELRPN: 18 atoms have been selected out of 459
PATCH>
PATCH> reference=5=(resid 401)
SELRPN: 1 atoms have been selected out of 459
PATCH>
PATCH>
PATCH>end
MAPIC: Atom numbers being modified
XPLOR: current counts (number in parenthesis is maximum)
NATOM= 455(MAXA= 800) NBOND= 462(MAXB= 800)
NTHETA= 822(MAXT= 1600) NGRP= 30(MAXGRP= 100)
NPHI= 680(MAXP= 800) NIMPHI= 255(MAXIMP= 400)
NDON= 69(MAXPAD= 100) NACC= 34(MAXPAD= 100)
NNB= 138(MAXNB= 200)
X-PLOR>
X-PLOR>
X-PLOR>
X-PLOR>end
wrefine_Zn.py(115): try:
wrefine_Zn.py(116): protocol.addUnknownAtoms()
[stdin](1): xplor.execfile('wrefine_Zn.py')
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId=" ", RESId="6 ", NAME="SG ", CHEMical="SH1E"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId=" ", RESId="3 ", NAME="SG ", CHEMical="SH1E"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId=" ", RESId="19 ", NAME="NE2 ", CHEMical="NH1 "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId=" ", RESId="23 ", NAME="NE2 ", CHEMical="NH1 "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BOMLEV= 0 reached. Program execution will be terminated.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Subroutine DIE called . Terminating
wrefine_Zn.py(117): except protocol.CovalentViolation:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/Applications/xplor-nih-3.5/python/trace.py", line 180, in run
exec(cmd, dict, dict)
File "<string>", line 1, in <module>
File "/Applications/xplor-nih-3.5/python/xplorInit.py", line 137, in execfile
exec(code, globals, locals)
File "wrefine_Zn.py", line 116, in <module>
protocol.addUnknownAtoms()
File "/Applications/xplor-nih-3.5/python/regularize.py", line 982, in
addUnknownAtoms
addUnknownAtoms_fast(verbose,
File "/Applications/xplor-nih-3.5/python/regularize.py", line 924, in
addUnknownAtoms_fast
fixupCovalentGeom(useVDW=1,maxIters=maxFixupIters,sel=unknownSel,
File "/Applications/xplor-nih-3.5/python/regularize.py", line 523, in
fixupCovalentGeom
minState = fixupLoop(ivm,maxIters,verbose,maxViols,minState)
File "/Applications/xplor-nih-3.5/python/regularize.py", line 217, in
fixupLoop
viols=covalentViols(lSim.fastCommand)
File "/Applications/xplor-nih-3.5/python/regularize.py", line 162, in
covalentViols
ret = [int(xplorCmd(
File "/Applications/xplor-nih-3.5/python/regularize.py", line 162, in
<listcomp>
ret = [int(xplorCmd(
File "/Applications/xplor-nih-3.5/python/wrappers/xplorSimulation.py", line
339, in fastCommand
return self.wrap().fastCommand(c,r)
File "/Applications/xplor-nih-3.5/python/wrappers/xplorWrap.py", line 92, in
fastCommand
return _xplorWrap.XplorWrap_fastCommand(self, *args, **kwargs)
SystemError: xplor-nih error: XplorWrapProc: error. XPLOR interpreter has died.
(1) xplor wrefine_Zn_cs.py
[TomCatVI:Projects/ZF53/Cyana2Xplor_Zn_auto_20231103_6] markkelly% xplor
wrefine_Zn_cs.py
Xplor-NIH version 3.5
C.D. Schwieters, J.J. Kuszewski, Progr. NMR Spectr. 48, 47-62 (2006).
N. Tjandra, and G.M. Clore J. Magn. Res., 160, 66-74 (2003).
http://nmr.cit.nih.gov/xplor-nih based on X-PLOR 3.851 by A.T. Brunger
User: markkelly on: TomCatVI.a(darwin/x86_64 ) at: 27-Nov-23 07:18:56
[stdin](1): xplor.execfile('wrefine_Zn_cs.py')
wrefine_Zn_cs.py(2): xplor.requireVersion("2.26")
wrefine_Zn_cs.py(4): inputStructuresGlob="refine_Zn_[0-9]*.sa"
wrefine_Zn_cs.py(6): import glob
wrefine_Zn_cs.py(7): inputStructures=glob.glob(inputStructuresGlob)
wrefine_Zn_cs.py(11): simWorld.setRandomSeed( 785 )
wrefine_Zn_cs.py(15): import protocol
wrefine_Zn_cs.py(17): backbone="name C or name CA or name N or name O or name
HN"
wrefine_Zn_cs.py(20): xplor.command('evaluate ($par_nonbonded = "OPLSX")')
X-PLOR>evaluate ($par_nonbonded = "OPLSX")
EVALUATE: symbol $PAR_NONBONDED set to "OPLSX" (string)
X-PLOR>end
wrefine_Zn_cs.py(21):
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
wrefine_Zn_cs.py(22): protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
wrefine_Zn_cs.py(23): protocol.topology['protein']
="waterRef/topallhdg5.3.pro.new"
wrefine_Zn_cs.py(24): protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
wrefine_Zn_cs.py(25): protocol.loadPDB(inputStructures[0])
loading pdb file: refine_Zn_0.sa seqToPSF: Warning: unsupported sequence
type: unknown: ANI ANI
[psf] PDBTool:read: atom not found in structure: ZN2 401 ZN+2
PDBTool:read: atom not found in structure: AXIS ANI 5000 X
PDBTool:read: atom not found in structure: AXIS ANI 5000 Y
PDBTool:read: atom not found in structure: AXIS ANI 5000 Z
PDBTool:read: atom not found in structure: AXIS ANI 5000 OO
PDBTool:read: atom not found in structure: AXIS ANI 5000 OO2
PDBTool:read: atom not found in structure: AXIS ANI 5000 PA1
PDBTool:read: atom not found in structure: AXIS ANI 5000 PA2
PDBTool:read: atom not found in structure: AXIS ANI 5001 X
PDBTool:read: atom not found in structure: AXIS ANI 5001 Y
PDBTool:read: atom not found in structure: AXIS ANI 5001 Z
PDBTool:read: atom not found in structure: AXIS ANI 5001 OO
PDBTool:read: atom not found in structure: AXIS ANI 5001 OO2
PDBTool:read: atom not found in structure: AXIS ANI 5001 PA1
PDBTool:read: atom not found in structure: AXIS ANI 5001 PA2
matchInexactAtomEntry: found no match for entry 401 ZN+2
matchInexactAtomEntry: found no match for entry AXIS 5000 X
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 Y
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 Z
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 OO
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 OO2
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 PA1
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5000 PA2
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 X
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 Y
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 Z
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 OO
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 OO2
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 PA1
pseudo atom
matchInexactAtomEntry: found no match for entry AXIS 5001 PA2
pseudo atom
initCoords: Warning: unable to read 1 pdb ATOM entries (nonpseudoatom)
initCoords: still 4 unknown atomic coordinates
[coords]
wrefine_Zn_cs.py(26): waterResname="TIP3"
wrefine_Zn_cs.py(27): protocol.initTopology('ion')
X-PLOR>rtf @TOPPAR:ion.top end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/ion.top opened.
RTFRDR>!contributed by Jack Howarth
RTFRDR>!updated for Xplor-NIH 2007/05/15 CDS
RTFRDR>
RTFRDR>remarks file toppar/ion.top
RTFRDR>remarks topology and masses for common ions
RTFRDR>remarks Dingle atom ion residues are given the name of the element.
RTFRDR>remarks By default the atom will be uncharged (eg. the residue MG will
RTFRDR>remarks contain the atom called MG with zero charge).
RTFRDR>remarks To use the charged species the charge state is appended to
RTFRDR>remarks the atom name (eg to use MG2+ the residue name is MG2, and the
RTFRDR>remarks atom name is MG+2 and has charge +2.0).
RTFRDR>remarks NOTE: not all ionic species are represented
RTFRDR>remarks PDA 02/09/99
RTFRDR>
RTFRDR>set echo=false end
EVALUATE: symbol $LOADFILE set to FALSE (logical)
NEXTCD: condition evaluated as false
EVALUATE: symbol $LOADFILE set to TRUE (logical)
NEXTCD: condition evaluated as true
EVALUATE: symbol $IONTOPOINIT set to TRUE (logical)
RTFRDR> end
X-PLOR>end
wrefine_Zn_cs.py(28): protocol.initParams(("protein","ion.par"))
X-PLOR>param @TOPPAR:ion.par end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/ion.par opened.
PARRDR>!contributed by Jack Howarth
PARRDR>!updated for Xplor-NIH 2007/05/15 CDS
PARRDR>
PARRDR>remarks file toppar/ion.par
PARRDR>remarks nonbonded parameters for common ions
PARRDR>remarks new parameters derived from literature for single atom species
PARRDR>remarks PDA 02/09/99
PARRDR>
PARRDR>set echo=off end
EVALUATE: symbol $LOADFILE set to FALSE (logical)
NEXTCD: condition evaluated as false
EVALUATE: symbol $LOADFILE set to TRUE (logical)
NEXTCD: condition evaluated as true
EVALUATE: symbol $IONPARAMSINIT set to TRUE (logical)
PARRDR> end
X-PLOR>end
wrefine_Zn_cs.py(29): protocol.initParams('extra/zn-finger.par')
X-PLOR>param @TOPPAR:extra/zn-finger.par end
ASSFIL: file /Applications/xplor-nih-3.5/toppar/extra/zn-finger.par opened.
PARRDR>
PARRDR> bond s zn+2 500.0 2.30
PARRDR> bond NB zn+2 500.0 2.30 !FIX!
PARRDR> bond NA zn+2 500.0 2.30 !FIX!!!
PARRDR> bond NR1 zn+2 500.0 2.30 !FIX31012020
PARRDR>
PARRDR> angle s zn+2 s 500.0 109.0
PARRDR> angle NB zn+2 NB 500.0 109.0
PARRDR> angle NB zn+2 S 500.0 109.0
PARRDR> angle NA zn+2 NB 500.0 109.0 !FIX!
PARRDR>! angle NA zn+2 NA 500.0 109.0 !FIX!
PARRDR> angle NA zn+2 S 500.0 109.0 !FIX!
PARRDR> angle s zn+2 NR1 500.0 109.0 !FIX!31012020
PARRDR> angle NR2 zn+2 NR1 500.0 109.0 !FIX!31012020
PARRDR>
PARRDR> end
X-PLOR>end
wrefine_Zn_cs.py(32): import psfGen
wrefine_Zn_cs.py(34): xplor.command("""
X-PLOR>
X-PLOR>
X-PLOR> topology
RTFRDR>
RTFRDR> AUTO ANGLe=False DIHEdral=False END
RTFRDR>
RTFRDR>! patch to create Zn (Cys)2 (His)2
RTFRDR>!
RTFRDR>! 1 and 2 should be CYS
RTFRDR>!
RTFRDR>! 3 and 4 should be HIS
RTFRDR>
RTFRDR> presidue ZnC2H2
RESIDUE>
RESIDUE> delete atom 1hg end
RESIDUE>
RESIDUE> delete atom 2hg end
RESIDUE>
RESIDUE> delete atom 3he2 end
RESIDUE>
RESIDUE> delete atom 4he2 end
RESIDUE>
RESIDUE> add bond 5ZN+2 1sg
RESIDUE>
RESIDUE> add bond 5ZN+2 2sg
RESIDUE>
RESIDUE> add bond 5ZN+2 3ne2
RESIDUE>
RESIDUE> add bond 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 2SG
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 3ne2
RESIDUE>
RESIDUE> add angle 1SG 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 2SG 5ZN+2 3ne2
RESIDUE>
RESIDUE> add angle 2SG 5ZN+2 4ne2
RESIDUE>
RESIDUE> add angle 3NE2 5ZN+2 4ne2
RESIDUE>
RESIDUE> end
RTFRDR>
RTFRDR>end
X-PLOR>
X-PLOR>!add the Zn2 atom
X-PLOR>
X-PLOR>segment
SEGMENT>
SEGMENT>setup=true
SEGMENT>
SEGMENT>number=401
SEGMENT>
SEGMENT>chain
CHAIN>
CHAIN>sequence ZN2 end
CHAIN>
CHAIN>end
SEGMENT>
SEGMENT>end
SEGMNT: 401 residues were inserted into segment " "
SCRATC-warning: STORe selections erased.
XPLOR: current counts (number in parenthesis is maximum)
NATOM= 459(MAXA= 800) NBOND= 462(MAXB= 800)
NTHETA= 822(MAXT= 1600) NGRP= 30(MAXGRP= 100)
NPHI= 680(MAXP= 800) NIMPHI= 255(MAXIMP= 400)
NDON= 73(MAXPAD= 100) NACC= 34(MAXPAD= 100)
NNB= 138(MAXNB= 200)
X-PLOR>
X-PLOR>!do patch
X-PLOR>
X-PLOR>patch ZnC2H2 reference=1=(resid 6)
SELRPN: 11 atoms have been selected out of 459
PATCH>
PATCH> reference=2=(resid 3)
SELRPN: 11 atoms have been selected out of 459
PATCH>
PATCH> reference=3=(resid 19)
SELRPN: 18 atoms have been selected out of 459
PATCH>
PATCH> reference=4=(resid 23)
SELRPN: 18 atoms have been selected out of 459
PATCH>
PATCH> reference=5=(resid 401)
SELRPN: 1 atoms have been selected out of 459
PATCH>
PATCH>
PATCH>end
MAPIC: Atom numbers being modified
XPLOR: current counts (number in parenthesis is maximum)
NATOM= 455(MAXA= 800) NBOND= 462(MAXB= 800)
NTHETA= 822(MAXT= 1600) NGRP= 30(MAXGRP= 100)
NPHI= 680(MAXP= 800) NIMPHI= 255(MAXIMP= 400)
NDON= 69(MAXPAD= 100) NACC= 34(MAXPAD= 100)
NNB= 138(MAXNB= 200)
X-PLOR>
X-PLOR>
X-PLOR>
X-PLOR>end
wrefine_Zn_cs.py(114): try:
wrefine_Zn_cs.py(115): protocol.addUnknownAtoms()
[stdin](1): xplor.execfile('wrefine_Zn_cs.py')
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId="A ", RESId="6 ", NAME="SG ", CHEMical="SH1E"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId="A ", RESId="3 ", NAME="SG ", CHEMical="SH1E"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId="A ", RESId="19 ", NAME="NE2 ", CHEMical="NH1 "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CODBON-ERR: missing bond parameters %%%%%%%%%%%%%%%%%%%%%%%%%%
bond energy constant missing.
target bond length missing.
ATOM1: SEGId=" ", RESId="401 ", NAME="ZN+2", CHEMical="ZN+2"
ATOM2: SEGId="A ", RESId="23 ", NAME="NE2 ", CHEMical="NH1 "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BOMLEV= 0 reached. Program execution will be terminated.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Subroutine DIE called . Terminating
wrefine_Zn_cs.py(116): except protocol.CovalentViolation:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/Applications/xplor-nih-3.5/python/trace.py", line 180, in run
exec(cmd, dict, dict)
File "<string>", line 1, in <module>
File "/Applications/xplor-nih-3.5/python/xplorInit.py", line 137, in execfile
exec(code, globals, locals)
File "wrefine_Zn_cs.py", line 115, in <module>
protocol.addUnknownAtoms()
File "/Applications/xplor-nih-3.5/python/regularize.py", line 982, in
addUnknownAtoms
addUnknownAtoms_fast(verbose,
File "/Applications/xplor-nih-3.5/python/regularize.py", line 924, in
addUnknownAtoms_fast
fixupCovalentGeom(useVDW=1,maxIters=maxFixupIters,sel=unknownSel,
File "/Applications/xplor-nih-3.5/python/regularize.py", line 523, in
fixupCovalentGeom
minState = fixupLoop(ivm,maxIters,verbose,maxViols,minState)
File "/Applications/xplor-nih-3.5/python/regularize.py", line 217, in
fixupLoop
viols=covalentViols(lSim.fastCommand)
File "/Applications/xplor-nih-3.5/python/regularize.py", line 162, in
covalentViols
ret = [int(xplorCmd(
File "/Applications/xplor-nih-3.5/python/regularize.py", line 162, in
<listcomp>
ret = [int(xplorCmd(
File "/Applications/xplor-nih-3.5/python/wrappers/xplorSimulation.py", line
339, in fastCommand
return self.wrap().fastCommand(c,r)
File "/Applications/xplor-nih-3.5/python/wrappers/xplorWrap.py", line 92, in
fastCommand
return _xplorWrap.XplorWrap_fastCommand(self, *args, **kwargs)
SystemError: xplor-nih error: XplorWrapProc: error. XPLOR interpreter has died.
On Nov 22, 2023, at 7:42 AM, Charles Schwieters <[email protected]> wrote:
Hi Mark--
In this case, it's easiest to create a PSF specific to the water
refinement parameters, and then, in the wrefine script, replace the
call to protocol.loadPDB with the pair
protocol.initStruct("file.psf")
protocol.initCoords("file.pdb")\
To generate the appropriate PSF, you modifify the generation script,
specifying water-refinement topology/parameters before loading
topology/parameters, by putting these lines at the beginning of the
script:
import protocol
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
protocol.topology['protein'] ="waterRef/topallhdg5.3.pro.new"
protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
Alternately, you could try do it all in the wrefine script by loading
coordinates twice, as in the attached script, but you will still need
the PSF for using any of Xplor-NIH's helper tools.
Please let me know if you run into any problems.
Charles
xplor.requireVersion("2.26")
inputStructuresGlob="refine_Zn_[0-9]*.sa"
import glob
inputStructures=glob.glob(inputStructuresGlob)
#this could also be a list of filenames
simWorld.setRandomSeed( 785 )
import protocol
backbone="name C or name CA or name N or name O or name HN"
#Nilges topology/parameters
xplor.command('evaluate ($par_nonbonded = "OPLSX")')
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
protocol.topology['protein'] ="waterRef/topallhdg5.3.pro.new"
protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
protocol.loadPDB(inputStructures[0])
waterResname="TIP3"
protocol.initTopology('ion')
protocol.initParams(("protein","ion.par"))
protocol.initParams('extra/zn-finger.par')
import psfGen
xplor.command("""
topology
AUTO ANGLe=False DIHEdral=False END
! patch to create Zn (Cys)2 (His)2
!
! 1 and 2 should be CYS
!
! 3 and 4 should be HIS
presidue ZnC2H2
delete atom 1hg end
delete atom 2hg end
delete atom 3he2 end
delete atom 4he2 end
add bond 5ZN+2 1sg
add bond 5ZN+2 2sg
add bond 5ZN+2 3ne2
add bond 5ZN+2 4ne2
add angle 1SG 5ZN+2 2SG
add angle 1SG 5ZN+2 3ne2
add angle 1SG 5ZN+2 4ne2
add angle 2SG 5ZN+2 3ne2
add angle 2SG 5ZN+2 4ne2
add angle 3NE2 5ZN+2 4ne2
end
end
!add the Zn2 atom
segment
setup=true
number=401
chain
sequence ZN2 end
end
end
!do patch
patch ZnC2H2 reference=1=(resid 6)
reference=2=(resid 3)
reference=3=(resid 19)
reference=4=(resid 23)
reference=5=(resid 401)
end
""")
try:
protocol.addUnknownAtoms()
except protocol.CovalentViolation:
pass
protocol.initCoords(inputStructures[0])
#protocol.initStruct("zc2h2_waterref.psf")
#protocol.loadPDB(inputStructures[0],deleteUnknownAtoms=True)
from potList import PotList
from simulationTools import MultRamp, StaticRamp, FinalParams
potList = PotList()
rampedParams=[]
# 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={}
# medium Da rhombicity
for (medium,Da,Rh) in [ ('t', -6.5, 0.62),
('b', -9.9, 0.23) ]:
oTensor = create_VarTensor(medium)
oTensor.setDa(Da)
oTensor.setRh(Rh)
media[medium] = oTensor
pass
# dipolar coupling restraints for protein amide NH.
#
# collect all RDCs in the rdcs PotList
#
# RDC scaling. Three possible contributions.
# 1) gamma_A * gamma_B / r_AB^3 prefactor. So that the same Da can be used
# for different expts. in the same medium. Sometimes the data is
# prescaled so that this is not needed. scale_toNH() is used for this.
# Note that if the expt. data has been prescaled, the values for rdc rmsd
# reported in the output will relative to the scaled values- not the expt.
# values.
# 2) expt. error scaling. Used here. A scale factor equal to 1/err^2
# (relative to that for NH) is used.
# 3) sometimes the reciprocal of the Da^2 is used if there is a large
# spread in Da values. Not used here.
#
##from rdcPotTools import create_RDCPot, scale_toNH
##rdcs = PotList('rdc')
##for (medium,expt,file, scale) in \
## [('t','NH' ,'tmv107_nh.tbl' ,1),
## ('t','NCO','tmv107_nc.tbl' ,.05),
## ('t','HNC','tmv107_hnc.tbl' ,.108),
## ('b','NH' ,'bicelles_new_nh.tbl' ,1),
## ('b','NCO','bicelles_new_nc.tbl' ,.05),
## ('b','HNC','bicelles_new_hnc.tbl',.108)
## ]:
## rdc = create_RDCPot("%s_%s"%(medium,expt),file,media[medium])
#1) scale prefactor relative to NH
# see python/rdcPotTools.py for exact calculation
# scale_toNH(rdc) - not needed for these datasets -
# but non-NH reported rmsd values will be wrong.
#3) Da rescaling factor (separate multiplicative factor)
# scale *= ( 1. / rdc.oTensor.Da(0) )**2
## rdc.setScale(scale)
## rdc.setShowAllRestraints(1) #all restraints are printed during analysis
## rdc.setThreshold(1.5) # in Hz
## rdcs.append(rdc)
## pass
##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():
calcTensorOrientation(media[medium])
rampedParams.append( StaticRamp("calcTensor(media['%s'])" % medium) )
pass
# set up NOE potential
noe=PotList('noe')
potList.append(noe)
from noePotTools import create_NOEPot
for (name,scale,file) in [('all',1,"noe.tbl"),
#add entries for additional tables
]:
pot = create_NOEPot(name,file)
# pot.setPotType("soft") - if you think there may be bad NOEs
pot.setScale(scale)
noe.append(pot)
rampedParams.append( MultRamp(2,30, "noe.setScale( VALUE )") )
# set up J coupling - with Karplus coefficients
from jCoupPotTools import create_JCoupPot
##jCoup = create_JCoupPot("jcoup","jna_coup.tbl",
## A=6.98,B=-1.38,C=1.72,phase=-60.0)
##potList.append(jCoup)
# Set up dihedral angles
from dihedralPotTools import create_DihedralPot
dihePot = create_DihedralPot('dihePot',"dihe.tbl")
potList.append( dihePot )
rampedParams.append( StaticRamp("dihePot.setScale(200)") )
from simulationTools import StructureLoop
def calcOneStructure( structData ):
from waterRefineTools import refine
refine(outFilename=structData.filename(),
potList=potList,
coolingParams=rampedParams,
keepWaters=True,
waterResname=waterResname)
pass
StructureLoop(pdbFilesIn=inputStructures,
pdbTemplate="SCRIPT_STRUCTURE.sa",
structLoopAction=calcOneStructure,
genViolationStats=True,
averagePotList=potList,
averageFitSel="resid 20:60 and name CA C N",
averageContext=FinalParams(rampedParams),
).run()
Hi Mark--
In this case, it's easiest to create a PSF specific to the water
refinement parameters, and then, in the wrefine script, replace the
call to protocol.loadPDB with the pair
protocol.initStruct("file.psf")
protocol.initCoords("file.pdb")\
To generate the appropriate PSF, you modifify the generation script,
specifying water-refinement topology/parameters before loading
topology/parameters, by putting these lines at the beginning of the
script:
import protocol
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
protocol.topology['protein'] ="waterRef/topallhdg5.3.pro.new"
protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
Alternately, you could try do it all in the wrefine script by loading
coordinates twice, as in the attached script, but you will still need
the PSF for using any of Xplor-NIH's helper tools.
Please let me know if you run into any problems.
Charles
xplor.requireVersion("2.26")
inputStructuresGlob="refine_Zn_[0-9]*.sa"
import glob
inputStructures=glob.glob(inputStructuresGlob)
#this could also be a list of filenames
simWorld.setRandomSeed( 785 )
import protocol
backbone="name C or name CA or name N or name O or name HN"
#Nilges topology/parameters
xplor.command('evaluate ($par_nonbonded = "OPLSX")')
protocol.parameters['protein']="waterRef/parallhdg5.3.pro.new"
protocol.parameters['water'] ="waterRef/parallhdg5.3.sol"
protocol.topology['protein'] ="waterRef/topallhdg5.3.pro.new"
protocol.topology['water'] ="waterRef/topallhdg5.3.sol"
protocol.loadPDB(inputStructures[0])
waterResname="TIP3"
protocol.initTopology('ion')
protocol.initParams(("protein","ion.par"))
protocol.initParams('extra/zn-finger.par')
import psfGen
xplor.command("""
topology
AUTO ANGLe=False DIHEdral=False END
! patch to create Zn (Cys)2 (His)2
!
! 1 and 2 should be CYS
!
! 3 and 4 should be HIS
presidue ZnC2H2
delete atom 1hg end
delete atom 2hg end
delete atom 3he2 end
delete atom 4he2 end
add bond 5ZN+2 1sg
add bond 5ZN+2 2sg
add bond 5ZN+2 3ne2
add bond 5ZN+2 4ne2
add angle 1SG 5ZN+2 2SG
add angle 1SG 5ZN+2 3ne2
add angle 1SG 5ZN+2 4ne2
add angle 2SG 5ZN+2 3ne2
add angle 2SG 5ZN+2 4ne2
add angle 3NE2 5ZN+2 4ne2
end
end
!add the Zn2 atom
segment
setup=true
number=401
chain
sequence ZN2 end
end
end
!do patch
patch ZnC2H2 reference=1=(resid 6)
reference=2=(resid 3)
reference=3=(resid 19)
reference=4=(resid 23)
reference=5=(resid 401)
end
""")
try:
protocol.addUnknownAtoms()
except protocol.CovalentViolation:
pass
protocol.initCoords(inputStructures[0])
#protocol.initStruct("zc2h2_waterref.psf")
#protocol.loadPDB(inputStructures[0],deleteUnknownAtoms=True)
from potList import PotList
from simulationTools import MultRamp, StaticRamp, FinalParams
potList = PotList()
rampedParams=[]
# 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={}
# medium Da rhombicity
for (medium,Da,Rh) in [ ('t', -6.5, 0.62),
('b', -9.9, 0.23) ]:
oTensor = create_VarTensor(medium)
oTensor.setDa(Da)
oTensor.setRh(Rh)
media[medium] = oTensor
pass
# dipolar coupling restraints for protein amide NH.
#
# collect all RDCs in the rdcs PotList
#
# RDC scaling. Three possible contributions.
# 1) gamma_A * gamma_B / r_AB^3 prefactor. So that the same Da can be used
# for different expts. in the same medium. Sometimes the data is
# prescaled so that this is not needed. scale_toNH() is used for this.
# Note that if the expt. data has been prescaled, the values for rdc rmsd
# reported in the output will relative to the scaled values- not the expt.
# values.
# 2) expt. error scaling. Used here. A scale factor equal to 1/err^2
# (relative to that for NH) is used.
# 3) sometimes the reciprocal of the Da^2 is used if there is a large
# spread in Da values. Not used here.
#
##from rdcPotTools import create_RDCPot, scale_toNH
##rdcs = PotList('rdc')
##for (medium,expt,file, scale) in \
## [('t','NH' ,'tmv107_nh.tbl' ,1),
## ('t','NCO','tmv107_nc.tbl' ,.05),
## ('t','HNC','tmv107_hnc.tbl' ,.108),
## ('b','NH' ,'bicelles_new_nh.tbl' ,1),
## ('b','NCO','bicelles_new_nc.tbl' ,.05),
## ('b','HNC','bicelles_new_hnc.tbl',.108)
## ]:
## rdc = create_RDCPot("%s_%s"%(medium,expt),file,media[medium])
#1) scale prefactor relative to NH
# see python/rdcPotTools.py for exact calculation
# scale_toNH(rdc) - not needed for these datasets -
# but non-NH reported rmsd values will be wrong.
#3) Da rescaling factor (separate multiplicative factor)
# scale *= ( 1. / rdc.oTensor.Da(0) )**2
## rdc.setScale(scale)
## rdc.setShowAllRestraints(1) #all restraints are printed during analysis
## rdc.setThreshold(1.5) # in Hz
## rdcs.append(rdc)
## pass
##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():
calcTensorOrientation(media[medium])
rampedParams.append( StaticRamp("calcTensor(media['%s'])" % medium) )
pass
# set up NOE potential
noe=PotList('noe')
potList.append(noe)
from noePotTools import create_NOEPot
for (name,scale,file) in [('all',1,"noe.tbl"),
#add entries for additional tables
]:
pot = create_NOEPot(name,file)
# pot.setPotType("soft") - if you think there may be bad NOEs
pot.setScale(scale)
noe.append(pot)
rampedParams.append( MultRamp(2,30, "noe.setScale( VALUE )") )
# set up J coupling - with Karplus coefficients
from jCoupPotTools import create_JCoupPot
##jCoup = create_JCoupPot("jcoup","jna_coup.tbl",
## A=6.98,B=-1.38,C=1.72,phase=-60.0)
##potList.append(jCoup)
# Set up dihedral angles
from dihedralPotTools import create_DihedralPot
dihePot = create_DihedralPot('dihePot',"dihe.tbl")
potList.append( dihePot )
rampedParams.append( StaticRamp("dihePot.setScale(200)") )
from simulationTools import StructureLoop
def calcOneStructure( structData ):
from waterRefineTools import refine
refine(outFilename=structData.filename(),
potList=potList,
coolingParams=rampedParams,
keepWaters=True,
waterResname=waterResname)
pass
StructureLoop(pdbFilesIn=inputStructures,
pdbTemplate="SCRIPT_STRUCTURE.sa",
structLoopAction=calcOneStructure,
genViolationStats=True,
averagePotList=potList,
averageFitSel="resid 20:60 and name CA C N",
averageContext=FinalParams(rampedParams),
).run()
########################################################################
To unsubscribe from the XPLOR-NIH list, click the following link:
http://list.nih.gov/cgi-bin/wa.exe?SUBED1=XPLOR-NIH&A=1