Hi Mark-- It seems like indentation got lost in email formatting. The script here:
https://bit.niddk.nih.gov/out/toMark-20231113.py 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). > 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: 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
