Skip to content

Commit

Permalink
updated weblinks to PDB file format in PDB.py and PDBQT.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zemanj authored and orbeckst committed Jun 27, 2018
1 parent 36a7a5a commit 339c510
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
54 changes: 27 additions & 27 deletions package/MDAnalysis/coordinates/PDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
.. _`PDB 3.2 standard`:
http://www.wwpdb.org/documentation/format32/v3.2.html
http://www.wwpdb.org/documentation/file-format-content/format32/v3.2.html
"""
from __future__ import absolute_import
Expand Down Expand Up @@ -180,11 +180,11 @@ class PDBReader(base.ReaderBase):
Reads multi-`MODEL`_ PDB files as trajectories.
.. _PDB-formatted:
http://www.wwpdb.org/documentation/file-format-content/format33/v3.3.html
http://www.wwpdb.org/documentation/file-format-content/format32/v3.2.html
.. _PDB coordinate section:
http://www.wwpdb.org/documentation/format32/sect9.html
http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html
.. _MODEL:
http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
============= ============ =========== =============================================
COLUMNS DATA TYPE FIELD DEFINITION
Expand Down Expand Up @@ -428,10 +428,10 @@ class PDBWriter(base.WriterBase):
multiple models (using the MODEL_ and ENDMDL_ records).
.. _`PDB 3.2 standard`:
http://www.wwpdb.org/documentation/format32/v3.2.html
.. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL
.. _CONECT: http://www.wwpdb.org/documentation/format32/sect10.html#CONECT
http://www.wwpdb.org/documentation/file-format-content/format32/v3.2.html
.. _MODEL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ENDMDL
.. _CONECT: http://www.wwpdb.org/documentation/file-format-content/format32/sect10.html#CONECT
Note
Expand Down Expand Up @@ -556,9 +556,9 @@ def __init__(self, filename, bonds="conect", n_atoms=None, start=0, step=1,
records. If ``None``, then the class default is chosen. [``None``]
.. _CONECT: http://www.wwpdb.org/documentation/format32/sect10.html#CONECT
.. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL
.. _CONECT: http://www.wwpdb.org/documentation/file-format-content/format32/sect10.html#CONECT
.. _MODEL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ENDMDL
"""
# n_atoms = None : dummy keyword argument
Expand Down Expand Up @@ -870,9 +870,9 @@ def _write_timestep(self, ts, multiframe=False):
:class:`PDBWriter` is in single frame mode and no MODEL_
records are written.
.. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL
.. _NUMMDL: http://www.wwpdb.org/documentation/format32/sect2.html#NUMMDL
.. _MODEL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ENDMDL
.. _NUMMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect2.html#NUMMDL
.. versionchanged:: 0.7.6
The *multiframe* keyword was added, which completely determines if
Expand Down Expand Up @@ -929,7 +929,7 @@ def get_attr(attrname, default):
vals['segID'] = segids[i][:4]
vals['element'] = guess_atom_element(atomnames[i].strip())[:2]

# .. _ATOM: http://www.wwpdb.org/documentation/format32/sect9.html
# .. _ATOM: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ATOM
self.pdbfile.write(self.fmt['ATOM'].format(**vals))
if multiframe:
self.ENDMDL()
Expand All @@ -938,7 +938,7 @@ def get_attr(attrname, default):
def HEADER(self, trajectory):
"""Write HEADER_ record.
.. _HEADER: http://www.wwpdb.org/documentation/format32/sect2.html#HEADER
.. _HEADER: http://www.wwpdb.org/documentation/file-format-content/format32/sect2.html#HEADER
"""
if not hasattr(trajectory, 'header'):
Expand All @@ -949,7 +949,7 @@ def HEADER(self, trajectory):
def TITLE(self, *title):
"""Write TITLE_ record.
.. _TITLE: http://www.wwpdb.org/documentation/format32/sect2.html
.. _TITLE: http://www.wwpdb.org/documentation/file-format-content/format32/sect2.html
"""
line = " ".join(title) # TODO: should do continuation automatically
Expand All @@ -963,8 +963,8 @@ def REMARK(self, *remarks):
See also `REMARK (update)`_.
.. _REMARK: http://www.wwpdb.org/documentation/format32/remarks1.html
.. _REMARK (update): http://www.wwpdb.org/documentation/format32/remarks2.html
.. _REMARK: http://www.wwpdb.org/documentation/file-format-content/format32/remarks1.html
.. _REMARK (update): http://www.wwpdb.org/documentation/file-format-content/format32/remarks2.html
"""
for remark in remarks:
Expand All @@ -980,7 +980,7 @@ def COMPND(self, trajectory):
def CRYST1(self, dimensions, spacegroup='P 1', zvalue=1):
"""Write CRYST1_ record.
.. _CRYST1: http://www.wwpdb.org/documentation/format32/sect8.html
.. _CRYST1: http://www.wwpdb.org/documentation/file-format-content/format32/sect8.html#CRYST1
"""
self.pdbfile.write(self.fmt['CRYST1'].format(
Expand All @@ -999,7 +999,7 @@ def MODEL(self, modelnumber):
9999, they will wrap around, i.e., 9998, 9999, 0, 1, 2, ...
.. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
.. _MODEL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
.. versionchanged:: 0.18.1
Expand All @@ -1016,7 +1016,7 @@ def END(self):
method right before closing the file it is recommended to *not* call
:meth:`~PDBWriter.END` explicitly.
.. _END: http://www.wwpdb.org/documentation/format32/sect11.html#END
.. _END: http://www.wwpdb.org/documentation/file-format-content/format32/sect11.html#END
"""
if not self.has_END:
Expand All @@ -1027,15 +1027,15 @@ def END(self):
def ENDMDL(self):
"""Write the ENDMDL_ record.
.. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL
.. _ENDMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ENDMDL
"""
self.pdbfile.write(self.fmt['ENDMDL'])

def CONECT(self, conect):
"""Write CONECT_ record.
.. _CONECT: http://www.wwpdb.org/documentation/format32/sect10.html#CONECT
.. _CONECT: http://www.wwpdb.org/documentation/file-format-content/format32/sect10.html#CONECT
"""
conect = ["{0:5d}".format(entry + 1) for entry in conect]
Expand Down Expand Up @@ -1075,9 +1075,9 @@ class MultiPDBWriter(PDBWriter):
and ENDMDL_ records).
.. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL
.. _CONECT: http://www.wwpdb.org/documentation/format32/sect10.html#CONECT
.. _MODEL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#MODEL
.. _ENDMDL: http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html#ENDMDL
.. _CONECT: http://www.wwpdb.org/documentation/file-format-content/format32/sect10.html#CONECT
See Also
Expand Down
10 changes: 5 additions & 5 deletions package/MDAnalysis/coordinates/PDBQT.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PDBQTReader(base.SingleFrameReaderBase):
.. _PDB format documentation:
http://www.wwpdb.org/documentation/format32/sect9.html
http://www.wwpdb.org/documentation/file-format-content/format32/v3.2.html
.. _AutoDOCK extensions:
http://autodock.scripps.edu/faqs-help/faq/what-is-the-format-of-a-pdbqt-file
Expand Down Expand Up @@ -192,7 +192,7 @@ def Writer(self, filename, **kwargs):
class PDBQTWriter(base.WriterBase):
"""PDBQT writer that implements a subset of the PDB_ 3.2 standard and the PDBQT_ spec.
.. _PDB: http://www.wwpdb.org/documentation/file-format
.. _PDB: http://www.wwpdb.org/documentation/file-format-content/format32/v3.2.html
.. _PDBQT: http://autodock.scripps.edu/faqs-help/faq/what-is-the-format-of-a-pdbqt-file
"""

Expand Down Expand Up @@ -302,18 +302,18 @@ def write(self, selection, frame=None):
self.pdb_coor_limits["max"]))

# Write title record
# http://www.wwpdb.org/documentation/format32/sect2.html
# http://www.wwpdb.org/documentation/file-format-content/format32/sect2.html
line = "FRAME " + str(frame) + " FROM " + str(u.trajectory.filename)
self.pdb.write(self.fmt['TITLE'].format(line))

# Write CRYST1 record
# http://www.wwpdb.org/documentation/format32/sect8.html
# http://www.wwpdb.org/documentation/file-format-content/format32/sect8.html
box = self.convert_dimensions_to_unitcell(u.trajectory.ts)
self.pdb.write(self.fmt['CRYST1'].format(box=box[:3], ang=box[3:],
spacegroup='P 1', zvalue=1))

# Write atom records
# http://www.wwpdb.org/documentation/format32/sect9.html
# http://www.wwpdb.org/documentation/file-format-content/format32/sect9.html
for serial, (pos, name, resname, chainid, resid, icode,
occupancy, tempfactor, charge, element) in enumerate(
zip(coor, attrs['names'], attrs['resnames'], attrs['chainids'],
Expand Down

0 comments on commit 339c510

Please sign in to comment.