From: Victor Ovchinnikov (ovchinnv_at_georgetown.edu)
Date: Mon Dec 14 2015 - 16:27:41 CST
Hi Jim,
A somewhat quick/dirty solution to missing elements in topology file is
below. Sorry : I had a rather old NAMD source from 2013 handy. Wasn't
sure if it makes sense to forward this to the list.
Victor
$ cat psfgen.patch
--- bkp/charmm_parse_topo_defs.c 2012-03-02 14:33:35.000000000 -0500
+++ charmm_parse_topo_defs.c 2015-12-14 17:16:21.460529362 -0500
@@ -50,6 +50,8 @@
int j1, j2, j3, j4;
unsigned int utmp;
+#include "elmas.h"
+
first = 1;
skip = 0;
skipall = 0;
@@ -209,7 +211,8 @@
}
else if ( ! strncasecmp("MASS",tok[0],4) ) {
debug_msg("Recognized mass statement.");
- if ( ntok < 4 ||
topo_defs_type(defs,tok[2],(ntok>4?tok[4]:""),atof(tok[3]),atoi(tok[1])) ) {
+// if ( ntok < 4 ||
topo_defs_type(defs,tok[2],(ntok>4?tok[4]:""),atof(tok[3]),atoi(tok[1])) ) {
+ if ( ntok < 4 ||
topo_defs_type(defs,tok[2],(ntok>4?tok[4]:el__[(int)(atof(tok[3])+0.5)]),atof(tok[3]),atoi(tok[1]))
) {
print_msg(v,"ERROR! Failed to parse mass statement.");
}
}
$ cat elmas.h
const char *el__[277];
el__[1]="H\0";
el__[4]="He\0";
el__[7]="Li\0";
el__[9]="Be\0";
el__[11]="B\0";
el__[12]="C\0";
el__[14]="N\0";
el__[16]="O\0";
el__[19]="F\0";
el__[20]="Ne\0";
el__[23]="Na\0";
el__[24]="Mg\0";
el__[27]="Al\0";
el__[28]="Si\0";
el__[31]="P\0";
el__[32]="S\0";
el__[35]="Cl\0";
el__[39]="K\0";
el__[40]="Ar\0";
el__[40]="Ca\0";
el__[45]="Sc\0";
el__[48]="Ti\0";
el__[51]="V\0";
el__[52]="Cr\0";
el__[55]="Mn\0";
el__[56]="Fe\0";
el__[59]="Ni\0";
el__[59]="Co\0";
el__[64]="Cu\0";
el__[65]="Zn\0";
el__[70]="Ga\0";
el__[73]="Ge\0";
el__[75]="As\0";
el__[79]="Se\0";
el__[80]="Br\0";
el__[84]="Kr\0";
el__[85]="Rb\0";
el__[88]="Sr\0";
el__[89]="Y\0";
el__[91]="Zr\0";
el__[93]="Nb\0";
el__[96]="Mo\0";
el__[98]="Tc\0";
el__[101]="Ru\0";
el__[103]="Rh\0";
el__[106]="Pd\0";
el__[108]="Ag\0";
el__[112]="Cd\0";
el__[115]="In\0";
el__[119]="Sn\0";
el__[122]="Sb\0";
el__[127]="I\0";
el__[128]="Te\0";
el__[131]="Xe\0";
el__[133]="Cs\0";
el__[137]="Ba\0";
el__[139]="La\0";
el__[140]="Ce\0";
el__[141]="Pr\0";
el__[144]="Nd\0";
el__[145]="Pm\0";
el__[150]="Sm\0";
el__[152]="Eu\0";
el__[157]="Gd\0";
el__[159]="Tb\0";
el__[163]="Dy\0";
el__[165]="Ho\0";
el__[167]="Er\0";
el__[169]="Tm\0";
el__[173]="Yb\0";
el__[175]="Lu\0";
el__[178]="Hf\0";
el__[181]="Ta\0";
el__[184]="W\0";
el__[186]="Re\0";
el__[190]="Os\0";
el__[192]="Ir\0";
el__[195]="Pt\0";
el__[197]="Au\0";
el__[201]="Hg\0";
el__[204]="Tl\0";
el__[207]="Pb\0";
el__[209]="Bi\0";
el__[209]="Po\0";
el__[210]="At\0";
el__[222]="Rn\0";
el__[223]="Fr\0";
el__[226]="Ra\0";
el__[227]="Ac\0";
el__[231]="Pa\0";
el__[232]="Th\0";
el__[237]="Np\0";
el__[238]="U\0";
el__[243]="Am\0";
el__[244]="Pu\0";
el__[247]="Cm\0";
el__[248]="Bk\0";
el__[251]="Cf\0";
el__[252]="Es\0";
el__[257]="Fm\0";
el__[258]="Md\0";
el__[259]="No\0";
el__[261]="Rf\0";
el__[262]="Lr\0";
el__[262]="Db\0";
el__[264]="Bh\0";
el__[266]="Sg\0";
el__[268]="Mt\0";
el__[272]="Rg\0";
el__[277]="Hs\0";
On 12/14/2015 03:52 PM, Francesco Pietra wrote:
> I had seen Victor' post, not Jim's post when I lastly posted. Again,
> if relevant, my pdb file in /parts of the .gen file had all protons
> (as I wrote before) and also a complete element column:
>
> ATOM 1 N GLU A 1 -37.150 25.869 -38.254 1.00 0.00
> PRA N
> ATOM 2 HT1 GLU A 1 -36.791 25.374 -37.450 1.00 0.00
> PRA H
> ATOM 3 HT2 GLU A 1 -38.160 25.847 -38.243 1.00 0.00
> PRA H
> ATOM 4 HT3 GLU A 1 -36.845 26.831 -38.227 1.00 0.00
> PRA H
>
>
> Also all other pdb files , for the protein ligands, had a complete
> element column.
>
>
> francesco
>
> On Mon, Dec 14, 2015 at 4:04 PM, Jim Phillips <jim_at_ks.uiuc.edu
> <mailto:jim_at_ks.uiuc.edu>> wrote:
>
>
> OK, then that's why psfgen isn't writing elements to the pdb
> file. Since masses are available psfgen could guess elements
> pretty well. Any suggestions from the list?
>
> Also, anybody know what "AUTOGENERATE ANGLES DIHEDRALS PATCH" is
> supposed to mean in top_all36_na.rtf? (Specifically, what does
> "PATCH" indicate?)
>
>
> Jim
>
>
> On Sun, 13 Dec 2015, Francesco Pietra wrote:
>
> Contrary to charmm27, charmm36 rtf have no element
>
>
> charmm27
> MASS 1 H 1.00800 H ! polar H
> MASS 2 HC 1.00800 H ! N-ter H
> MASS 3 HA 1.00800 H ! nonpolar H
> MASS 4 HT 1.00800 H ! TIPS3P WATER HYDROGEN
> MASS 5 HP 1.00800 H ! aromatic H
> MASS 6 HB 1.00800 H ! backbone H
>
> charmm36
> MASS 31 H 1.00800 ! polar H
> MASS 32 HC 1.00800 ! N-ter H
> MASS 33 HA 1.00800 ! nonpolar H
> MASS 34 HP 1.00800 ! aromatic H
> MASS 35 HB1 1.00800 ! backbone H
> MASS 36 HB2 1.00800 ! aliphatic backbone H, to CT2
>
> if this is what you want
>
> francesco
>
> On Sun, Dec 13, 2015 at 9:32 PM, Jim Phillips <jim_at_ks.uiuc.edu
> <mailto:jim_at_ks.uiuc.edu>> wrote:
>
>
> If you "grep -i mass" your topology files are there lines
> that lack the
> element field?
>
> Jim
>
>
>
> On Sun, 13 Dec 2015, Francesco Pietra wrote:
>
> The initial pdb file for the protein came from the
> H++server, thus
>
> protonated and in AMBER format. The psfgen, with all
> the needed aliases,
> was set for TIP4P water (Freddolino kit). The toppar
> for water_ions set
> CLA
> in correctly, while for parameters I had to extract
> the relevant portion
> for CLA. Toppar heme was only used for dioxygen
>
>
> package require psfgen
>
> topology top_all36_prot.rtf
> topology myion.rtf
> topology toppar_water_ions.str
> topology toppar_all36_prot_heme_O2-mod.str
> topology tip4p.top
>
> pdbalias atom ALA H HN
> pdbalias atom ARG H HN
> pdbalias atom ARG HB2 HB1
> pdbalias atom ARG HB3 HB2
> pdbalias atom ARG HG2 HG1
>
>
> francesco
>
>
>
>
> On Sun, Dec 13, 2015 at 7:17 PM, Jim Phillips
> <jim_at_ks.uiuc.edu <mailto:jim_at_ks.uiuc.edu>> wrote:
>
>
> I suspect that the corresponding MASS lines in
> your topology file are
> missing the element field, so an empty string
> over-writes the element
> field
> which the patch is applied. A different topology
> file that contains
> elements was apparently used to build the initial
> structure.
>
> How exactly did you produce this file?
>
> Jim
>
>
> On Sat, 12 Dec 2015, Francesco Pietra wrote:
>
> Hello:
>
> As far as I can remember, NAMD does not read
> the element column in the
> pdb
> file prepared with psfgen.
>
> Even if true, why VMD (1.9.2 Linux in text
> mode) does not fully build
> the
> element column of CYS CYSD patched
> ATOM 7589 C HSD A 502 -9.956 31.185
> -18.889 1.00 0.00 <tel:18.889%201.00%200.00>
> PRA C
> ATOM 7590 O HSD A 502 -10.454 31.249
> -20.013 1.00 0.00
> PRA O
> ATOM 7591 N CYS A 503 -8.702 30.797
> -18.663 1.00 0.00 <tel:18.663%201.00%200.00>
> PRA N
> ATOM 7592 HN CYS A 503 -8.361 30.759
> -17.713 1.00 0.00
> PRA H
> ATOM 7593 CA CYS A 503 -7.905 30.157
> -19.699 1.00 0.00
> PRA C
> ATOM 7594 HA CYS A 503 -7.913 30.790
> -20.584 1.00 0.00
> PRA H
> ATOM 7595 CB CYS A 503 -6.462 29.977
> -19.236 1.00 0.00
> PRA
> ATOM 7596 HB1 CYS A 503 -6.017 30.961
> -19.091 1.00 0.00
> PRA
> ATOM 7597 HB2 CYS A 503 -6.440 29.431
> -18.291 1.00 0.00
> PRA
> ATOM 7598 SG CYS A 503 -5.529 29.081
> -20.452 1.00 0.00
> PRA
> ATOM 7599 C CYS A 503 -8.506 28.785
> -19.988 1.00 0.00
> PRA C
> ATOM 7600 O CYS A 503 -8.925 28.083
> -19.061 1.00 0.00
> PRA O
>
> and CYM
>
> ATOM 46 N CYM A 4 -36.415 29.381
> -46.642 1.00 0.00
> PRA N
> ATOM 47 HN CYM A 4 -35.975 29.520
> -45.744 1.00 0.00
> PRA H
> ATOM 48 CA CYM A 4 -35.816 29.990
> -47.828 1.00 0.00
> PRA C
> ATOM 49 HA CYM A 4 -36.195 29.506
> <tel:36.195%2029.506> -48.728 1.00 0.00
> PRA H
> ATOM 50 CB CYM A 4 -36.182 31.474
> <tel:36.182%2031.474> -47.915 1.00 0.00
> PRA
> ATOM 51 HB1 CYM A 4 -35.625 31.955
> -48.719 1.00 0.00
> PRA H
> ATOM 52 HB2 CYM A 4 -37.242 31.549
> -48.160 1.00 0.00
> PRA H
> ATOM 53 SG CYM A 4 -35.921 32.354
> -46.370 1.00 0.00
> PRA
> ATOM 54 C CYM A 4 -34.294 29.804
> -47.881 1.00 0.00
> PRA C
> ATOM 55 O CYM A 4 -33.602 30.512
> -48.604 1.00 0.00
> PRA O
>
> (which are graphically perfectly built)?
>
> francesco pietra
>
>
>
>
>
>
>
This archive was generated by hypermail 2.1.6 : Thu Dec 31 2015 - 23:22:20 CST