Creating a .pdb file from .cml file

GROMACS version: 2023.3
GROMACS modification: No
Hi everyone!
I’m really new to the gromacs and I’m trying to create my first input. The molecule I want to use is a peptide I’m researching. I created a model of my molecule in Avogadro and then converted it to the pdb file using open babel. I tried to run pdb2gmx, but a fatal error occured. I looked like so:
The residues in the chain UNK3–UNK1 do not have a consistent type. The first
residue has type ‘Other’, while residue LYS7 is of type ‘Protein’. Either
there is a mistake in your chain, or it includes nonstandard residue names
that have not yet been added to the residuetypes.dat file in the GROMACS
library directory. If there are other molecules such as ligands, they should
not have the same chain ID as the adjacent protein chain since it’s a separate
molecule.

I looked into the file and it turned out that there where a lot of residues in my molecule that had UNK as a residue. I wrote a simple program in python to change them to a propper amino acid based on the index of the residue. I tried to run it again with pdb2gmx but now it says:
Incomplete ring in HIS3

When I try to open it with spdbv it doesn’t see a lot of atoms.

I really don’t know what’s wrong with the pdb file and I can’t find any advices. I would really appreciate any help.
It might be worth saying that my molecule has a copper atom coordinated by 3 His.

Here’s file after using my python script:

COMPND UNNAMED
AUTHOR GENERATED BY OPEN BABEL 3.1.1
ATOM 1 H HIS A 3 -3.890 -2.101 -4.720 1.00 0.00 H
ATOM 2 C HIS A 3 -4.013 -1.043 -4.527 1.00 0.00 C
ATOM 3 H HIS A 3 -2.203 -0.574 -3.495 1.00 0.00 H
ATOM 4 HZ1 LYS A 7 -26.277 8.558 -12.644 1.00 0.00 H
ATOM 5 N HIS A 3 -3.122 -0.273 -3.889 1.00 0.00 N
ATOM 6 H HIS A 3 -6.292 3.747 0.580 1.00 0.00 H
ATOM 7 HD1 LYS A 7 -24.499 7.509 -11.279 1.00 0.00 H
ATOM 8 H HIS A 2 -6.747 -1.650 -5.178 1.00 0.00 H
ATOM 9 HB1 LYS A 7 -22.694 6.475 -9.928 1.00 0.00 H
ATOM 10 NZ LYS A 7 -25.603 9.275 -13.000 1.00 0.00 N1+
ATOM 11 C HIS A 3 -5.084 -0.255 -4.879 1.00 0.00 C
ATOM 12 H HIS A 2 -5.892 -1.046 -6.620 1.00 0.00 H
ATOM 13 C HIS A 2 -6.285 -0.745 -5.625 1.00 0.00 C
ATOM 14 H LYS A 7 -20.789 5.236 -8.890 1.00 0.00 H
ATOM 15 C HIS A 3 -6.040 3.829 -0.470 1.00 0.00 C
ATOM 16 CD LYS A 7 -23.792 8.283 -11.652 1.00 0.00 C
ATOM 17 H HIS A 3 -5.055 5.724 -0.519 1.00 0.00 H
ATOM 18 HZ2 LYS A 7 -26.127 10.154 -13.211 1.00 0.00 H
ATOM 19 H HIS A 1 -6.219 0.756 -1.131 1.00 0.00 H
ATOM 20 HE1 LYS A 7 -25.074 9.939 -11.069 1.00 0.00 H
ATOM 21 O LYS A 7 -21.120 6.998 -6.924 1.00 0.00 O
ATOM 22 HZ3 LYS A 7 -25.155 8.928 -13.879 1.00 0.00 H
ATOM 23 CE LYS A 7 -24.582 9.553 -11.989 1.00 0.00 C
ATOM 24 CB LYS A 7 -21.966 7.239 -10.281 1.00 0.00 C
ATOM 25 N HIS A 3 -5.390 4.867 -1.012 1.00 0.00 N
ATOM 26 C HIS A 3 -3.648 0.966 -3.864 1.00 0.00 C
ATOM 27 O HIS A 1 -7.052 -0.652 -3.043 1.00 0.00 O
ATOM 28 HD2 LYS A 7 -23.307 7.903 -12.578 1.00 0.00 H
ATOM 29 N LYS A 7 -20.192 6.016 -9.211 1.00 0.00 N
ATOM 30 HG1 LYS A 7 -23.218 8.920 -9.669 1.00 0.00 H
ATOM 31 CG LYS A 7 -22.718 8.543 -10.583 1.00 0.00 C
ATOM 32 O PRO A 6 -18.564 4.541 -9.520 1.00 0.00 O
ATOM 33 C LYS A 7 -21.275 7.745 -7.878 1.00 0.00 C
ATOM 34 HB2 LYS A 7 -21.529 6.879 -11.239 1.00 0.00 H
ATOM 35 N HIS A 3 -4.856 1.020 -4.467 1.00 0.00 N1+
ATOM 36 C HIS A 1 -6.978 1.567 -1.159 1.00 0.00 C
ATOM 37 C HIS A 3 -6.298 2.901 -1.463 1.00 0.00 C
ATOM 38 CA LYS A 7 -20.807 7.336 -9.261 1.00 0.00 C
ATOM 39 OXT LYS A 7 -21.820 8.960 -7.679 1.00 0.00 O1-
ATOM 40 C HIS A 1 -7.710 0.360 -3.225 1.00 0.00 C
ATOM 41 C PRO A 6 -18.914 5.711 -9.586 1.00 0.00 C
ATOM 42 C HIS A 2 -7.321 0.378 -5.734 1.00 0.00 C
ATOM 43 H HIS A 3 -3.158 1.821 -3.419 1.00 0.00 H
ATOM 44 O HIS A 2 -7.692 -0.235 -7.967 1.00 0.00 O
ATOM 45 C HIS A 2 -8.191 0.273 -6.969 1.00 0.00 C
ATOM 46 C HIS A 3 -5.258 4.583 -2.317 1.00 0.00 C
ATOM 47 HE2 LYS A 7 -23.887 10.332 -12.373 1.00 0.00 H
ATOM 48 N HIS A 1 -9.070 0.230 -1.224 1.00 0.00 N1+
ATOM 49 C HIS A 1 -8.203 1.121 -2.009 1.00 0.00 C
ATOM 50 H HIS A 1 -7.324 1.663 -0.106 1.00 0.00 H
ATOM 51 N HIS A 2 -7.970 0.824 -4.481 1.00 0.00 N
ATOM 52 O HIS A 3 -11.396 2.192 -8.159 1.00 0.00 O
ATOM 53 HE21 GLN A 4 -12.589 -0.078 -13.430 1.00 0.00 H
ATOM 54 HB1 ALA A 5 -15.859 3.054 -10.675 1.00 0.00 H
ATOM 55 HG2 LYS A 7 -22.001 9.307 -10.953 1.00 0.00 H
ATOM 56 N HIS A 3 -5.804 3.391 -2.636 1.00 0.00 N1+
ATOM 57 H HIS A 2 -6.719 1.248 -6.058 1.00 0.00 H
ATOM 58 N HIS A 3 -9.168 1.197 -7.134 1.00 0.00 N
ATOM 59 HG1 GLN A 4 -12.022 1.151 -11.540 1.00 0.00 H
ATOM 60 HA LYS A 7 -20.089 8.107 -9.583 1.00 0.00 H
ATOM 61 HB1 PRO A 6 -18.787 6.482 -12.080 1.00 0.00 H
HETATM 62 CU UNK A 3 -5.772 2.844 -4.546 1.00 0.00 Cu
ATOM 63 H HIS A 3 -4.781 5.240 -3.032 1.00 0.00 H
ATOM 64 HA ALA A 5 -14.298 4.079 -8.964 1.00 0.00 H
ATOM 65 CB ALA A 5 -14.949 3.615 -10.977 1.00 0.00 C
ATOM 66 NE2 GLN A 4 -11.842 0.358 -13.991 1.00 0.00 N
ATOM 67 HB2 ALA A 5 -14.197 2.839 -11.165 1.00 0.00 H
ATOM 68 O ALA A 5 -16.267 5.324 -8.365 1.00 0.00 O
ATOM 69 CA PRO A 6 -17.903 6.749 -10.104 1.00 0.00 C
ATOM 70 CB PRO A 6 -18.352 7.310 -11.472 1.00 0.00 C
ATOM 71 C ALA A 5 -15.863 5.423 -9.516 1.00 0.00 C
ATOM 72 HA GLN A 4 -12.518 3.076 -10.013 1.00 0.00 H
ATOM 73 C HIS A 3 -10.386 2.645 -8.682 1.00 0.00 C
ATOM 74 H HIS A 1 -8.800 2.021 -2.276 1.00 0.00 H
ATOM 75 CG GLN A 4 -11.202 1.729 -12.019 1.00 0.00 C
ATOM 76 CA ALA A 5 -14.588 4.647 -9.876 1.00 0.00 C
ATOM 77 HE22 GLN A 4 -11.721 0.066 -14.972 1.00 0.00 H
ATOM 78 N PRO A 6 -16.602 6.157 -10.426 1.00 0.00 N
ATOM 79 HD1 PRO A 6 -16.508 5.607 -12.449 1.00 0.00 H
ATOM 80 C HIS A 3 -9.026 2.141 -8.233 1.00 0.00 C
ATOM 81 HG2 GLN A 4 -10.259 1.512 -11.473 1.00 0.00 H
ATOM 82 HB2 PRO A 6 -19.080 8.144 -11.463 1.00 0.00 H
ATOM 83 CD GLN A 4 -11.032 1.300 -13.453 1.00 0.00 C
ATOM 84 H HIS A 3 -8.004 4.435 -3.309 1.00 0.00 H
ATOM 85 HA PRO A 6 -17.733 7.552 -9.353 1.00 0.00 H
ATOM 86 CA GLN A 4 -11.737 3.694 -10.474 1.00 0.00 C
ATOM 87 HB3 ALA A 5 -15.121 4.084 -11.957 1.00 0.00 H
ATOM 88 N HIS A 3 -7.546 3.649 -5.265 1.00 0.00 N1+
ATOM 89 CD PRO A 6 -16.194 6.441 -11.787 1.00 0.00 C
ATOM 90 H HIS A 3 -8.624 1.640 -9.143 1.00 0.00 H
ATOM 91 C HIS A 3 -8.280 4.323 -4.346 1.00 0.00 C
ATOM 92 N GLN A 4 -10.482 3.489 -9.752 1.00 0.00 N
ATOM 93 CB GLN A 4 -11.536 3.226 -11.934 1.00 0.00 C
ATOM 94 CG PRO A 6 -17.034 7.663 -12.126 1.00 0.00 C
ATOM 95 HB1 GLN A 4 -12.464 3.411 -12.517 1.00 0.00 H
ATOM 96 N ALA A 5 -13.474 5.541 -10.217 1.00 0.00 N
ATOM 97 C HIS A 3 -8.272 3.781 -6.423 1.00 0.00 C
ATOM 98 OE1 GLN A 4 -10.151 1.803 -14.135 1.00 0.00 O
ATOM 99 C HIS A 3 -7.965 3.208 -7.788 1.00 0.00 C
ATOM 100 HG1 PRO A 6 -17.093 7.888 -13.212 1.00 0.00 H
ATOM 101 C GLN A 4 -12.185 5.147 -10.491 1.00 0.00 C
ATOM 102 N HIS A 3 -9.400 4.852 -4.866 1.00 0.00 N
ATOM 103 HD2 PRO A 6 -15.126 6.702 -11.911 1.00 0.00 H
ATOM 104 H GLN A 4 -9.620 3.883 -10.157 1.00 0.00 H
ATOM 105 H HIS A 3 -6.974 2.714 -7.727 1.00 0.00 H
ATOM 106 C HIS A 3 -9.405 4.520 -6.160 1.00 0.00 C
ATOM 107 HG2 PRO A 6 -16.616 8.548 -11.594 1.00 0.00 H
ATOM 108 H HIS A 3 -10.121 5.413 -4.360 1.00 0.00 H
ATOM 109 HB2 GLN A 4 -10.720 3.819 -12.405 1.00 0.00 H
ATOM 110 H ALA A 5 -13.666 6.554 -10.236 1.00 0.00 H
ATOM 111 H HIS A 3 -7.872 4.017 -8.542 1.00 0.00 H
ATOM 112 O GLN A 4 -11.366 5.998 -10.810 1.00 0.00 O
ATOM 113 H HIS A 3 -10.182 4.797 -6.859 1.00 0.00 H
ATOM 114 H HIS A 2 -8.566 1.652 -4.523 1.00 0.00 H
ATOM 115 H HIS A 3 -9.601 1.600 -6.295 1.00 0.00 H
ATOM 116 O HIS A 3 -4.485 3.916 -5.438 1.00 0.00 O1+
ATOM 117 H HIS A 3 -4.987 4.712 -5.745 1.00 0.00 H
ATOM 118 H HIS A 3 -4.284 3.414 -6.268 1.00 0.00 H
ATOM 119 H HIS A 1 -8.546 -0.612 -0.891 1.00 0.00 H
ATOM 120 H HIS A 1 -9.882 -0.077 -1.808 1.00 0.00 H
ATOM 121 H HIS A 1 -9.449 0.743 -0.394 1.00 0.00 H
CONECT 1 2
CONECT 2 5 1 11 11
CONECT 3 5
CONECT 4 10
CONECT 5 2 26 3
CONECT 6 15
CONECT 7 16
CONECT 8 13
CONECT 9 24
CONECT 10 22 18 4 23
CONECT 11 2 2 13 35
CONECT 12 13
CONECT 13 11 42 8 12
CONECT 14 29
CONECT 15 25 6 37 37
CONECT 16 23 7 28 31
CONECT 17 25
CONECT 18 10
CONECT 19 36
CONECT 20 23
CONECT 21 33 33
CONECT 22 10
CONECT 23 16 10 47 20
CONECT 24 31 9 34 38
CONECT 25 15 46 17
CONECT 26 5 35 35 43
CONECT 27 40 40
CONECT 28 16
CONECT 29 38 14 41
CONECT 30 31
CONECT 31 24 16 55 30
CONECT 32 41 41
CONECT 33 21 21 39 38
CONECT 34 24
CONECT 35 26 26 11 62
CONECT 36 49 50 19 37
CONECT 37 15 15 36 56
CONECT 38 29 33 24 60
CONECT 39 33
CONECT 40 27 27 49 51
CONECT 41 32 32 29 69
CONECT 42 13 45 51 57
CONECT 43 26
CONECT 44 45 45
CONECT 45 42 44 44 58
CONECT 46 25 56 56 63
CONECT 47 23
CONECT 48 49 119 120 121
CONECT 49 36 48 40 74
CONECT 50 36
CONECT 51 42 40 114
CONECT 52 73 73
CONECT 53 66
CONECT 54 65
CONECT 55 31
CONECT 56 46 46 37 62
CONECT 57 42
CONECT 58 45 115 80
CONECT 59 75
CONECT 60 38
CONECT 61 70
CONECT 62 35 116 88 56
CONECT 63 46
CONECT 64 76
CONECT 65 54 67 87 76
CONECT 66 53 77 83
CONECT 67 65
CONECT 68 71 71
CONECT 69 70 85 41 78
CONECT 70 69 61 82 94
CONECT 71 68 68 78 76
CONECT 72 86
CONECT 73 52 52 92 80
CONECT 74 49
CONECT 75 83 59 81 93
CONECT 76 71 65 64 96
CONECT 77 66
CONECT 78 71 69 89
CONECT 79 89
CONECT 80 73 58 90 99
CONECT 81 75
CONECT 82 70
CONECT 83 75 98 98 66
CONECT 84 91
CONECT 85 69
CONECT 86 101 93 72 92
CONECT 87 65
CONECT 88 97 62 91 91
CONECT 89 78 94 79 103
CONECT 90 80
CONECT 91 88 88 84 102
CONECT 92 73 86 104
CONECT 93 86 75 109 95
CONECT 94 89 70 100 107
CONECT 95 93
CONECT 96 76 110 101
CONECT 97 88 106 106 99
CONECT 98 83 83
CONECT 99 97 80 111 105
CONECT 100 94
CONECT 101 86 112 112 96
CONECT 102 91 108 106
CONECT 103 89
CONECT 104 92
CONECT 105 99
CONECT 106 97 97 102 113
CONECT 107 94
CONECT 108 102
CONECT 109 93
CONECT 110 96
CONECT 111 99
CONECT 112 101 101
CONECT 113 106
CONECT 114 51
CONECT 115 58
CONECT 116 62 117 118
CONECT 117 116
CONECT 118 116
CONECT 119 48
CONECT 120 48
CONECT 121 48
MASTER 0 0 0 0 0 0 0 0 121 0 121 0
END

Hi, PDB is a fixed-width file format. Unless the lack of extra spaces is a result of pasting the text here, make sure your column spacing follows the PDB format specification.

Hey,
the spacing in my file is indeed correct. I don’t know it was pasted like that. Thank you for the file you send me. I read it whole and the only thing I see is different is the order of the atoms. I mean it looks like they are not in order. I don’t know if it is important or not because at the end of the file there’s this conect section.

Your problem is that you do not have valid atom names in the coordinate file. You just have elemental symbols, so pdb2gmx does not know how to interpret what they are.

Hi Jalemkul,
Is there maybe some better way for me to create a pdb file of my model protein? Or some better way to convert xyz file (or cml file) to pdb format than open babel, so it would name the atoms correctly?
Thank you in advance!