Hello Charles,

Thanks for your fix on the script, now this problem is solved. 

But I met an new problem using the script for a protein-DNA complex. I modified 
the script as attachment gen1.py, but in output PDB, both HD1 and HE2 of 2nd 
HIS been deleted (I want to delete HE2 only). While I used your script 
(attachment gen.py), the problem is fixed, but there is error as below in later 
structure calculation: 

> "SystemError: xplor-nih error: error reading restraint: selection string  
> resid 124   and name  HN''  selects no atoms
> PyInterp::command: error executing: >execfile('newRefine_c.py')<

So I compared two output PDBs, there are some different atom names between 
them. 

The difference between there two scripts only as follows:

in your script:

> import psfGen
>psfGen.pdbToPSF(open('complex1.pdb').read(),startResid=1)

I changed this into:

>import psfGen
>psfGen.seqToPSF(open('protein.seq').read(),startResid=1)

>from atomSelAction import SetProperty

>#dna
>#
>psfGen.seqToPSF("./nuc.seq",startResid=101,seqType='dna',
                customRename=True)


>#break

>psfGen.seqToPSF("./nuc2.seq",startResid=113,seqType='dna',
                customRename=True)
 
So can you help me modify the new script (gen1_py)  to fix the problem? Thanks 
very much.

Best regards,
Qianwen





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

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

simWorld.setRandomSeed(5521)

proteinSeq="""
 three character residue name sequence
"""

import psfGen
psfGen.seqToPSF(open('protein.seq').read(),startResid=1)

from atomSelAction import SetProperty

#dna
#
psfGen.seqToPSF("./nuc.seq",startResid=101,seqType='dna',
                customRename=True)


#break

psfGen.seqToPSF("./nuc2.seq",startResid=113,seqType='dna',
                customRename=True)


import protocol
protocol.initTopology('ion')
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 3hd1 end 
  
  delete atom 4he2 end 

  add bond 5ZN+2 1sg 

  add bond 5ZN+2 2sg 

  add bond 5ZN+2 3nd1 

  add bond 5ZN+2 4ne2 

  add angle 1SG  5ZN+2 2SG 

  add angle 1SG  5ZN+2 3nd1 

  add angle 1SG  5ZN+2 4ne2 

  add angle 2SG  5ZN+2 3nd1

  add angle 2SG  5ZN+2 4ne2 
  
  add angle 3nd1 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 37)              

 reference=2=(resid 42)               

 reference=3=(resid 66)              

 reference=4=(resid 68)              

 reference=5=(resid 401)
end 
 


""")

protocol.initCoords("complex1.pdb")
protocol.initParams("zn-finger_new.par")

protocol.addUnknownAtoms()

# This next line will change the coordinates somewhat, and may not be a
# good idea.
#
protocol.fixupCovalentGeom(maxIters=100,useVDW=1)


xplor.command("write psf output=new.psf end")
protocol.writePDB("new.pdb")






simWorld.setRandomSeed(5521)

proteinSeq="""
 three character residue name sequence
"""

import psfGen
psfGen.pdbToPSF(open('complex1.pdb').read(),startResid=1)

import protocol
protocol.initTopology('ion')
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 3hd1 end 
  
  delete atom 4he2 end 

  add bond 5ZN+2 1sg 

  add bond 5ZN+2 2sg 

  add bond 5ZN+2 3nd1 

  add bond 5ZN+2 4ne2 

  add angle 1SG  5ZN+2 2SG 

  add angle 1SG  5ZN+2 3nd1 

  add angle 1SG  5ZN+2 4ne2 

  add angle 2SG  5ZN+2 3nd1

  add angle 2SG  5ZN+2 4ne2 
  
  add angle 3nd1 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 37)              

 reference=2=(resid 42)               

 reference=3=(resid 66)              

 reference=4=(resid 68)              

 reference=5=(resid 401)
end 
 


""")

protocol.initCoords("complex1.pdb")
protocol.initParams("zn-finger_new.par")

protocol.addUnknownAtoms()

# This next line will change the coordinates somewhat, and may not be a
# good idea.
#
protocol.fixupCovalentGeom(maxIters=100,useVDW=1)


xplor.command("write psf output=new.psf end")
protocol.writePDB("new.pdb")





Reply via email to