From 339c5106d8ee71d6c9a7ab88eb2fd6fbd2354140 Mon Sep 17 00:00:00 2001 From: zeman Date: Wed, 27 Jun 2018 22:05:01 +0200 Subject: [PATCH] updated weblinks to PDB file format in PDB.py and PDBQT.py --- package/MDAnalysis/coordinates/PDB.py | 54 ++++++++++++------------- package/MDAnalysis/coordinates/PDBQT.py | 10 ++--- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/package/MDAnalysis/coordinates/PDB.py b/package/MDAnalysis/coordinates/PDB.py index fed31308144..a084b403626 100644 --- a/package/MDAnalysis/coordinates/PDB.py +++ b/package/MDAnalysis/coordinates/PDB.py @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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() @@ -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'): @@ -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 @@ -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: @@ -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( @@ -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 @@ -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: @@ -1027,7 +1027,7 @@ 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']) @@ -1035,7 +1035,7 @@ def ENDMDL(self): 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] @@ -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 diff --git a/package/MDAnalysis/coordinates/PDBQT.py b/package/MDAnalysis/coordinates/PDBQT.py index 73a817d0f3a..f9e488542a2 100644 --- a/package/MDAnalysis/coordinates/PDBQT.py +++ b/package/MDAnalysis/coordinates/PDBQT.py @@ -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 @@ -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 """ @@ -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'],