From: Axel Kohlmeyer (
Date: Wed Sep 18 2013 - 03:22:51 CDT

On Wed, Sep 18, 2013 at 8:57 AM, Yunjie Zhao <> wrote:
> Hi,
> 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.

yes, it will generate a psf file according to the topology file that
you provide. that is how this works. if you want to have autopsf to
not generate these, you need to supply a suitable topology file. this
has to match your force field as well. if you simply strip off the
hydrogens, you will have thoroughly inconsistent parameters assigned
to your atoms.


> I am trying to use psfgen.
> resetpsf
> 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.
> Regards,
> Yunjie

Dr. Axel Kohlmeyer
International Centre for Theoretical Physics, Trieste. Italy.