Code Monkey home page Code Monkey logo

Comments (5)

wojdyr avatar wojdyr commented on June 1, 2024

In usual PDB files the TER record ends polymer but not "chain".
Each chain has a different name - that's how they are separated.
I don't know what can be done here.
How would this file look like if there were ligands (non-polymers) in chains?

from gemmi.

sizmailov avatar sizmailov commented on June 1, 2024

The version for MD has ions and water. I guess it's sufficient example.

grep -B 4 -A 2 -m 40 TER trouble.pdb
ATOM   2077 HG23 VAL   138      -3.898   2.156  41.081  1.00  0.00
ATOM   2078  C   VAL   138      -3.121   4.086  42.599  1.00  0.00
ATOM   2079  O   VAL   138      -3.398   3.429  43.629  1.00  0.00
ATOM   2080  OXT VAL   138      -3.861   4.969  42.117  1.00  0.00
TER   
ATOM   2081  N   VAL   139     -23.085 -10.959 -28.434  1.00  0.00
ATOM   2082  H1  VAL   139     -22.568 -11.857 -28.339  1.00  0.00
--
ATOM   4157 HG23 VAL   276     -35.856   2.156 -41.081  1.00  0.00
ATOM   4158  C   VAL   276     -36.633   4.086 -42.599  1.00  0.00
ATOM   4159  O   VAL   276     -36.356   3.429 -43.629  1.00  0.00
ATOM   4160  OXT VAL   276     -35.893   4.969 -42.117  1.00  0.00
TER   
ATOM   4161  N   VAL   277      23.085  12.972  28.434  1.00  0.00
ATOM   4162  H1  VAL   277      22.569  12.074  28.339  1.00  0.00
--
ATOM   6237 HG23 VAL   414      35.856  26.087  41.081  1.00  0.00
ATOM   6238  C   VAL   414      36.634  28.017  42.599  1.00  0.00
ATOM   6239  O   VAL   414      36.356  27.360  43.629  1.00  0.00
ATOM   6240  OXT VAL   414      35.893  28.900  42.117  1.00  0.00
TER   
ATOM   6241  N   VAL   415      16.670  12.972 -28.434  1.00  0.00
ATOM   6242  H1  VAL   415      17.186  12.074 -28.339  1.00  0.00
--
ATOM   8317 HG23 VAL   552       3.899  26.087 -41.081  1.00  0.00
ATOM   8318  C   VAL   552       3.121  28.017 -42.599  1.00  0.00
ATOM   8319  O   VAL   552       3.399  27.360 -43.629  1.00  0.00
ATOM   8320  OXT VAL   552       3.862  28.900 -42.117  1.00  0.00
TER   
ATOM   8321 Na+  Na+   553      47.181 -19.633  -3.982  1.00  0.00
TER   
ATOM   8322 Na+  Na+   554       3.946 -25.853 -10.784  1.00  0.00
TER   
ATOM   8323 Na+  Na+   555     -50.408  26.517  14.763  1.00  0.00
TER   
ATOM   8324 Na+  Na+   556     -14.949  -8.966 -31.398  1.00  0.00
TER   
ATOM   8325 Na+  Na+   557     -15.589  -3.013 -37.197  1.00  0.00
TER   
ATOM   8326 Na+  Na+   558      38.640 -15.080  50.091  1.00  0.00
TER   
ATOM   8327 Na+  Na+   559     -15.149  -8.631  49.773  1.00  0.00
TER   
ATOM   8328 Na+  Na+   560      40.719  34.627   7.402  1.00  0.00
TER   
ATOM   8329 Na+  Na+   561     -28.126  30.960   5.551  1.00  0.00
TER   
ATOM   8330 Na+  Na+   562      35.619  -2.185  11.162  1.00  0.00
TER   
ATOM   8331 Na+  Na+   563      -2.874  21.675 -15.633  1.00  0.00
TER   
ATOM   8332 Na+  Na+   564      57.586  -5.895  49.164  1.00  0.00
TER   
ATOM   8333 Na+  Na+   565     -27.107  21.611   7.506  1.00  0.00
TER   
ATOM   8334 Na+  Na+   566      -7.431 -24.136 -10.510  1.00  0.00
TER   
ATOM   8335 Na+  Na+   567      40.804 -24.618  24.053  1.00  0.00
TER   
ATOM   8336 Na+  Na+   568     -15.058 -20.022 -22.262  1.00  0.00
TER   
ATOM   8337 Na+  Na+   569     -55.537 -26.315  -3.550  1.00  0.00
TER   
ATOM   8338 Na+  Na+   570      17.374  -9.138   8.193  1.00  0.00
TER   
ATOM   8339 Na+  Na+   571      10.786   7.946  14.537  1.00  0.00
TER   
ATOM   8340 Na+  Na+   572      25.211  -9.487  31.627  1.00  0.00
TER   
ATOM   8341 Na+  Na+   573      -3.738 -11.365 -19.198  1.00  0.00
TER   
ATOM   8342 Na+  Na+   574      40.738  18.775 -41.015  1.00  0.00
TER   
ATOM   8343 Na+  Na+   575     -55.892  26.840  31.042  1.00  0.00
TER   
ATOM   8344 Na+  Na+   576      -9.703  15.488  11.456  1.00  0.00
TER   
ATOM   8345 Na+  Na+   577     -57.016   0.302  50.828  1.00  0.00
TER   
ATOM   8346 Na+  Na+   578      37.543  30.856  -1.666  1.00  0.00
TER   
ATOM   8347 Na+  Na+   579      40.813  27.138 -22.923  1.00  0.00
TER   
ATOM   8348 Na+  Na+   580      -2.748  17.077  11.736  1.00  0.00
TER   
ATOM   8349  O   WAT   581      26.427   1.690   7.272  1.00  0.00
ATOM   8350  H1  WAT   581      25.681   1.214   7.738  1.00  0.00
ATOM   8351  H2  WAT   581      27.226   1.724   7.872  1.00  0.00
TER   
ATOM   8352  O   WAT   582      50.214 -19.403 -51.170  1.00  0.00
ATOM   8353  H1  WAT   582      50.180 -19.553 -52.159  1.00  0.00
ATOM   8354  H2  WAT   582      49.900 -18.477 -50.963  1.00  0.00
TER   
ATOM   8355  O   WAT   583     -55.075  25.518 -45.843  1.00  0.00
ATOM   8356  H1  WAT   583     -55.477  25.713 -44.949  1.00  0.00
ATOM   8357  H2  WAT   583     -54.288  24.911 -45.730  1.00  0.00
TER   
ATOM   8358  O   WAT   584      21.785   1.646 -46.980  1.00  0.00
ATOM   8359  H1  WAT   584      21.310   2.353 -46.457  1.00  0.00
ATOM   8360  H2  WAT   584      22.363   1.108 -46.366  1.00  0.00
TER   
ATOM   8361  O   WAT   585     -12.857  10.712 -43.838  1.00  0.00
ATOM   8362  H1  WAT   585     -11.898  10.432 -43.801  1.00  0.00
ATOM   8363  H2  WAT   585     -12.967  11.433 -44.523  1.00  0.00
TER   
ATOM   8364  O   WAT   586     -56.791 -14.426  53.394  1.00  0.00
ATOM   8365  H1  WAT   586     -56.103 -13.966  53.956  1.00  0.00
ATOM   8366  H2  WAT   586     -56.416 -15.284  53.044  1.00  0.00
TER   
ATOM   8367  O   WAT   587      23.832 -29.321  11.477  1.00  0.00
ATOM   8368  H1  WAT   587      23.680 -28.379  11.778  1.00  0.00
ATOM   8369  H2  WAT   587      23.223 -29.934  11.980  1.00  0.00
TER   
ATOM   8370  O   WAT   588      43.282 -20.239  13.531  1.00  0.00
ATOM   8371  H1  WAT   588      43.480 -19.311  13.216  1.00  0.00
ATOM   8372  H2  WAT   588      43.732 -20.898  12.928  1.00  0.00
TER   
ATOM   8373  O   WAT   589     -17.419  -8.307 -42.700  1.00  0.00
ATOM   8374  H1  WAT   589     -17.180  -8.501 -41.748  1.00  0.00

Patched #36 version parses it as follows

<gemmi.Chain  with 138 res>
<gemmi.Chain  with 138 res>
<gemmi.Chain  with 138 res>
<gemmi.Chain  with 138 res>
<gemmi.Chain  with 1 res>
<gemmi.Chain  with 1 res>
<gemmi.Chain  with 1 res>
...

Probably it's not desired in other library applications since it quite different from current master:

<gemmi.Chain  with 20599 res>

from gemmi.

sizmailov avatar sizmailov commented on June 1, 2024

An optional parameter could be a compromise, e.g.:

gemmi.read_pdb("temp.pdb", split_chain_on_ter=True) # False by default 

from gemmi.

wojdyr avatar wojdyr commented on June 1, 2024

OK, I added such an option.

from gemmi.

sizmailov avatar sizmailov commented on June 1, 2024

Thanks for quick fix!

from gemmi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.