Dear Charles,

I don't get the indent syntax error anymore with your script, but I now get 
what looks like errors for missing '%CODBON-ERR: missing bond parameters 
%%%%%%%%%%%%%%%%%%%%%%%%%%"

for what looks like the ligands to the Zn (3, 6, 19 & 23) - see below

I attach your script (I changed to extension to .txt).

Best,

Mark

 [TomCatVI:Projects/ZF53/Cyana2Xplor_Zn_auto_20231103_2] markkelly% xplor 
20231113.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.l(darwin/x86_64 )  at: 13-Nov-23 06:45:43
[stdin](1): xplor.execfile('20231113.py')
20231113.py(2): xplor.parseArguments()
20231113.py(4): import protocol
20231113.py(5): protocol.loadPDB("model.pdb")
loading pdb file: model.pdb   [psf] initCoords: still 7 unknown atomic 
coordinates
 [coords]
20231113.py(6): 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
20231113.py(8): import psfGen
20231113.py(10): 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 3SG 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=         195(MAXGRP=       200)
 NPHI=          52(MAXP=         100)  NIMPHI=       258(MAXIMP=       400)
 NDON=           0(MAXPAD=         0)  NACC=           0(MAXPAD=         0)
 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
 %PATCH-ERR: angle 3SG   5ZN+2 4NE2  not found
 XPLOR: current counts (number in parenthesis is maximum)
 NATOM=        455(MAXA=         800)  NBOND=        462(MAXB=         800)
 NTHETA=       821(MAXT=        1600)  NGRP=         195(MAXGRP=       200)
 NPHI=          52(MAXP=         100)  NIMPHI=       256(MAXIMP=       400)
 NDON=           0(MAXPAD=         0)  NACC=           0(MAXPAD=         0)
 NNB=          138(MAXNB=        200)
 X-PLOR>
 X-PLOR>
 X-PLOR>
 X-PLOR>end
20231113.py(90): try:
20231113.py(91):     protocol.addUnknownAtoms()
[stdin](1): xplor.execfile('20231113.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="S   "
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %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="S   "
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %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="NB  "
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %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="NB  "
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 BOMLEV=    0 reached.  Program execution will be terminated.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 Subroutine DIE called . Terminating
20231113.py(92): 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 "20231113.py", line 91, 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.
________________________________
From: Charles Schwieters <[email protected]>
Sent: Monday, November 13, 2023 6:02
To: Kelly, Mark <[email protected]>
Cc: Xplor-NIH mailing list <[email protected]>; Kelly, Mark 
<[email protected]>
Subject: Re: Refine CYANA Structure with Cys2, His2 ZN finger


Hi Mark--

  It seems like indentation got lost in email formatting. The script
here:

  
https://urldefense.com/v3/__https://bit.niddk.nih.gov/out/toMark-20231113.py__;!!LQC6Cpwp!ppON2o9BBTCMUJ-qBTgIU-LS2P-K6ticD0gvgc8A4FuoYXxX6HHImCOm0pe-yJ69zxLNsGeZ59Zzm66zxKDT_t4$

should work ok.

Charles

On Sun, 12 Nov 2023 23:00:24 -0500,
Kelly, Mark wrote:
>
> Dear Charles,
>
> I incorporated the additional commands, but get a syntax error (below). I 
> attach the current script (bottom). Did I insert the new commands in the 
> right place?
>
> Best wishes,
>
> Mark
>
>
>
> [TomCatVI:Projects/ZF53/Cyana2Xplor_Zn_auto_20231103_2] markkelly% xplor 
> C2H2_4.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).
>  
> https://urldefense.com/v3/__http://nmr.cit.nih.gov/xplor-nih__;!!LQC6Cpwp!ppON2o9BBTCMUJ-qBTgIU-LS2P-K6ticD0gvgc8A4FuoYXxX6HHImCOm0pe-yJ69zxLNsGeZ59Zzm66zNJJAx0Q$
>          based on X-PLOR 3.851 by A.T. Brunger
>
>  User: markkelly    on: TomCatVI.l(darwin/x86_64 )  at: 12-Nov-23 19:55:04
> [stdin](1): xplor.execfile('C2H2_4.py')
> 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 136, in 
> execfile
>     code = compile(fh.read(), filename, 'exec')
>   File "C2H2_4.py", line 91
>     except protocol.CovalentViolation::
>     ^
> SyntaxError: invalid syntax
>  HEAP:   maximum use=   628650 current use=   616818
>  X-PLOR: total CPU time=      0.1813 s
>  X-PLOR: entry time at 19:55:04 12-Nov-23
>  X-PLOR: exit time at 19:55:05 12-Nov-23
>
> [TomCatVI:Projects/ZF53/Cyana2Xplor_Zn_auto_20231103_2] markkelly% cat 
> C2H2_4.py
>
> xplor.parseArguments()
>
> import protocol
> protocol.loadPDB("model.pdb")
> protocol.initTopology('ion')
>
> 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 3SG 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
>
>
> """)
>
> protocol.addUnknownAtoms()
> except protocol.CovalentViolation::
> pass
>
>
> xplor.command("write psf output=test.psf end")
>
> from pdbTool import PDBTool
> PDBTool("test.pdb").write()
>
>
>
>
> > On Nov 12, 2023, at 9:21 AM, Charles Schwieters <[email protected]> 
> > wrote:
> >
> >
> > Hi Mark--
> >
> >>
> >> thanks for the corrections to the script. I am seeing that the ZN
> >> atom does not have valid coordinates (below). I pasted my current
> >> script below. Also, is there something I need to do to fix the same
> >> errors for the termini, or should I not worry about them.
> >>
> >
> > Please try adding this snippet before writing out the coordinates:
> >
> > try:
> >    protocol.addUnknownAtoms()
> > except protocol.CovalentViolation::
> >    pass
> >
> >
> > Charles
>

########################################################################

To unsubscribe from the XPLOR-NIH list, click the following link:
http://list.nih.gov/cgi-bin/wa.exe?SUBED1=XPLOR-NIH&A=1
xplor.parseArguments()

import protocol
protocol.loadPDB("model.pdb")
protocol.initTopology('ion')

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 3SG 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


xplor.command("write psf output=test.psf end")

from pdbTool import PDBTool
PDBTool("test.pdb").write()


########################################################################

To unsubscribe from the XPLOR-NIH list, click the following link:
http://list.nih.gov/cgi-bin/wa.exe?SUBED1=XPLOR-NIH&A=1

Reply via email to