Re: [PyMOL] Memory not released after load and delete of structure

2013-01-21 Thread Gianluigi Caltabiano
The suspension of undo  doesn't have any effect on my accumulation of GB when 
working with Hybrid PyMol...

Gianluigi




 Da: Thomas Holder thomas.hol...@schrodinger.com
A: pymol-users@lists.sourceforge.net 
Inviato: Venerdì 21 Dicembre 2012 17:31
Oggetto: Re: [PyMOL] Memory not released after load and delete of structure
 
Hi Gianluigi and Martin,

thanks for reporting, this is a serious issue and we are looking into it.

As far as we can reproduce, it's related to the undo feature. Adding this to 
your scripts should help:

cmd.set(suspend_undo, 1)

Cheers,
  Thomas

On Dec 21, 2012, at 9:53 AM, Gianluigi Caltabiano chimic...@yahoo.it wrote:

 I have the same problem since pymol 1.5, mainly with the hybrid (I can reach 
 10GB of ram memory with relatively small sessions). I'm on MAC OS 10.7.5 and 
 pymol version 1.5.0.3.
 I had to renounce working with Hybrid unless I really need some plug-in.
 
 Gianluigi
 
 
 Da: Jason Vertrees jason.vertr...@schrodinger.com
 A: Martin Hediger ma@bluewin.ch 
 Cc: pymol-users@lists.sourceforge.net pymol-users@lists.sourceforge.net 
 Inviato: Giovedì 20 Dicembre 2012 17:05
 Oggetto: Re: [PyMOL] Memory not released after load and delete of structure
 
 Martin,
 
 That sounds like a memory leak in v1.3. Can you try a newer version of
 PyMOL and let us know if it still happens? We've fixed lots of bugs
 since v1.3.
 
 Also, is your script simply iterating over structures and deleting
 them when done? You sure you're not missing a cleanup step somewhere?
 (Any chance we can see the script or a stub of it?)
 
 Cheers,
 
 -- Jason
 
 On Fri, Dec 21, 2012 at 3:17 AM, Martin Hediger ma@bluewin.ch wrote:
  Hi Jason,
  I'm using PyMOL 1.3.
 
  Best regards
  Martin
 
 
 
  On 20.12.12 15:53, Jason Vertrees wrote:
 
  Hi Martin,
 
  Which version of PyMOL are you using?
 
  Cheers,
 
  -- Jason
 
  On Fri, Dec 21, 2012 at 1:37 AM, Martin Hediger ma@bluewin.ch wrote:
 
  Dear PyMOL users
  In a directory are PDB files of combined size equal to around 3MB. When
  I load all files into PyMOL, I observe that the required RAM of PyMOL
  (MacOS X 10.6) increases by roughly this amount.
  When I delete all objects, the RAM requirement remains the same and when
  I then reload all structures, the RAM requirement increases even further.
  I'm currently using PyMOL to batch process a number of files where a
  structure is loaded, modified and then deleted again from the objects
  list. This then results in RAM requirements of over 1GB and together
  with other applications, I run out of memory.
  Is there a way I can prevent PyMOL from behaving this way?
 
  Best regards and thanks for any help
  Martin
 
 -- 
 Jason Vertrees, PhD
 Director of Core Modeling Product Management
 Schrödinger, Inc.
 
 (e) jason.vertr...@schrodinger.com
 (o) +1 (603) 374-7120

-- 
Thomas Holder
PyMOL Developer
Schrödinger Contractor


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
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--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412___
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

[PyMOL] Renumber Script problem

2013-01-21 Thread Alex Truong
Hi All,

I've been having a bit of trouble recently with the renumber script. I have
a pdb file that I'm trying to renumber, but unlike the other times I've
used it, it is renumbering incorrectly. The numbers are usually spaced out
5 residues apart, but I have one number right near the beginning that is 6
residues down from the previous one. Needless to say, this is screwing up
the rest of the count. Is there any idea why? I've provided a screenshot.

Thanks,
Alex
attachment: renumbererror.png--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412___
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

Re: [PyMOL] Renumber Script problem

2013-01-21 Thread Jordan Willis
Does it have to be a pymol script. Renumbering pdbs is the bread and butter of 
biopython pdb module:

#!/blue/meilerlab/apps/Linux2/x86_64/bin/python2.5
import sys
from Bio.PDB import *
from optparse import OptionParser
import warnings
def main():
usage = %prog input.pdb output.pdb
parser= OptionParser(usage)
parser.add_option(-n,dest=start,help=residue number to start with, 
default is 1,default=1)
parser.add_option(--preserve,dest=preserve,help=preserve insertion 
code and heteroflags,default=False, action=store_true)
parser.add_option(--norestart,dest=norestart,help=don't start 
renumbering at each chain, default=False,default=False, action=store_true)
(options, args) = parser.parse_args()

warnings.simplefilter('ignore',PDBExceptions.PDBConstructionWarning)
PDBparse = PDBParser(PERMISSIVE=1)
struct = PDBparse.get_structure(args[0][0:3],args[0])
residue_id = int(options.start)
chain_id = 
for residue in struct.get_residues():
chain = residue.get_parent()
if(chain_id != chain.get_id() and not options.norestart):
chain_id = chain.get_id()
residue_id=int(options.start)
 if(options.preserve):
hetero = residue.id[0]
insert = residue.id[2]
residue.id=(hetero,residue_id,insert)
else:
residue.id=(' ',residue_id,' ')
residue_id +=1


io=PDBIO()
io.set_structure(struct)
io.save(args[1])

if __name__ == __main__:
main()


Jordan

On Jan 21, 2013, at 12:21 PM, Alex Truong atru...@bu.edu wrote:

 Hi All,
 
 I've been having a bit of trouble recently with the renumber script. I have a 
 pdb file that I'm trying to renumber, but unlike the other times I've used 
 it, it is renumbering incorrectly. The numbers are usually spaced out 5 
 residues apart, but I have one number right near the beginning that is 6 
 residues down from the previous one. Needless to say, this is screwing up the 
 rest of the count. Is there any idea why? I've provided a screenshot.
 
 Thanks,
 Alex
 renumbererror.png--
 Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. SALE $99.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122412___
 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


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: [PyMOL] Renumber Script problem

2013-01-21 Thread Thomas Holder
Hi Alex,

the renumber script only sets the residue number, it does not reorder
atoms internally. Just type

PyMOL sort

to sort internally based on the new residue numbers.

See also:
http://pymolwiki.org/index.php/Sort

Cheers,
  Thomas

Alex Truong wrote, On 01/21/13 19:21:
 Hi All,
 
 I've been having a bit of trouble recently with the renumber script. I
 have a pdb file that I'm trying to renumber, but unlike the other times
 I've used it, it is renumbering incorrectly. The numbers are usually
 spaced out 5 residues apart, but I have one number right near the
 beginning that is 6 residues down from the previous one. Needless to
 say, this is screwing up the rest of the count. Is there any idea why?
 I've provided a screenshot.
 
 Thanks,
 Alex

-- 
Thomas Holder
PyMOL Developer
Schrödinger Contractor

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: [PyMOL] Renumber Script problem

2013-01-21 Thread Thomas Holder
Hi Jordan,

nice script, but it does not do the same like the renumber script from
the PyMOLWiki (http://pymolwiki.org/index.php/Renumber). Try this: set
all residue numbers to 1, the renumber script will not care because it
walks along the bonds and increases the count whenever it passes a
peptide bond. The Biopython parser however will read just one residue.

Cheers,
  Thomas

Jordan Willis wrote, On 01/21/13 19:53:
 Does it have to be a pymol script. Renumbering pdbs is the bread and butter 
 of biopython pdb module:
 
 #!/blue/meilerlab/apps/Linux2/x86_64/bin/python2.5
 import sys
 from Bio.PDB import *
 from optparse import OptionParser
 import warnings
 def main():
 usage = %prog input.pdb output.pdb
 parser= OptionParser(usage)
 parser.add_option(-n,dest=start,help=residue number to start with, 
 default is 1,default=1)
 parser.add_option(--preserve,dest=preserve,help=preserve insertion 
 code and heteroflags,default=False, action=store_true)
 parser.add_option(--norestart,dest=norestart,help=don't start 
 renumbering at each chain, default=False,default=False, action=store_true)
 (options, args) = parser.parse_args()
 
 warnings.simplefilter('ignore',PDBExceptions.PDBConstructionWarning)
 PDBparse = PDBParser(PERMISSIVE=1)
 struct = PDBparse.get_structure(args[0][0:3],args[0])
 residue_id = int(options.start)
 chain_id = 
 for residue in struct.get_residues():
 chain = residue.get_parent()
 if(chain_id != chain.get_id() and not options.norestart):
 chain_id = chain.get_id()
 residue_id=int(options.start)
  if(options.preserve):
 hetero = residue.id[0]
 insert = residue.id[2]
 residue.id=(hetero,residue_id,insert)
 else:
 residue.id=(' ',residue_id,' ')
 residue_id +=1
 
 
 io=PDBIO()
 io.set_structure(struct)
 io.save(args[1])
 
 if __name__ == __main__:
 main()

-- 
Thomas Holder
PyMOL Developer
Schrödinger Contractor

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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