VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Jan 29 2015 - 13:33:20 CST
- Next message: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Previous message: JC Gumbart: "Re: quick tcl question with vmd/psfgen"
- In reply to: Brian Radak: "quick tcl question with vmd/psfgen"
- Next in thread: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Reply: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Thu, Jan 29, 2015 at 1:30 PM, Brian Radak
<brian.radak.accts_at_gmail.com> wrote:
> Hello,
>
> I'm using vmd to call psfgen in order to patch a solvated structure and
> create duplicate "dummy" atoms. I'd like psfgen to build the new atoms in
> accord with patch's IC table and
> without changing the existing ones. As such, I believe it should suffice to
> "seed" the psfgen guesscoord command by explicitly setting a few atoms in
> the chain as direct copies of existing atoms (these will be non-interacting,
> so it is not a problem).
>
> My script looks something like this:
>
> # load psfgen and load psf and coordinates into psfgen and vmd (these must
> be separate?)
> package require psfgen
> <load topology files with patch, etc.>
> readpsf ...
> mol load psf ..
>
> # apply the patch (which adds new atoms) and regenerate bond/angle/dihedral
> terms
> patch ...
> regenerate angles dihedrals
>
> # "seed" the ic build by copying the atom CB to its copy CB1
> set cb [atomselect top "segid PROT and resid 2 and name CB"]
> set cbx [$cb get {x y z}]
> coord PROT 2 CB1 $cbx # <-- PROBLEM HAPPENS HERE
>
> guesscoord
> writepsf ..
> writepdb ...
>
> however I seem to be missing something as to how Tcl and/or psfgen take the
> coordinate values. The psfgen coord command keeps giving a standard usage
> error:
>
> arguments: segid resid atomname { x y z }
> MOLECULE DESTROYED BY FATAL ERROR! Use resetpsf to start over
>
> I've tried a number of ways of reformatting the coordinates with puts or
> expr or [], but I can't even tell what vmd/tcl thinks I am giving it.
that is most likely because an atomselect function returns not just a
simple {x y z} coordinate tuple, but a list of those, one for each
atom in the selection. so what you get is not a list, but a list of
lists, i.e. { {x y z} }.
the simplest way to get rid of the additional braces would be to use:
set cbx [lindex 0 [$cb get {x y z}]]
axel.
>
> Any help much appreciated,
> Brian
>
> --
> Brian Radak
> Postdoctoral Scholar
> University of Chicago
> Department of Biochemistry & Molecular Biology
> Gordon Center for Integrative Science, W323A
> 929 E. 57th St.
> Chicago, IL 60637-1454
> Tel: 773/834-2812
> e-mail: radak_at_uchicago.edu
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science & Technology, Temple University, Philadelphia PA, USA International Centre for Theoretical Physics, Trieste. Italy.
- Next message: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Previous message: JC Gumbart: "Re: quick tcl question with vmd/psfgen"
- In reply to: Brian Radak: "quick tcl question with vmd/psfgen"
- Next in thread: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Reply: Brian Radak: "Re: quick tcl question with vmd/psfgen"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]