Skip to content

Commit

Permalink
Final 0.8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samirelanduk committed Dec 2, 2017
1 parent 5519c9d commit f0bb2f3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
29 changes: 25 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. |travis| image:: https://api.travis-ci.org/samirelanduk/atomium.svg?branch=0.7
.. |travis| image:: https://api.travis-ci.org/samirelanduk/atomium.svg?branch=0.8

.. _travis: https://travis-ci.org/samirelanduk/atomium/
.. _travis https://travis-ci.org/samirelanduk/atomium/
.. |coveralls| image:: https://coveralls.io/repos/github/samirelanduk/atomium/badge.svg?branch=0.7
.. |coveralls| image:: https://coveralls.io/repos/github/samirelanduk/atomium/badge.svg?branch=0.8

.. _coveralls: https://coveralls.io/github/samirelanduk/atomium/
.. _coveralls https://coveralls.io/github/samirelanduk/atomium/
.. |pypi| image:: https://img.shields.io/pypi/pyversions/atomium.svg

Expand Down Expand Up @@ -102,6 +102,12 @@ from the RCSB over the internet using the PDB code:
datetime.date(2002, 5, 6)
>>> pdb.resolution()
1.9
>>> pdb.rfactor()
0.193
>>> pdb.classification()
'LYASE'
>>> pdb.technique()
'X-RAY DIFFRACTION'
>>> pdb2.model()
<Model (2156 atoms)>

Expand Down Expand Up @@ -311,6 +317,21 @@ The ``Xyz`` or ``Pdb`` object itself can also be saved:
Changelog
---------

Release 0.8.0
~~~~~~~~~~~~~

`2 December 2017`

* Added option to get water residues in binding sites.
* Added extra PDB meta information parsing, such as:

* Classification
* Experimental Technique
* Source Organism
* Expression Organism
* R-factor


Release 0.7.0
~~~~~~~~~~~~~

Expand Down
22 changes: 14 additions & 8 deletions atomium/files/pdbstring2pdbdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ def extract_source(pdb_dict, lines):
pdb_dict["expression_system"] = matches[0]


def extract_technique(pdb_dict, lines):
"""Takes a ``dict`` and adds technique information to it by parsing file
lines.
:param dict pdb_dict: the ``dict`` to update.
:param list lines: the file lines to read from."""

line = get_line("EXPDTA", lines)
if line:
pdb_dict["technique"] = line[6:].strip()
if pdb_dict["technique"]: return
pdb_dict["technique"] = None


def extract_structure(pdb_dict, lines):
"""Takes a ``dict`` and adds structure information to it by parsing file
lines.
Expand Down Expand Up @@ -150,14 +164,6 @@ def extract_structure(pdb_dict, lines):
extract_connections(pdb_dict, conect_lines)


def extract_technique(pdb_dict, lines):
line = get_line("EXPDTA", lines)
if line:
pdb_dict["technique"] = line[6:].strip()
if pdb_dict["technique"]: return
pdb_dict["technique"] = None


def lines_to_model(atom_lines, hetatm_lines):
"""Creates a model ``dict`` from ATOM lines and HETATM lines.
Expand Down
3 changes: 3 additions & 0 deletions atomium/structures/molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ def site(self, include_water=False):
all the residues with a non-hydrogen atom within 4 Angstroms of a
non-hydrogen atom in the molecule.
:param bool include_water: If ``True``, water molecules will be\
obtained as well as residues.
:rtype: :py:class:`.Site`"""

from .chains import Site
Expand Down

0 comments on commit f0bb2f3

Please sign in to comment.