Tom, This does exist in the upcoming 0.92 release with the new "dss" command:
dss preserve=1 will assign secondary structure (quickly!) if it does not already exist, or if it does, it will use what is in the PDB file. In the current release, you can probably do something like: from pymol import cmd if cmd.count_atoms("ss H or ss S or ss L")==0: util.ss() Cheers, Warren -- mailto:war...@delanoscientific.com Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 > -----Original Message----- > From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users- > ad...@lists.sourceforge.net] On Behalf Of Tom Walsh > Sent: Wednesday, October 22, 2003 2:50 AM > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] Is it possible to tell if a loaded PDB file contains > secondary structure records? > > > I'm writing a script that writes a Python script that loads PDB > files and displays them in cartoon representation. The problem > is that, if the PDB file doesn't contain secondary structure > records, you get a ribbon-like representation rather than a > proper cartoon. The obvious way to fix this is to run util.ss > but this can be slow if you have a lot of structures. Is there > a way in the API to tell whether a PDB file you've loaded contains > secondary structure records, so that you can avoid an unnecessary > call to util.ss? > > Tom Walsh > > > > > ------------------------------------------------------- > This SF.net email is sponsored by OSDN developer relations > Here's your chance to show off your extensive product knowledge > We want to know what you know. Tell us and you have a chance to win $100 > http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users