From: Aaron Oakley (
Date: Mon Mar 01 2021 - 20:07:39 CST

In VMD you can do something like:
set s1 "water and same residue as (x > 87.21)"
set s2 "water and same residue as (x < -87.21)"
set s3 "water and same residue as (y > 87.21)"
set s4 "water and same residue as (y < -87.21)"
set sel [atomselect top "protein or not ($s1 or $s2 or $s3 or $s4)"]
$sel writepsf gen-solv.psf
$sel writepdb gen-solv.pdb


On 2 Mar 2021, at 11:13 am, Mcguire, Kelly <klmcguire_at_UCSD.EDU<mailto:klmcguire_at_UCSD.EDU>> wrote:

I am running a long simulation and writing out dcd files every 40 ns. My waterbox is not perfectly cubic. The dimensions are 233.457, 212.441, 237.347. Before saving each frame of each dcd as separate PDB files, I am re-centering the protein in the waterbox. I need to make the waterbox perfectly cubed for certain processes we are trying in Phenix. We are trying to avoid having to re-run the simulation.

Is there a way to reduce a couple of the waterbox dimensions (i.e. the x and z) to match the 212 angstroms (y dimension) for each frame of a loaded dcd? Maybe, delete a slab of water from the x and z dimension to get them down to 212 angstroms? I would do this after re-centering the protein the waterbox.

Dr. Kelly McGuire
Chemistry/Biochemistry Department
Natural Science Building, 4104A, 4106A, 4017