From: Erik Nordgren (nordgren_at_sas.upenn.edu)
Date: Thu Dec 16 2010 - 13:25:22 CST

Hi Yuhui,

This is just a guess, since you haven't shown the entirety of your script...
but the problem may be that you are mixing PSFGEN and VMD commands, without
properly passing the data between those programs. In my experience this is
often confusing and a bit tricky. The thing is, you can run PSFGEN commands
from within a VMD script (provided you give the "package require psfgen"
command first, as you have done) -- but by my understanding, any data (i.e.,
structure and coordinate information) that is loaded with PSFGEN commands
(like "readpsf" and "coordpdb") goes into a memory area that is separate
from data loaded using VMD commands (like "mol load").

What I typically do, when I write a script that uses both PSFGEN commands
(to create or modify the content or topological structure of the system) and
VMD commands (to manipulate or measure or analyze the system, or parts of
it), is to keep reading and writing my structure/coordinate data to and from
scratch files. In other words, a script might look something like this:

#PSFGEN section
readpsf $old_struct
coordpdb $old_coords
(use some PSFGEN commands to modify the PSF)
writepsf $temp_struct
writepdb $temp_coords

#VMD section
mol load psf $temp_struct pdb $temp_coords
set all [atomselect top all]
(use VMD commands to move parts of the system around)
$all writepsf $final_struct
$all writepdb $final_coords

And of course, if there are multiple phases to your script, where you need
to alternately use PSFGEN and VMD commands, then you need to keep
reading/writing those temporary files in between each phase.

hope this helped...
Erik

2010/12/15 ºÎع»Ô <he.yuhui.ime_at_gmail.com>

> Dear All,
>
> I construct the pdb and psf files of a single-layer graphene, by
> following the approach shown in the tutorial "Modeling Nanopores for
> Sequencing DNA".
>
> (Maybe it is helpful to give more details for the construction: first,
> the pdb file of a single-layer graphene is constructed by recording
> positions of each carbon atom on the graphene; then, sigma-bonds are
> determined and recorded by measuring the distance between each two carbon
> atoms; after that, angles formed by two neighbouring sigma-bonds are
> determined and recorded.
> I am aware that pi-bonds are not kept recorded of, since I have no idea
> how to do that.)
>
> After the construction of graphene, I hope to merge it with some other
> membrane such as SiN. Codes are as follows:
>
> package require psfgen
> resetpsf
> readpsf $graphenePSF
> coordpdb $graphenePDB
> readpsf $sinPSF
> coordpdb $sinPDB
>
> # Write the combination.
> writepdb $finalPdb
> writepsf $finalPsf
>
> However, what I find in the final pdb is that nearly half of the
> graphene carbon atoms have been moved to the coordinate origin, i.e, (0 0
> 0).
>
> Can anyone tell me what happens?
>
> Thanks very much!
>
>
> --
> Ph. D He Yuhui (ºÎع»Ô)
> Institute of Scientific and Industrial Research, Osaka University;
> Mihogaoka 8-1, Ibaraki, Osaka 567-0047. JAPAN
>
>

-- 
C. Erik Nordgren, Ph.D.
Chemistry Department
University of Pennsylvania