you can write your own loop in python to implement the function. fh = open(pdbfilename) coords = numpy.array([[float(line[30:38]),float(line[38:46]),float(line[46:54])] for line in fh.readlines() if line.startswith('ATOM ') or line.startswith('HETATM')]) fh.close() extent = (numpy.min(coords,axis=0), numpy.max(coords,axis=0))
or course the code needs to be tuned if you need only the first MODEL or only the first alternate position etc. cheers,hongbo On 04/26/2011 01:40 PM, Martin Hediger wrote: > Dear all > > I found that PyMOL offer the cmd.get_extent('protein') function, which > returns the dimensions of the selection. > Is it complicated to make this function available from within an > ordinary Pythonscript? > > Thanks for hints. > Martin > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net