From: Cesar Luis Avila (cavila_at_fbqf.unt.edu.ar)
Date: Tue Dec 26 2006 - 17:16:51 CST

Hi Marcos,
I have already tried that. What I get is
atomselect set: 0 data items doesn't match 4 selected atoms.

the problem with psfgen seems to be related to resid. For example

ATOM 15806 SOD SOD X 2399 217.106 26.565 -44.457 1.00 0.00 M12

is interpreted as resid 239 by psfgen during segment generation. So when
it tries to read the coordinates you get

Warning: failed to set coordinate for atom SOD SOD:239 M12

What I have done is a perl command to remove the X and add a space after
the resid number

perl -pi -w -e 's/X(\s+\d+)/$1 /g;' *.pdb

Regards
Cesar

Marcos Sotomayor escribió:
>
> Hi Cesar,
>
> What about trying something like $selover set chain " " before writing
> the pdb files?
>
> In any case, pdb files written by vmd should work fine with psfgen,
> even if they have a chain identifier X... what error did you get when
> using coordpdb?
>
> Marcos
>
> On Tue, 26 Dec 2006, Cesar Luis Avila wrote:
>
>> Dear all,
>> I want to split a pdb into several segments for later use with
>> psfgen. The problem that I am facing is that for each segment that I
>> write into a new pdb, I get an additional X in the chain column. In
>> the original pdb there were no chain identifiers. This results on a
>> problem when reading the coordinates from the new pdb with coordpdb
>> in psfgen.
>>
>> This is the script that I use to split the pdb
>>
>> set all [atomselect top all]
>> set lseglist [lsort -unique [$all get segid]]
>> foreach lseg $lseglist {
>> set selover [atomselect top "segid $lseg"]
>> $selover writepdb $lseg.pdb
>> }
>>
>> A line from the original PDB file
>>
>> ATOM 26852 CLA CLA 2 31.223 -0.301 20.128 1.00
>> 0.00 BCL
>>
>> The same line in the final PDB. Note that the chain identifier was
>> added by vmd.
>>
>> ATOM 1 CLA CLA X 2 31.223 -0.301 20.128 1.00
>> 0.00 BCL How may I instruct VMD to write pdb without chain
>> identifier?
>> Regards
>> Cesar
>>
>