Re: how to save a DCD file without water in NAMD: COMMAND LINE

From: Thomas C Bishop (bishop_at_tulane.edu)
Date: Fri Aug 13 2010 - 08:44:09 CDT

To avoid all that clicking... I do the following
save everythign after "cut-here" to a file called strip-wat.vmd
this file strips water and Na Cl ions... modify to strip what you like.

If you have psf files.
vmd -dispdev none -psf some.psf -e strip-wat.vmd -args "*.dcd"

if you have parm files
vmd -dispdev none -parm7 some.parm7 -e strip-wat.vmd -args "*.dcd"

Cheers,
Tom

********* cut here ***********
#### TcBishop Aug 2010; bishop_at_tulane.edu
### USAGE
## vmd -parm some.parm -e thiscript -args list-of-dcd-files.dcd
###
### This VMD script strips water from a dcd file, name.dcd, and saves
### the new dcd as name.nowat.dcd
###
set notwat [atomselect top {not (water or name "Cl\-" "Na\+" ) } ]

foreach i $argv {
 mol addfile $i type {dcd} first 0 last -1 step 1 waitfor all top
 set num [molinfo top get numframes]
 incr num -1
 set out [string map {.dcd .nowat.dcd} $i ]
 animate write dcd $out beg 0 end $num skip 1 waitfor all sel $notwat top
 animate delete all
}

quit

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:56:02 CST