Previous Thread
Next Thread
Print Thread
Generate PSF for already protonated / patched PDB file
#37856 04/29/20 08:11 PM
Joined: Apr 2020
Posts: 5
H
Forum Member
OP Offline
Forum Member
H
Joined: Apr 2020
Posts: 5
Dear all,

I am new to charmm and since I did not find anything to this topic I wanted to ask the question:

What is the best way to read an already protonated and "patched" PDB file. So, all residues are complete and protonated, termini and breaks are capped with ACE/NME and there also exist protonated GLU and ASP.

Since I read alot of times that charmm is very "specific" when it comes to the PDB input format, I wanted to ask if the residue names of the already "patched" residues in the PDB file have to be named accoriding to the PRES in the rtf, so ASPP or GLUP or LSN or whatever. If so, do all atoms of these residues need to have the PRES name or just the atoms that are listed in the patch. Finally, what is then the best way to read such a PDB file and generate a PSF file?

Thanks in advance,

Janik

Re: Generate PSF for already protonated / patched PDB file
hedderic #37857 04/30/20 04:18 PM
Joined: Sep 2003
Posts: 4,771
Likes: 2
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 4,771
Likes: 2
In CHARMM you generate the PSF from the following information:
The sequence of residues using standard names corresponding to the information in the RTF, ie the RESIdue names - not PRES! The sequence can be read from the PDB file or specified directly in the CHARMM input file;
READ SEQUENCE ....
Then you generate one segment, and specify how the termini should be treated:
GENE name FIRST ..... LAST ....
Now you can modify the charge state of titratable residues, or introduce other modifications using PATCh commands which refer to patch residues (PRES) in the RTF:
PATCH ....
PATCH ....


And the read the coordinates
READ COOR ....

See eg testcase test/c39test/readpdb.inp or examples in the Script Archive forum.

Last edited by lennart; 04/30/20 04:21 PM.

Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Generate PSF for already protonated / patched PDB file
hedderic #37858 04/30/20 05:08 PM
Joined: Sep 2003
Posts: 8,446
rmv Offline
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 8,446
PDB files are problematic, as the the format tends to vary somewhat from one program to another, and can use residue names that are different from those in the CHARMM topology files; a notable issue is His, and as noted ASP vs ASPP. The PDB format was never designed for MD simulation packages, and it has several issues such as coordinate precision and limits on the number of residues. Even the crystallographers are moving on to other formats.

Here are some Script Archive posts that may help with CHARMM import:

Import of PDB coords

multi-segment PDB via READ COOR UNIV (2nd example)


Rick Venable
computational chemist

Re: Generate PSF for already protonated / patched PDB file
hedderic #37871 05/10/20 05:02 PM
Joined: Apr 2020
Posts: 5
H
Forum Member
OP Offline
Forum Member
H
Joined: Apr 2020
Posts: 5
Dear all,

thanks for the quick answer. My input script has the following content:

! read topology and parameter files
open read card unit 1 name top_all36_prot.rtf
read rtf card unit 1
close unit 1
open read card unit 1 name par_all36_prot.prm
read para card unit 1 flex
close unit 1
! Read sequence from the PDB coordinate file
open read card unit 1 name 2y00_centered_prep_charmm.pdb
read sequence pdb unit 1
! now generate the PSF
generate A first none last none warn
! apply patches
patch ace A 1 warn
patch ct3 A 298 warn
patch disu A 82 A 167 warn
patch disu A 160 A 166 warn
! read coordinates
rewind unit 1
read coor pdb unit 1
close unit 1
! write psf and crd
write psf card name 2y00_centered_prep_charmm.psf
* PSF
*
write coor card name 2y00_centered_prep_charmm.crd
* Coords
*

The last lines of my pdb look like this (formatting is correct and everything is aligned, dont know if it will be correctly displayed here in the forum):

ATOM 4827 CD1 LEU A 297 -35.041 -8.081 57.054 1.00 71.32 C
ATOM 4828 CD2 LEU A 297 -36.589 -9.651 55.840 1.00 73.66 C
ATOM 4829 HN LEU A 297 -32.503 -11.128 56.104 1.00 76.71 H
ATOM 4830 HA LEU A 297 -34.716 -11.324 54.308 1.00 77.97 H
ATOM 4831 HB1 LEU A 297 -34.554 -8.758 54.337 1.00 76.82 H
ATOM 4832 HB2 LEU A 297 -33.212 -8.988 55.483 1.00 76.82 H
ATOM 4833 HG LEU A 297 -34.869 -10.212 56.942 1.00 74.63 H
ATOM 4834 HD11 LEU A 297 -34.018 -7.945 57.404 1.00 71.32 H
ATOM 4835 HD12 LEU A 297 -35.315 -7.252 56.402 1.00 71.32 H
ATOM 4836 HD13 LEU A 297 -35.717 -8.109 57.909 1.00 71.32 H
ATOM 4837 HD21 LEU A 297 -36.916 -8.852 55.174 1.00 73.66 H
ATOM 4838 HD22 LEU A 297 -36.641 -10.605 55.316 1.00 73.66 H
ATOM 4839 HD23 LEU A 297 -37.237 -9.681 56.716 1.00 73.66 H
ATOM 4840 N ALA A 298 -31.969 -10.916 52.817 1.00 82.06 N
ATOM 4841 CA ALA A 298 -31.288 -10.898 51.505 1.00 83.39 C
ATOM 4842 C ALA A 298 -31.374 -9.552 50.784 1.00 84.40 C
ATOM 4843 O ALA A 298 -30.841 -8.543 51.261 1.00 85.12 O
ATOM 4844 CB ALA A 298 -31.794 -12.044 50.596 1.00 83.05 C
ATOM 4845 HN ALA A 298 -31.445 -11.249 53.614 1.00 82.06 H
ATOM 4846 HA ALA A 298 -30.231 -11.058 51.719 1.00 83.39 H
ATOM 4847 HB1 ALA A 298 -31.662 -12.998 51.106 1.00 83.05 H
ATOM 4848 HB2 ALA A 298 -32.851 -11.893 50.376 1.00 83.05 H
ATOM 4849 HB3 ALA A 298 -31.226 -12.048 49.666 1.00 83.05 H
ATOM 4850 NT ALA A 298 -32.044 -9.526 49.632 1.00 0.00 N
ATOM 4851 CAT ALA A 298 -32.198 -8.315 48.853 1.00 0.00 C
ATOM 4852 HNT ALA A 298 -32.459 -10.381 49.291 1.00 0.00 H
ATOM 4853 HT1 ALA A 298 -33.256 -8.140 48.657 1.00 0.00 H
ATOM 4854 HT2 ALA A 298 -31.787 -7.470 49.407 1.00 0.00 H
ATOM 4855 HT3 ALA A 298 -31.667 -8.420 47.907 1.00 0.00 H

Now, this is the output of charmm:

1
Chemistry at HARvard Macromolecular Mechanics
(CHARMM) - Free Version 44b2 February 15, 2020
686801d1a
Copyright(c) 1984-2020 President and Fellows of Harvard College
All Rights Reserved
Current operating system: Linux-3.16.0-4-amd64(x86_64)@pc16626.pharmazie.un
Created on 5/10/20 at 18:48:28 by user: hedderich

Maximum number of ATOMS: 360720, and RESidues: 120240
RDTITL> OPEN READ CARD UNIT 1 NAME TOP_ALL36_PROT.RTF
RDTITL> No title read.

***** LEVEL 1 WARNING FROM *****
***** Title expected.
******************************************
BOMLEV ( 0) IS NOT REACHED. WRNLEV IS 5


CHARMM> open read card unit 1 name top_all36_prot.rtf
VOPEN> Attempting to open::top_all36_prot.rtf::
OPNLGU> Unit 1 opened for READONLY access to top_all36_prot.rtf

CHARMM> read rtf card unit 1
MAINIO> Residue topology file being read from unit 1.
TITLE> *>>>>>>>>CHARMM36 ALL-HYDROGEN TOPOLOGY FILE FOR PROTEINS <<<<<<
TITLE> *>>>>> INCLUDES PHI, PSI CROSS TERM MAP (CMAP) CORRECTION <<<<<<<
TITLE> *>>>>>>>>>>>>>>>>>>>>>>>>>> MAY 2011 <<<<<<<<<<<<<<<<<<<<<<<<<<<<
TITLE> * ALL COMMENTS TO THE CHARMM WEB SITE: www.CHARMM.ORG
TITLE> * PARAMETER SET DISCUSSION FORUM
TITLE> *

CHARMM> close unit 1
VCLOSE: Closing unit 1 with status "KEEP"

CHARMM> open read card unit 1 name par_all36_prot.prm
VOPEN> Attempting to open::par_all36_prot.prm::
OPNLGU> Unit 1 opened for READONLY access to par_all36_prot.prm

CHARMM> read para card unit 1 flex

PARAMETER FILE BEING READ FROM UNIT 1
TITLE> *>>>> CHARMM36 ALL-HYDROGEN PARAMETER FILE FOR PROTEINS <<<<<<<<<<
TITLE> *>>>>> INCLUDES PHI, PSI CROSS TERM MAP (CMAP) CORRECTION <<<<<<<<
TITLE> *>>>>>>>>>>>>>>>>>>>>>>>>>> FEB. 2012 <<<<<<<<<<<<<<<<<<<<<<<<<<<<
TITLE> * ALL COMMENTS TO THE CHARMM WEB SITE: www.CHARMM.ORG
TITLE> * PARAMETER SET DISCUSSION FORUM
TITLE> *
PARRDR> Error: Repeated ANGLE parameter ( 13): NH2 CT2 CD is replaced
PARMIO> NONBOND, HBOND lists and IMAGE atoms cleared.

CHARMM> close unit 1
VCLOSE: Closing unit 1 with status "KEEP"

CHARMM> ! Read sequence from the PDB coordinate file
CHARMM> open read card unit 1 name 2y00_centered_prep_charmm.pdb
VOPEN> Attempting to open::2y00_centered_prep_charmm.pdb::
OPNLGU> Unit 1 opened for READONLY access to 2y00_centered_prep_charmm.pdb

CHARMM> read sequence pdb unit 1
MAINIO> Sequence information being read from unit 1.
TITLE> *

RESIDUE SEQUENCE -- 298 RESIDUES
ALA GLU LEU LEU SER GLN GLN TRP GLU ALA GLY MET SER LEU LEU MET ALA LEU VAL VAL
LEU LEU ILE VAL ALA GLY ASN VAL LEU VAL ILE ALA ALA ILE GLY SER THR GLN ARG LEU
GLN THR LEU THR ASN LEU PHE ILE THR SER LEU ALA CYS ALA ASP LEU VAL VAL GLY LEU
LEU VAL VAL PRO PHE GLY ALA THR LEU VAL VAL ARG GLY THR TRP LEU TRP GLY SER PHE
LEU CYS GLU LEU TRP THR SER LEU ASP VAL LEU CYS VAL THR ALA SER ILE GLU THR LEU
CYS VAL ILE ALA ILE ASP ARG TYR LEU ALA ILE THR SER PRO PHE ARG TYR GLN SER LEU
MET THR ARG ALA ARG ALA LYS VAL ILE ILE CYS THR VAL TRP ALA ILE SER ALA LEU VAL
SER PHE LEU PRO ILE MET MET HSE TRP TRP ARG ASP GLU ASP PRO GLN ALA LEU LYS CYS
TYR GLN ASP PRO GLY CYS CYS ASP PHE VAL THR ASN ARG ALA TYR ALA ILE ALA SER SER
ILE ILE SER PHE TYR ILE PRO LEU LEU ILE MET ILE PHE VAL ALA LEU ARG VAL TYR ARG
GLU ALA LYS GLU GLN ILE ARG LYS ILE ASP ARG ALA SER LYS ARG LYS THR SER ARG VAL
MET LEU MET ARG GLU HSE LYS ALA LEU LYS THR LEU GLY ILE ILE MET GLY VAL PHE THR
LEU CYS TRP LEU PRO PHE PHE LEU VAL ASN ILE VAL ASN VAL PHE ASN ARG ASP LEU VAL
PRO ASP TRP LEU PHE VAL ALA PHE ASN TRP LEU GLY TYR ALA ASN SER ALA MET ASN PRO
ILE ILE TYR CYS ARG SER PRO ASP PHE ARG LYS ALA PHE LYS ARG LEU LEU ALA
***** Message from SEQRDR ***** THE SYSTEM CONTAINS 39 TITRATABLE GROUPS
THE USER MUST PREDETERMINE THE PROTONATION STATE THROUGH THE SEQUENCE AND RTF
HIS - 0 HSD - 0 HSE - 2 HSP - 0 ASP - 11 GLU - 8 LYS - 10 TYR - 8

CHARMM> ! now generate the PSF
CHARMM> generate A first none last none warn
NO PATCHING WILL BE DONE ON THE FIRST RESIDUE
NO PATCHING WILL BE DONE ON THE LAST RESIDUE
** WARNING ** IMPROPER NOT FOUND FOR RESIDUE 1 ALA .
ATOMS "N " "-C " "CA " "HN " WERE REQUESTED.
** WARNING ** CROSSTERM NOT FOUND FOR RESIDUE 1 ALA .
ATOMS "-C " "N " "CA " "C "
ATOMS "N " "CA " "C " "+N " WERE REQUESTED.
** WARNING ** BOND NOT FOUND FOR RESIDUE 298 ALA .
ATOMS "C " "+N " WERE REQUESTED.
** WARNING ** IMPROPER NOT FOUND FOR RESIDUE 298 ALA .
ATOMS "C " "CA " "+N " "O " WERE REQUESTED.
** WARNING ** CROSSTERM NOT FOUND FOR RESIDUE 298 ALA .
ATOMS "-C " "N " "CA " "C "
ATOMS "N " "CA " "C " "+N " WERE REQUESTED.
GENPSF> Segment 1 has been generated. Its identifier is A.
PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.
PSFSUM> Summary of the structure file counters :
Number of segments = 1 Number of residues = 298
Number of atoms = 4847 Number of groups = 1445
Number of bonds = 4902 Number of angles = 8883
Number of dihedrals = 12987 Number of impropers = 750
Number of cross-terms = 296
Number of HB acceptors = 397 Number of HB donors = 511
Number of NB exclusions = 0 Total charge = 10.00000

CHARMM> ! apply patches
CHARMM> patch ace A 1 warn
ATOM A ALA 1 CAY ADDED.
ATOM A ALA 1 HY1 ADDED.
ATOM A ALA 1 HY2 ADDED.
ATOM A ALA 1 HY3 ADDED.
ATOM A ALA 1 CY ADDED.
ATOM A ALA 1 OY ADDED.

Message from MAPIC: Atom numbers are changed.
AUTOGEN: All angles are removed and regenerated.
AUTOGEN: All dihedrals are removed and regenerated.
PATCH: Check angles and dihedrals autogenerated.
PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.
PSFSUM> Summary of the structure file counters :
Number of segments = 1 Number of residues = 298
Number of atoms = 4853 Number of groups = 1447
Number of bonds = 4908 Number of angles = 8894
Number of dihedrals = 13000 Number of impropers = 752
Number of cross-terms = 297
Number of HB acceptors = 398 Number of HB donors = 511
Number of NB exclusions = 0 Total charge = 10.00000

CHARMM> patch ct3 A 298 warn
ATOM A ALA 298 NT ADDED.
ATOM A ALA 298 HNT ADDED.
ATOM A ALA 298 CAT ADDED.
ATOM A ALA 298 HT1 ADDED.
ATOM A ALA 298 HT2 ADDED.
ATOM A ALA 298 HT3 ADDED.

Message from MAPIC: Atom numbers are changed.
AUTOGEN: All angles are removed and regenerated.
AUTOGEN: All dihedrals are removed and regenerated.
PATCH: Check angles and dihedrals autogenerated.
PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.
PSFSUM> Summary of the structure file counters :
Number of segments = 1 Number of residues = 298
Number of atoms = 4859 Number of groups = 1448
Number of bonds = 4914 Number of angles = 8905
Number of dihedrals = 13013 Number of impropers = 754
Number of cross-terms = 298
Number of HB acceptors = 398 Number of HB donors = 512
Number of NB exclusions = 0 Total charge = 10.00000

CHARMM> patch disu A 82 A 167 warn
ATOM A 82 CYS HG1 AND ALL REFERENCES TO IT DELETED.
ATOM A 167 CYS HG1 AND ALL REFERENCES TO IT DELETED.

Message from MAPIC: Atom numbers are changed.
DELTIC: 2 bonds deleted
DELTIC: 2 angles deleted
DELTIC: 6 dihedrals deleted
DELTIC: 2 donors deleted
AUTOGEN: All angles are removed and regenerated.
AUTOGEN: All dihedrals are removed and regenerated.
PATCH: Check angles and dihedrals autogenerated.
PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.
PSFSUM> Summary of the structure file counters :
Number of segments = 1 Number of residues = 298
Number of atoms = 4857 Number of groups = 1448
Number of bonds = 4913 Number of angles = 8905
Number of dihedrals = 13014 Number of impropers = 754
Number of cross-terms = 298
Number of HB acceptors = 398 Number of HB donors = 510
Number of NB exclusions = 0 Total charge = 10.00000

CHARMM> patch disu A 160 A 166 warn
ATOM A 160 CYS HG1 AND ALL REFERENCES TO IT DELETED.
ATOM A 166 CYS HG1 AND ALL REFERENCES TO IT DELETED.

Message from MAPIC: Atom numbers are changed.
DELTIC: 2 bonds deleted
DELTIC: 2 angles deleted
DELTIC: 6 dihedrals deleted
DELTIC: 2 donors deleted
AUTOGEN: All angles are removed and regenerated.
AUTOGEN: All dihedrals are removed and regenerated.
PATCH: Check angles and dihedrals autogenerated.
PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.
PSFSUM> Summary of the structure file counters :
Number of segments = 1 Number of residues = 298
Number of atoms = 4855 Number of groups = 1448
Number of bonds = 4912 Number of angles = 8905
Number of dihedrals = 13015 Number of impropers = 754
Number of cross-terms = 298
Number of HB acceptors = 398 Number of HB donors = 508
Number of NB exclusions = 0 Total charge = 10.00000

CHARMM> ! read coordinates
CHARMM> rewind unit 1
REWINDING UNIT 1

CHARMM> read coor pdb unit 1
read CHARMM-pdb format
SPATIAL COORDINATES BEING READ FROM UNIT 1
TITLE> *
** WARNING ** After reading, there are no coordinates for selected atom: 4855 298 ALA HT3

** A total of 1 selected atoms have no coordinates
*** LEVEL 2 WARNING *** BOMLEV IS 0

CHARMM> close unit 1
VCLOSE: Closing unit 1 with status "KEEP"

CHARMM> ! write psf and crd
CHARMM> write psf card name 2y00_centered_prep_charmm.psf
VOPEN> Attempting to open::2y00_centered_prep_charmm.psf::
RDTITL> * PSF
RDTITL> *
VCLOSE: Closing unit 90 with status "KEEP"

CHARMM> write coor card name 2y00_centered_prep_charmm.crd
VOPEN> Attempting to open::2y00_centered_prep_charmm.crd::
RDTITL> * COORDS
RDTITL> *
VCLOSE: Closing unit 90 with status "KEEP"
VCLOSE: Closing unit 90 with status "KEEP"

$$$$$$ New timer profile $$$$$
Total time 0.62 Other: 0.00

NORMAL TERMINATION BY END OF FILE
MOST SEVERE WARNING WAS AT LEVEL 2

$$$$$ JOB ACCOUNTING INFORMATION $$$$$
ELAPSED TIME: 0.62 SECONDS
CPU TIME: 0.36 SECONDS


Now my 2 questions are:

1. What is this thing about the improper etc that were not found for the first two residues?

2. Why are there no coordinates for the last atom? The generated PSF has all 4855 atoms that also appear in the pdb, and also the naming is correct (HT3 in the pdb). Also the correct patches were applied. So why cant it extract the coordinates of this particular last atom?

Thanks in advance,

Janik

Re: Generate PSF for already protonated / patched PDB file
hedderic #37872 05/10/20 06:31 PM
Joined: Sep 2003
Posts: 8,446
rmv Offline
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 8,446
Note that for output logs, coordinate files, long input scripts, etc., we highly recommend attaching them as files with a .txt extension, as web browsers can easily display them in a fixed font, and they can be easily viewed in a separate tab or window. It's much easier to read everything that way. Please review READ BEFORE POSTING.

The missing improper terms are listed for the first and last residues, not the first two. This is expected, as the definitions in the RTF refer to atoms in previous or next residues, and those do not exist for the N-term and C-term residues; it is an expected end effect.

The PDB file is probably missing either an END statement or a blank line following the last ATOM record.

Last edited by rmv; 05/10/20 06:32 PM.

Rick Venable
computational chemist


Moderated by  John Legato, lennart 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.012s Queries: 25 (0.006s) Memory: 0.9383 MB (Peak: 1.0287 MB) Data Comp: Off Server Time: 2020-05-28 10:51:26 UTC
Valid HTML 5 and Valid CSS