From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Aug 22 2006 - 20:56:03 CDT

Michel,
  I'm having a look at the structure. So far I've observed a few things
just loading the structure into a fresh VMD session with nothing else
loaded already:

When loading PSF followed by PDB:
- Loading the 8 million atom PSF file uses 1.8GB of memory if nothing else
  has been loaded yet. (mol new huge.psf)
- Loading in the 8 million tom PDB subsequent to the PSF file brings the
  total memory use up to 2.6GB (mol addfile huge.pdb)

When loading the PDB followed by PSF (causes the distance-based bond
search to run unless you tell it not to, and some atoms get excessive
numbers of bonds and thus VMD complains...):
- Loading the 8 million atom PDB file uses 2.9GB of memory if nothing else
  has been loaded yet. (mol new huge.pdb)
- Loading in the 8 million tom PSF subsequent to the PDB file brings the
  total memory use up to 3.5GB (mol addfile huge.psf)

Just judging from what I've observed here loading your PDB and PSF files,
it looks to me like you're running the system out of memory, as even with
4GB of memory, Linux (or whatever you're running) is using some of that for
the kernel, the windowing system, and for filesystem buffers. However, all
is not lost. If you load the PSF file first and the PDB file second you can
save almost 1GB of memory due to decreased memory fragmentation. Some malloc
implementations are smarter than others. On the 32GB Sun machine I tested
on, it didn't coalesce the tiny bits of memory very well, so (on that system
at least) there's a big advantage to loading the PSF first and the PDB
second not only because you can skip the autobonds search, but also due to the
reduced memory fragmentation etc.

When you ran autoionize, I'm guessing what happened is that you were loading
in these huge structures in addition to the starting structures you already
had loaded, and from the numbers I gave above, that would clearly lead to
disaster, as you'd need more like 8GB of RAM in order to have multiple
8 million atom structures loaded at once. One way to prevent this would
be to use the structure building tools via their text command interfaces,
which should allow you to create the new structures without auto-loading
them back into VMD when each step is finished. You could then run the
tools one at a time, deleting the previous molecules before moving on to
the next step, in order to minimize the memory footprint you've got going
during each step.

Now, I have to mention that I ran my test using VMD 1.8.5, which uses
a little more memory per-atom than VMD 1.8.4 did, as it allows more bonds
per atom, but my results should be an upper bound on the amount of memory
needed to load your systmem.

Try loading the PSF file, followed by the PDB, and let me know if you
succeed with that. If that still puts you dangerously close to running out
of memory, I can try giving you a modified version of VMD that uses a bit
less memory per-atom than the one you're using, though it'll have to wait
until after I finish releasing VMD 1.8.5. You can also increase the swap
space on your system and try working when the machine has little or no other
processes running.

Worst case, if you are maxed out at 4GB of ram, and you can't get this
done, I can run the tools for you on our 32GB machine and provide the
output files to you. I'd like to find a way for you to run this on the
4GB machine you have however, and I think that with some attention to details
and running things more manually, it should be doable.

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Aug 22, 2006 at 05:36:39PM -0500, L. Michel Espinoza-Fonseca wrote:
> Hi John,
>
> It's me again. This time I got a problem where I'm unable to get any
> solution. I'm trying to add ions to a fairly big system (this time
> something around 8,000,000 atoms). I can solvate it with no problems,
> but when I try to run autoionize, I get the following:
>
> reading topology file
> /home/bscl2/espinoza/lib/vmd/plugins/noarch/tcl/autoionize1.2/ions.top
> >>>>>> SOD and CLA Ions Topology File <<<<<<<<<
> extracted from
> >>>>>>>>CHARMM22 All-Hydrogen Topology File for Proteins <<<<<<
> >>>>>>>>>>>>>>>>>>>>>August 1999 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >>>>>>>Direct comments to Alexander D. MacKerell Jr. <<<<<<<<<
> >>>>>>410-706-7442 or email: alex,mmiris.ab.umd.edu <<<<<<<<<
>
> Created by CHARMM version 27 1
>
> Autoionize) Reading monster-water.psf/monster-water.pdb...
> clearing structure, preserving topology and aliases
> reading structure from psf file monster-water.psf
> reading coordinates from pdb file monster-water.pdb
> psfplugin) Detected a Charmm31 PSF file
> Info) Using plugin psf for structure file monster-water.psf
> Segmentation fault
>
> And of course VMD crashes. I made stacksize and coredumpsized
> unlimited, but I got the same thing (VMD crashes). Do you have any
> suggestions on how to solve the problem? I'm using a workstation with
> 2 double-core Opteron and 4 GB of RAM.
>
> Thanks!
>
> Michel

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078