Ah I see. So that setting is for setting how bonds are interpreted when
opening a PDB, the setting you are looking for is pdb_connect_all. Again,
the setting needs to be sent in as a string, as with most things using the
PyMol API.

I made a simple script to make sure it works:

from pymol import cmd
import sys
cmd.load(sys.argv[1])
cmd.set("pdb_conect_all", "on")
cmd.save(sys.argv[1][:-4] + "_With_Connect.pdb", "all")


Running the command "pymol -c script.py -- XXXX.pdb" will then generate the
file "XXXX_With_Connect.pdb".
Hope this is what you are looking for!


On Sat, Mar 21, 2020 at 8:14 PM Marcelo Depólo <marcelodep...@gmail.com>
wrote:

> Hello there!
>
> I am running a python script within pymol and I am trying to set
> connect_mode to 1 by using:
>
> cmd.set(connect_mode,1)
>
> But pymol 1.8.4 does not recognize 'connect_mode' ("NameError: name
> 'connect_mode' is not defined")
>
> All I want is to save my .pdb file with the CONNECT section. Is there a
> way to do that not by hand?
>
> Cheers!
> --
> Marcelo Depólo Polêto
> Postdoctoral Researcher
> BIOAGRO - Room T07
> Department of General Biology - UFV
> Contact: + 55 31 3612-2464
>
>
>
> _______________________________________________
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to