[Chimera-users] How to write pdb file by script?

Eric Pettersen pett at cgl.ucsf.edu
Tue Oct 24 14:07:22 PDT 2017


Hi Pin,
	You can replace these lines:

from WriteMol2 import writeMol2
writeMol2(models, "10gs_protein_charged.pdb”)

with: 

from Midas import write
write(models[0], None, "10gs_protein_charged.pdb”)

—Eric

	Eric Pettersen
	UCSF Computer Graphics Lab


> On Oct 23, 2017, at 11:58 PM, 陈品 <chenp85 at mail.sysu.edu.cn> wrote:
> 
> Dear developers,
> 
> I use CHIMERA to add charge into protein file from PDB format to mol2 format, i found that the script:
> 
> $ cat prep_protein.py
> import chimera
> from DockPrep import prep
> models = chimera.openModels.list(modelTypes=[chimera.Molecule])
> prep(models)
> from WriteMol2 import writeMol2
> writeMol2(models, "10gs_protein_charged.pdb")
> 
> $ ~/.local/UCSF-Chimera64-1.12rc/bin/chimera  --nogui 10gs_protein.pdb prep_protein.py
> 
> This script works well, but how to write PDB format file. I can not find WriteDPB function. How Can i write the data to PDB format?
> 
> Kind Regards.
> 
> Pin.
> 
> 
> --------------------------------------------------------------------------------
> 本邮件及其附件含有发送给特定个人和用于特定目的的保密信息。如果您不是预期的收件人,请立即删除本邮件并通知发件人。严禁任何非预期的收件人使用、传播、分发或复制本邮件或其附件。
> This email and its attachments may contain confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this email and notify the sender immediately. Any use, dissemination, distribution, or copying of this email or its attachments by persons other than the intended recipient(s), is strictly prohibited.
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20171024/3eeb26d5/attachment.html>


More information about the Chimera-users mailing list