Topic Options
#36672 - 11/22/17 04:26 AM PDB with 2 segid WZ1 and WZ2 cannot read to create psf
Rohit Offline
Forum Member

Registered: 10/25/17
Posts: 26
Hi rmv,

i have gone through your script could not understand below part
read univ
* modified pdb
*
pdb
segid 22 1
ires 23 4
w 61 6
end

Also i am having problem with my water box which i created using charmm-GUI. dims 30*30*30.

The problem is i am getting two segid in the box and am not able to create psf for the pdb.

this is the small part of my water box

Code:
ATOM   1591  OH2 TIP3  541       6.691   5.318   1.346  1.00  0.00      WZ1
ATOM   1592  H1  TIP3  541       6.325   4.552   1.788  1.00  0.00      WZ1
ATOM   1593  H2  TIP3  541       7.604   5.347   1.632  1.00  0.00      WZ1
ATOM   1594  OH2 TIP3  542       8.664   4.668   2.881  1.00  0.00      WZ1
ATOM   1595  H1  TIP3  542       9.563   4.394   2.697  1.00  0.00      WZ1
ATOM   1596  H2  TIP3  542       8.277   3.926   3.346  1.00  0.00      WZ1
ATOM   1597  OH2 TIP3    1      -3.044  -4.896  10.643  1.00  0.00      WZ2
ATOM   1598  H1  TIP3    1      -2.955  -3.952  10.510  1.00  0.00      WZ2
ATOM   1599  H2  TIP3    1      -3.683  -5.171   9.985  1.00  0.00      WZ2
ATOM   1600  OH2 TIP3    2      -4.111  -5.641  14.062  1.00  0.00      WZ2
ATOM   1601  H1  TIP3    2      -4.150  -6.287  14.767  1.00  0.00      WZ2
ATOM   1602  H2  TIP3    2      -4.434  -6.107  13.290  1.00  0.00      WZ2
ATOM   1603  OH2 TIP3    4      -0.405  -2.702  12.363  1.00  0.00      WZ2
ATOM   1604  H1  TIP3    4      -0.846  -3.422  12.814  1.00  0.00      WZ2
ATOM   1605  H2  TIP3    4      -0.418  -1.981  12.993  1.00  0.00      WZ2



i would like to have only 1 segid in my pdb as well as psf.

! Read sequence from pdb file, generate segment, and read coordinates.
open read card name "waterbox.pdb" unit 12
read segid WZ1 PDB unit 12

but it reads all 855 residues instead of only reading segment WZ1 which has 542 water molecules.

How can i create pdb as well as psf from above pdb in charmm to get single segid for whole water box.

Thank-you,
Regards,
Rohit


Edited by Rohit (11/23/17 12:57 AM)

Top
#36675 - 11/22/17 12:53 PM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8259
Loc: 39 03 48 N, 77 06 54 W
Please note that as indicated in the READ BEFORE POSTING topic, duplicate posts are not permitted, so the other one was removed.

The description at the beginning of the complex PDB input examples post is fairly clear about the need to put separate segments in separate files to use those examples as a template for your own work.

See io.doc for a more complete description of the READ UNIV facility. It can be used to read a multiple segment PDB, as outlined in the second example of the UNIVersal coord reader examples post.
_________________________
Rick Venable
computational chemist


Top
#36676 - 11/23/17 12:55 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: rmv]
Rohit Offline
Forum Member

Registered: 10/25/17
Posts: 26
Thank-you, it increased my understanding a bit, still i need to change the single pdb to 2 pdbs which i wanted to avoid. I still dont understand why charmm-gui would create 2 segments in water box. what purpose does it serve ?

Top
#36677 - 11/23/17 02:30 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
Note that the READ SEQUence PDB command has several options that allow you to fine tune what is to be read from the file. Excerpt from io.doc:
The SEGI <segid> option allows the sequence to be read only for the residues
belonging to the corresponding segid in the coordinate file.
For the PDB option resids are always read from the resSeq (resid) field.
This is useful when one wants to specify residue names (rather than use
the number representation). No other information is read from the coordinate
file during this process. To read the sequence for a specific chain in a PDB
file the CHAIn <char> option can be used; <char> is the one letter PDB chain
id in position 22 of ATOM/HETATM records. If the SEGI <segid> option is used
the sequence is read for the atoms that have the corresponding segid in
columns 73-76 of the PDB file. NCHAin <int> starts reading from chain number
<int> as defined by TER separator records. Variables SQNRES and SQRESID are
set to the number of residues read and the SEGId used.

There are simple examples in the Script Archive forum of how to set up a waterbox.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36678 - 11/23/17 05:08 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
Rohit Offline
Forum Member

Registered: 10/25/17
Posts: 26
even if i write
read sequence segi WZ1 unit 12

it gives error because i am not specifying number of residues to be read.

I tried
read sequence TIPS segi WZ1 unit 12

this is also not working.

Top
#36679 - 11/23/17 06:14 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
How about
READ SEQU PDB SEGI WZ1 NAME waterbox.pdb
GENE WZ1 NOANGLE NODIHE
READ SEQU PDB SEGI WZ2 NAME WATERBOX.PDB
GENE WZ2 NOANGLE NODIHE

See also the testcase ~charmm/test/c39test/readpdb.inp

If all you have is water this should also work:
read sequ tip3 542
GENE WZ1 NOANGLE NODIHE
read sequ tip3 313
GENE WZ2 NOANGLE NODIHE
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36680 - 11/23/17 07:28 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: lennart]
Rohit Offline
Forum Member

Registered: 10/25/17
Posts: 26
The first one is not working

2nd option works. below is the inp i used

Code:
open read card name "waterbox.pdb" unit 12
read sequ tip3 532
GENE BOX NOANGLE NODIHE
read sequ tip3 323
GENE BOX1 NOANGLE NODIHE

!generate box setup first none last none noangle nodihedrals
!rewind unit 12
read coor pdb unit 12

!open read card name "waterbox_watb.pdb" unit 13
!read sequence PDB unit 13
!generate box1 setup first none last none noangle nodihedrals
!rewind unit 13
!read coor pdb offs 532 unit 13

join box box1 renum

open unit 25 card write name "waterbox.psf"
write psf card xplor unit 25
* PSF
*


error message while reading coordinates.

Code:
CHARMM>    !generate box setup first none last none noangle nodihedrals
 CHARMM>    !rewind unit 12
 CHARMM>    read coor pdb unit 12
  read CHARMM-pdb format
          SPATIAL COORDINATES BEING READ FROM UNIT 12
 TITLE>   EQUILIBRATED WATER
 TITLE>    DATE:    11/20/17      4:21:35      CREATED BY USER: APACHE
 TITLE>  *
 ** WARNING ** After reading, there are no coordinates for selected atom:   457   153 TIP3 OH2 
 ** WARNING ** After reading, there are no coordinates for selected atom:   458   153 TIP3 H1  
 ** WARNING ** After reading, there are no coordinates for selected atom:   459   153 TIP3 H2  
 ** WARNING ** After reading, there are no coordinates for selected atom:   469   157 TIP3 OH2 
 ** WARNING ** After reading, there are no coordinates for selected atom:   470   157 TIP3 H1  
 ** WARNING ** After reading, there are no coordinates for selected atom:   471   157 TIP3 H2  
 ** WARNING ** After reading, there are no coordinates for selected atom:   643   215 TIP3 OH2 
 ** WARNING ** After reading, there are no coordinates for selected atom:   644   215 TIP3 H1  
 ** WARNING ** After reading, there are no coordinates for selected atom:   645   215 TIP3 H2  
 ** WARNING ** After reading, there are no coordinates for selected atom:   928   310 TIP3 OH2 

 ** A total of   963 selected atoms have no coordinates

Top
#36681 - 11/23/17 08:51 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
No need for all those error-prone OPEN statements, you can simply use the form READ ... NAME WATERBOX.PDB
Are there coordinates for those water molecules in your PDB-file?
Which CHARMM version are you using?
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36682 - 11/24/17 12:44 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
Rohit Offline
Forum Member

Registered: 10/25/17
Posts: 26
the coordinates are there, i dont know why it gives error so i tried reading crd file now it is working fine.

I am using c37a2 charmm

Top
#36683 - 11/24/17 01:58 AM Re: PDB with 2 segid WZ1 and WZ2 cannot read to create psf [Re: Rohit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
You are using a very old, developmental version. Upgrade! The most recent version is available for download (for free) here: http://charmm.chemistry.harvard.edu/charmm_lite.php
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top

Moderator:  chmgr, John Legato, petrella