From: Bjoern Olausson (namdlist_at_googlemail.com)
Date: Fri May 07 2010 - 02:41:51 CDT

On Friday 07 May 2010 06:17:19 Francesca Ricci-Tam wrote:
> I am working with large pdb files with numerous residues, and I am trying
> to find an automatic way to remove all hydrogens from these files, so that
> I do not have to do it manually.
> In a NAMD-L posting from a few years ago, I read that it could be done in
> the following way with VMD:
>
> mol load pdb your.pdb
> set sel [atomselect top "not hydrogen"]
> $sel writepdb new_noH.pdb
>
>
> However, when I tried that with VMD, nothing happened.
> The instructions aren't clear to me. For one thing, I do not know where I
> need to save my pdb file ("your.pdb" in the above example) so that VMD will
> be able to access it. Also, are those commands supposed to be typed in the
> vmd command line in the exact format of those three lines?
>
Windows or Linux?

Well, I don't use Windows, so you have to "translate" the path to "Windows
style", but the code works. Let me put it a bit more obvious:
------------------------------------------
mol load pdb /path/to/your/structure.pdb
set sel [atomselect top "not hydrogen"]
$sel writepdb /path/to/your/structure-no_h.pdb
------------------------------------------

Or if you start vmd from "/path/to/your/" you can just type
------------------------------------------
mol load pdb structure.pdb
set sel [atomselect top "not hydrogen"]
$sel writepdb structure-no_h.pdb
------------------------------------------

Hope I could make it more clear.

Cheers
Bjoern

-- 
Bjoern Olausson
Martin-Luther-Universität Halle-Wittenberg 
Fachbereich Biochemie/Biotechnologie
Kurt-Mothes-Str. 3
06120 Halle/Saale
Phone: +49-345-55-24942