From: Yunjie Zhao (
Date: Wed Sep 18 2013 - 01:57:38 CDT


I have generate a psf file from the pdb structure using Automatic PSF
Builder in VMD. However, it adds the hydrogen atoms as well. I want to
remove all the hydrogen atoms from the generated psf file.

I am trying to use psfgen.
readpsf myfile.psf
coordpdb myfile.pdb
mol load psf myfile.psf pdb myfile.pdb
set bad [atomselect top "hydrogen"]
foreach segid [$bad get segid] resid [$bad get resid] name [$bad get name]
{delatom $segid $resid $name}

But, this does not work.

What's wrong with this? Thanks for any help and explanation.