From 263bbe65047e535fbad981852ad9c7327826f93d Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 8 Jan 2025 23:06:39 +0100 Subject: [PATCH] format all (#4885) --- package/MDAnalysis/__init__.py | 48 +- package/MDAnalysis/lib/distances.py | 2 +- package/MDAnalysis/units.py | 229 +++-- package/doc/sphinx/source/conf.py | 197 ++-- package/pyproject.toml | 19 - testsuite/MDAnalysisTests/__init__.py | 2 +- testsuite/MDAnalysisTests/datafiles.py | 957 +++++++++++------- testsuite/MDAnalysisTests/dummy.py | 79 +- testsuite/MDAnalysisTests/test_api.py | 26 +- testsuite/MDAnalysisTests/util.py | 51 +- testsuite/pyproject.toml | 21 - .../scripts/modeller_make_A6PA6_alpha.py | 10 +- 12 files changed, 949 insertions(+), 692 deletions(-) diff --git a/package/MDAnalysis/__init__.py b/package/MDAnalysis/__init__.py index 69d992afef8..6843c3738ab 100644 --- a/package/MDAnalysis/__init__.py +++ b/package/MDAnalysis/__init__.py @@ -150,8 +150,7 @@ """ -__all__ = ['Universe', 'Writer', - 'AtomGroup', 'ResidueGroup', 'SegmentGroup'] +__all__ = ["Universe", "Writer", "AtomGroup", "ResidueGroup", "SegmentGroup"] import logging import warnings @@ -161,10 +160,11 @@ logger = logging.getLogger("MDAnalysis.__init__") from .version import __version__ + try: from .authors import __authors__ except ImportError: - logger.info('Could not find authors.py, __authors__ will be empty.') + logger.info("Could not find authors.py, __authors__ will be empty.") __authors__ = [] # Registry of Readers, Parsers and Writers known to MDAnalysis @@ -178,16 +178,23 @@ _SELECTION_WRITERS: Dict = {} _CONVERTERS: Dict = {} # Registry of TopologyAttributes -_TOPOLOGY_ATTRS: Dict = {} # {attrname: cls} -_TOPOLOGY_TRANSPLANTS: Dict = {} # {name: [attrname, method, transplant class]} -_TOPOLOGY_ATTRNAMES: Dict = {} # {lower case name w/o _ : name} +_TOPOLOGY_ATTRS: Dict = {} # {attrname: cls} +_TOPOLOGY_TRANSPLANTS: Dict = ( + {} +) # {name: [attrname, method, transplant class]} +_TOPOLOGY_ATTRNAMES: Dict = {} # {lower case name w/o _ : name} _GUESSERS: Dict = {} # custom exceptions and warnings from .exceptions import ( - SelectionError, NoDataError, ApplicationError, SelectionWarning, - MissingDataWarning, ConversionWarning, FileFormatWarning, - StreamWarning + SelectionError, + NoDataError, + ApplicationError, + SelectionWarning, + MissingDataWarning, + ConversionWarning, + FileFormatWarning, + StreamWarning, ) from .lib import log @@ -197,8 +204,9 @@ del logging # only MDAnalysis DeprecationWarnings are loud by default -warnings.filterwarnings(action='once', category=DeprecationWarning, - module='MDAnalysis') +warnings.filterwarnings( + action="once", category=DeprecationWarning, module="MDAnalysis" +) from . import units @@ -213,11 +221,17 @@ from .due import due, Doi, BibTeX -due.cite(Doi("10.25080/majora-629e541a-00e"), - description="Molecular simulation analysis library", - path="MDAnalysis", cite_module=True) -due.cite(Doi("10.1002/jcc.21787"), - description="Molecular simulation analysis library", - path="MDAnalysis", cite_module=True) +due.cite( + Doi("10.25080/majora-629e541a-00e"), + description="Molecular simulation analysis library", + path="MDAnalysis", + cite_module=True, +) +due.cite( + Doi("10.1002/jcc.21787"), + description="Molecular simulation analysis library", + path="MDAnalysis", + cite_module=True, +) del Doi, BibTeX diff --git a/package/MDAnalysis/lib/distances.py b/package/MDAnalysis/lib/distances.py index 2759a0ffb32..bbd1e56dd5b 100644 --- a/package/MDAnalysis/lib/distances.py +++ b/package/MDAnalysis/lib/distances.py @@ -403,7 +403,7 @@ def self_distance_array( for j in range(i + 1, n): dist[i, j] = dist[j, i] = d[k] k += 1 - + .. versionchanged:: 0.13.0 Added *backend* keyword. .. versionchanged:: 0.19.0 diff --git a/package/MDAnalysis/units.py b/package/MDAnalysis/units.py index 1affd05367d..15d4111df6b 100644 --- a/package/MDAnalysis/units.py +++ b/package/MDAnalysis/units.py @@ -173,15 +173,17 @@ # Remove in 2.8.0 class DeprecatedKeyAccessDict(dict): - deprecated_kB = 'Boltzman_constant' + deprecated_kB = "Boltzman_constant" def __getitem__(self, key): if key == self.deprecated_kB: - wmsg = ("Please use 'Boltzmann_constant' henceforth. The key " - "'Boltzman_constant' was a typo and will be removed " - "in MDAnalysis 2.8.0.") + wmsg = ( + "Please use 'Boltzmann_constant' henceforth. The key " + "'Boltzman_constant' was a typo and will be removed " + "in MDAnalysis 2.8.0." + ) warnings.warn(wmsg, DeprecationWarning) - key = 'Boltzmann_constant' + key = "Boltzmann_constant" return super().__getitem__(key) @@ -202,24 +204,31 @@ def __getitem__(self, key): #: http://physics.nist.gov/Pubs/SP811/appenB8.html#C #: #: .. versionadded:: 0.9.0 -constants = DeprecatedKeyAccessDict({ - 'N_Avogadro': 6.02214129e+23, # mol**-1 - 'elementary_charge': 1.602176565e-19, # As - 'calorie': 4.184, # J - 'Boltzmann_constant': 8.314462159e-3, # KJ (mol K)**-1 - 'electric_constant': 5.526350e-3, # As (Angstroms Volts)**-1 -}) +constants = DeprecatedKeyAccessDict( + { + "N_Avogadro": 6.02214129e23, # mol**-1 + "elementary_charge": 1.602176565e-19, # As + "calorie": 4.184, # J + "Boltzmann_constant": 8.314462159e-3, # KJ (mol K)**-1 + "electric_constant": 5.526350e-3, # As (Angstroms Volts)**-1 + } +) #: The basic unit of *length* in MDAnalysis is the Angstrom. #: Conversion factors between the base unit and other lengthUnits *x* are stored. #: Conversions follow `L/x = L/Angstrom * lengthUnit_factor[x]`. #: *x* can be *nm*/*nanometer* or *fm*. lengthUnit_factor = { - 'Angstrom': 1.0, 'A': 1.0, 'angstrom': 1.0, - u'\u212b': 1.0, # Unicode and UTF-8 encoded symbol for angstroms - 'nm': 1.0 / 10, 'nanometer': 1.0 / 10, - 'pm': 1e2, 'picometer': 1e2, - 'fm': 1e5, 'femtometer': 1e5, + "Angstrom": 1.0, + "A": 1.0, + "angstrom": 1.0, + "\u212b": 1.0, # Unicode and UTF-8 encoded symbol for angstroms + "nm": 1.0 / 10, + "nanometer": 1.0 / 10, + "pm": 1e2, + "picometer": 1e2, + "fm": 1e5, + "femtometer": 1e5, } @@ -235,8 +244,11 @@ def __getitem__(self, key): #: #: and molar mass 18.016 g mol**-1. water = { - 'exp': 0.997, 'SPC': 0.985, 'TIP3P': 1.002, 'TIP4P': 1.001, # in g cm**-3 - 'MolarMass': 18.016, # in g mol**-1 + "exp": 0.997, + "SPC": 0.985, + "TIP3P": 1.002, + "TIP4P": 1.001, # in g cm**-3 + "MolarMass": 18.016, # in g mol**-1 } #: The basic unit for *densities* is Angstrom**(-3), i.e. @@ -244,78 +256,97 @@ def __getitem__(self, key): #: it can be convenient to measure the density relative to bulk, and #: hence a number of values are pre-stored in :data:`water`. densityUnit_factor = { - 'Angstrom^{-3}': 1 / 1.0, 'A^{-3}': 1 / 1.0, - '\u212b^{-3}': 1 / 1.0, - 'nm^{-3}': 1 / 1e-3, 'nanometer^{-3}': 1 / 1e-3, - 'Molar': 1 / (1e-27 * constants['N_Avogadro']), - 'SPC': 1 / (1e-24 * constants['N_Avogadro'] * water['SPC'] / water['MolarMass']), - 'TIP3P': 1 / (1e-24 * constants['N_Avogadro'] * water['TIP3P'] / water['MolarMass']), - 'TIP4P': 1 / (1e-24 * constants['N_Avogadro'] * water['TIP4P'] / water['MolarMass']), - 'water': 1 / (1e-24 * constants['N_Avogadro'] * water['exp'] / water['MolarMass']), + "Angstrom^{-3}": 1 / 1.0, + "A^{-3}": 1 / 1.0, + "\u212b^{-3}": 1 / 1.0, + "nm^{-3}": 1 / 1e-3, + "nanometer^{-3}": 1 / 1e-3, + "Molar": 1 / (1e-27 * constants["N_Avogadro"]), + "SPC": 1 + / (1e-24 * constants["N_Avogadro"] * water["SPC"] / water["MolarMass"]), + "TIP3P": 1 + / (1e-24 * constants["N_Avogadro"] * water["TIP3P"] / water["MolarMass"]), + "TIP4P": 1 + / (1e-24 * constants["N_Avogadro"] * water["TIP4P"] / water["MolarMass"]), + "water": 1 + / (1e-24 * constants["N_Avogadro"] * water["exp"] / water["MolarMass"]), } #: For *time*, the basic unit is ps; in particular CHARMM's #: 1 AKMA_ time unit = 4.888821E-14 sec is supported. timeUnit_factor = { - 'ps': 1.0, 'picosecond': 1.0, # 1/1.0 - 'fs': 1e3, 'femtosecond': 1e3, # 1/1e-3, - 'ns': 1e-3, 'nanosecond': 1e-3, # 1/1e3, - 'ms': 1e-9, 'millisecond': 1e-9, # 1/1e9, - 'us': 1e-6, 'microsecond': 1e-6, '\u03BCs': 1e-6, # 1/1e6, - 'second': 1e-12, 'sec': 1e-12, 's': 1e-12, # 1/1e12, - 'AKMA': 1 / 4.888821e-2, + "ps": 1.0, + "picosecond": 1.0, # 1/1.0 + "fs": 1e3, + "femtosecond": 1e3, # 1/1e-3, + "ns": 1e-3, + "nanosecond": 1e-3, # 1/1e3, + "ms": 1e-9, + "millisecond": 1e-9, # 1/1e9, + "us": 1e-6, + "microsecond": 1e-6, + "\u03BCs": 1e-6, # 1/1e6, + "second": 1e-12, + "sec": 1e-12, + "s": 1e-12, # 1/1e12, + "AKMA": 1 / 4.888821e-2, } # getting the factor f: 1200ps * f = 1.2 ns ==> f = 1/1000 ns/ps #: For *speed*, the basic unit is Angstrom/ps. speedUnit_factor = { - 'Angstrom/ps': 1.0, 'A/ps': 1.0, '\u212b/ps': 1.0, - 'Angstrom/picosecond': 1.0, - 'angstrom/picosecond': 1.0, # 1 - 'Angstrom/fs': 1.0 * 1e3, - 'Angstrom/femtosecond': 1.0 * 1e3, - 'angstrom/femtosecond': 1.0 * 1e3, - 'angstrom/fs': 1.0 * 1e3, - 'A/fs': 1.0 * 1e3, - 'Angstrom/ms': 1.0 * 1e-9, - 'Angstrom/millisecond': 1.0 * 1e-9, - 'angstrom/millisecond': 1.0 * 1e-9, - 'angstrom/ms': 1.0 * 1e-9, - 'A/ms': 1.0 * 1e-9, - 'Angstrom/us': 1.0 * 1e-6, - 'angstrom/us': 1.0 * 1e-6, - 'A/us': 1.0 * 1e-6, - 'Angstrom/microsecond': 1.0 * 1e-6, - 'angstrom/microsecond': 1.0 * 1e-6, - 'Angstrom/\u03BCs': 1.0 * 1e-6, - 'angstrom/\u03BCs': 1.0 * 1e-6, - 'Angstrom/AKMA': 4.888821e-2, - 'A/AKMA': 4.888821e-2, - 'nm/ps': 0.1, 'nanometer/ps': 0.1, 'nanometer/picosecond': 0.1, # 1/10 - 'nm/ns': 0.1 / 1e-3, - 'pm/ps': 1e2, - 'm/s': 1e-10 / 1e-12, + "Angstrom/ps": 1.0, + "A/ps": 1.0, + "\u212b/ps": 1.0, + "Angstrom/picosecond": 1.0, + "angstrom/picosecond": 1.0, # 1 + "Angstrom/fs": 1.0 * 1e3, + "Angstrom/femtosecond": 1.0 * 1e3, + "angstrom/femtosecond": 1.0 * 1e3, + "angstrom/fs": 1.0 * 1e3, + "A/fs": 1.0 * 1e3, + "Angstrom/ms": 1.0 * 1e-9, + "Angstrom/millisecond": 1.0 * 1e-9, + "angstrom/millisecond": 1.0 * 1e-9, + "angstrom/ms": 1.0 * 1e-9, + "A/ms": 1.0 * 1e-9, + "Angstrom/us": 1.0 * 1e-6, + "angstrom/us": 1.0 * 1e-6, + "A/us": 1.0 * 1e-6, + "Angstrom/microsecond": 1.0 * 1e-6, + "angstrom/microsecond": 1.0 * 1e-6, + "Angstrom/\u03BCs": 1.0 * 1e-6, + "angstrom/\u03BCs": 1.0 * 1e-6, + "Angstrom/AKMA": 4.888821e-2, + "A/AKMA": 4.888821e-2, + "nm/ps": 0.1, + "nanometer/ps": 0.1, + "nanometer/picosecond": 0.1, # 1/10 + "nm/ns": 0.1 / 1e-3, + "pm/ps": 1e2, + "m/s": 1e-10 / 1e-12, } # (TODO: build this combinatorically from lengthUnit and timeUnit) #: *Energy* is measured in kJ/mol. energyUnit_factor = { - 'kJ/mol': 1.0, - 'kcal/mol': 1/constants['calorie'], - 'J': 1e3/constants['N_Avogadro'], - 'eV': 1e3/(constants['N_Avogadro'] * constants['elementary_charge']), - } + "kJ/mol": 1.0, + "kcal/mol": 1 / constants["calorie"], + "J": 1e3 / constants["N_Avogadro"], + "eV": 1e3 / (constants["N_Avogadro"] * constants["elementary_charge"]), +} #: For *force* the basic unit is kJ/(mol*Angstrom). forceUnit_factor = { - 'kJ/(mol*Angstrom)': 1.0, 'kJ/(mol*A)': 1.0, - 'kJ/(mol*\u212b)': 1.0, - 'kJ/(mol*nm)': 10.0, - 'Newton': 1e13/constants['N_Avogadro'], - 'N': 1e13/constants['N_Avogadro'], - 'J/m': 1e13/constants['N_Avogadro'], - 'kcal/(mol*Angstrom)': 1/constants['calorie'], + "kJ/(mol*Angstrom)": 1.0, + "kJ/(mol*A)": 1.0, + "kJ/(mol*\u212b)": 1.0, + "kJ/(mol*nm)": 10.0, + "Newton": 1e13 / constants["N_Avogadro"], + "N": 1e13 / constants["N_Avogadro"], + "J/m": 1e13 / constants["N_Avogadro"], + "kcal/(mol*Angstrom)": 1 / constants["calorie"], } # (TODO: build this combinatorically from lengthUnit and energyUnit) @@ -329,22 +360,23 @@ def __getitem__(self, key): #: Use CODATA 2010 value for *elementary charge*, which differs from the previously used value #: *e* = 1.602176487 x 10**(-19) C by 7.8000000e-27 C. chargeUnit_factor = { - 'e': 1.0, - 'Amber': 18.2223, # http://ambermd.org/formats.html#parm - 'C': constants['elementary_charge'], 'As': constants['elementary_charge'], + "e": 1.0, + "Amber": 18.2223, # http://ambermd.org/formats.html#parm + "C": constants["elementary_charge"], + "As": constants["elementary_charge"], } #: :data:`conversion_factor` is used by :func:`get_conversion_factor` #: NOTE: any observable with a unit (i.e. one with an entry in #: the :attr:`unit` attribute) needs an entry in :data:`conversion_factor` conversion_factor = { - 'length': lengthUnit_factor, - 'density': densityUnit_factor, - 'time': timeUnit_factor, - 'charge': chargeUnit_factor, - 'speed': speedUnit_factor, - 'force': forceUnit_factor, - 'energy': energyUnit_factor, + "length": lengthUnit_factor, + "density": densityUnit_factor, + "time": timeUnit_factor, + "charge": chargeUnit_factor, + "speed": speedUnit_factor, + "force": forceUnit_factor, + "energy": energyUnit_factor, } #: Generated lookup table (dict): returns the type of unit for a known input unit. @@ -357,12 +389,14 @@ def __getitem__(self, key): unit_types[unit] = utype #: Lookup table for base units in MDAnalysis by unit type. -MDANALYSIS_BASE_UNITS = {"length": "A", - "time": "ps", - "energy": "kJ/mol", - "charge": "e", - "force": "kJ/(mol*A)", - "speed": "A/ps"} +MDANALYSIS_BASE_UNITS = { + "length": "A", + "time": "ps", + "energy": "kJ/mol", + "charge": "e", + "force": "kJ/(mol*A)", + "speed": "A/ps", +} def get_conversion_factor(unit_type, u1, u2): @@ -397,17 +431,22 @@ def convert(x, u1, u2): try: ut1 = unit_types[u1] except KeyError: - errmsg = (f"unit '{u1}' not recognized.\n" - f"It must be one of {', '.join(unit_types)}.") + errmsg = ( + f"unit '{u1}' not recognized.\n" + f"It must be one of {', '.join(unit_types)}." + ) raise ValueError(errmsg) from None - + try: ut2 = unit_types[u2] except KeyError: - errmsg = (f"unit '{u2}' not recognized.\n" - f"It must be one of {', '.join(unit_types)}.") + errmsg = ( + f"unit '{u2}' not recognized.\n" + f"It must be one of {', '.join(unit_types)}." + ) raise ValueError(errmsg) from None if ut1 != ut2: - raise ValueError("Cannot convert between unit types " - "{0} --> {1}".format(u1, u2)) + raise ValueError( + "Cannot convert between unit types " "{0} --> {1}".format(u1, u2) + ) return x * get_conversion_factor(ut1, u1, u2) diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py index 40a096c0275..d1a288ed346 100644 --- a/package/doc/sphinx/source/conf.py +++ b/package/doc/sphinx/source/conf.py @@ -15,6 +15,7 @@ import os import datetime import MDAnalysis as mda + # Custom MDA Formating from pybtex.style.formatting.unsrt import Style as UnsrtStyle from pybtex.style.labels import BaseLabelStyle @@ -26,29 +27,29 @@ # here. # make sure sphinx always uses the current branch -sys.path.insert(0, os.path.abspath('../../..')) +sys.path.insert(0, os.path.abspath("../../..")) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.mathjax', - 'sphinx.ext.viewcode', - 'sphinx.ext.napoleon', - 'sphinx.ext.todo', - 'sphinx_sitemap', - 'mdanalysis_sphinx_theme', - 'sphinxcontrib.bibtex', - 'sphinx.ext.doctest', + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.viewcode", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx_sitemap", + "mdanalysis_sphinx_theme", + "sphinxcontrib.bibtex", + "sphinx.ext.doctest", ] -bibtex_bibfiles = ['references.bib'] +bibtex_bibfiles = ["references.bib"] # Define custom MDA style for references @@ -56,20 +57,20 @@ class KeyLabelStyle(BaseLabelStyle): def format_labels(self, entries): entry_list = [] for entry in entries: - author = str(entry.persons['author'][0]).split(",")[0] - year = entry.fields['year'] + author = str(entry.persons["author"][0]).split(",")[0] + year = entry.fields["year"] entry_list.append(f"{author}{year}") return entry_list class KeyStyle(UnsrtStyle): - default_label_style = 'keylabel' + default_label_style = "keylabel" -register_plugin('pybtex.style.labels', 'keylabel', KeyLabelStyle) -register_plugin('pybtex.style.formatting', 'MDA', KeyStyle) +register_plugin("pybtex.style.labels", "keylabel", KeyLabelStyle) +register_plugin("pybtex.style.formatting", "MDA", KeyStyle) -mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML' +mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" # for sitemap with https://github.com/jdillard/sphinx-sitemap # This sitemap is correct both for the development and release docs, which @@ -84,31 +85,31 @@ class KeyStyle(UnsrtStyle): # templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = ".rst" # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. # 'index' has the advantage that it is immediately picked up by the webserver -master_doc = 'index' +master_doc = "index" # General information about the project. # (take the list from AUTHORS) # Ordering: (1) Naveen (2) Elizabeth, then all contributors in alphabetical order # (last) Oliver author_list = mda.__authors__ -authors = u', '.join(author_list[:-1]) + u', and ' + author_list[-1] -project = u'MDAnalysis' +authors = ", ".join(author_list[:-1]) + ", and " + author_list[-1] +project = "MDAnalysis" now = datetime.datetime.now() -copyright = u'2005-{}, '.format(now.year) + authors +copyright = "2005-{}, ".format(now.year) + authors # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # Dynamically calculate the version -packageversion = __import__('MDAnalysis').__version__ +packageversion = __import__("MDAnalysis").__version__ # The short X.Y version. # version = '.'.join(packageversion.split('.')[:2]) version = packageversion # needed for right sitemap.xml URLs @@ -117,40 +118,40 @@ class KeyStyle(UnsrtStyle): # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build'] +exclude_patterns = ["_build"] # The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'default' +pygments_style = "default" # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # to include decorated objects like __init__ -autoclass_content = 'both' +autoclass_content = "both" # to prevent including of member entries in toctree toc_object_entries = False @@ -159,7 +160,7 @@ class KeyStyle(UnsrtStyle): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'mdanalysis_sphinx_theme' +html_theme = "mdanalysis_sphinx_theme" extra_nav_links = {} extra_nav_links["MDAnalysis"] = "http://mdanalysis.org" @@ -176,15 +177,15 @@ class KeyStyle(UnsrtStyle): # further. For a list of options available for each theme, see the # documentation. html_context = { - 'versions_json_url': 'https://docs.mdanalysis.org/versions.json' + "versions_json_url": "https://docs.mdanalysis.org/versions.json" } # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -194,162 +195,158 @@ class KeyStyle(UnsrtStyle): # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # alabaster sidebars html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', - 'searchbox.html', + "**": [ + "about.html", + "navigation.html", + "relations.html", + "searchbox.html", ] } # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -html_use_opensearch = 'https://docs.mdanalysis.org' +html_use_opensearch = "https://docs.mdanalysis.org" # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'MDAnalysisdoc' +htmlhelp_basename = "MDAnalysisdoc" # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' +# latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' +# latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('MDAnalysis.tex', u'MDAnalysis Documentation', - authors, 'manual'), + ("MDAnalysis.tex", "MDAnalysis Documentation", authors, "manual"), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Additional stuff for the LaTeX preamble. -#latex_preamble = '' +# latex_preamble = '' # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - ('mdanalysis', u'MDAnalysis Documentation', - [authors], 1) -] +man_pages = [("mdanalysis", "MDAnalysis Documentation", [authors], 1)] # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'MDAnalysis' +epub_title = "MDAnalysis" epub_author = authors -epub_publisher = 'Arizona State University, Tempe, Arizona, USA' -epub_copyright = u'2015, '+authors +epub_publisher = "Arizona State University, Tempe, Arizona, USA" +epub_copyright = "2015, " + authors # The language of the text. It defaults to the language option # or en if the language is not set. -#epub_language = '' +# epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. -#epub_scheme = '' +# epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. -#epub_identifier = '' +# epub_identifier = '' # A unique identification for the text. -#epub_uid = '' +# epub_uid = '' # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. -#epub_pre_files = [] +# epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. -#epub_post_files = [] +# epub_post_files = [] # A list of files that should not be packed into the epub file. -#epub_exclude_files = [] +# epub_exclude_files = [] # The depth of the table of contents in toc.ncx. -#epub_tocdepth = 3 +# epub_tocdepth = 3 # Allow duplicate toc entries. -#epub_tocdup = True +# epub_tocdup = True # Configuration for intersphinx: refer to the Python standard library # and other packages used by MDAnalysis intersphinx_mapping = { - 'h5py': ('https://docs.h5py.org/en/stable', None), - 'python': ('https://docs.python.org/3/', None), - 'scipy': ('https://docs.scipy.org/doc/scipy/', None), - 'gsd': ('https://gsd.readthedocs.io/en/stable/', None), - 'maplotlib': ('https://matplotlib.org/stable/', None), - 'griddataformats': ('https://mdanalysis.org/GridDataFormats/', None), - 'pmda': ('https://mdanalysis.org/pmda/', None), - 'networkx': ('https://networkx.org/documentation/stable/', None), - 'numpy': ('https://numpy.org/doc/stable/', None), - 'parmed': ('https://parmed.github.io/ParmEd/html/', None), - 'rdkit': ('https://rdkit.org/docs/', None), - 'waterdynamics': ('https://www.mdanalysis.org/waterdynamics/', None), - 'pathsimanalysis': ('https://www.mdanalysis.org/PathSimAnalysis/', None), - 'mdahole2': ('https://www.mdanalysis.org/mdahole2/', None), - 'dask': ('https://docs.dask.org/en/stable/', None), + "h5py": ("https://docs.h5py.org/en/stable", None), + "python": ("https://docs.python.org/3/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/", None), + "gsd": ("https://gsd.readthedocs.io/en/stable/", None), + "maplotlib": ("https://matplotlib.org/stable/", None), + "griddataformats": ("https://mdanalysis.org/GridDataFormats/", None), + "pmda": ("https://mdanalysis.org/pmda/", None), + "networkx": ("https://networkx.org/documentation/stable/", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "parmed": ("https://parmed.github.io/ParmEd/html/", None), + "rdkit": ("https://rdkit.org/docs/", None), + "waterdynamics": ("https://www.mdanalysis.org/waterdynamics/", None), + "pathsimanalysis": ("https://www.mdanalysis.org/PathSimAnalysis/", None), + "mdahole2": ("https://www.mdanalysis.org/mdahole2/", None), + "dask": ("https://docs.dask.org/en/stable/", None), } diff --git a/package/pyproject.toml b/package/pyproject.toml index 04e76fdbfed..7e0ac361f26 100644 --- a/package/pyproject.toml +++ b/package/pyproject.toml @@ -126,25 +126,6 @@ MDAnalysis = [ [tool.black] line-length = 79 target-version = ['py310', 'py311', 'py312', 'py313'] -include = ''' -( -tables\.py -| due\.py -| setup\.py -| MDAnalysis/auxiliary/.*\.py -| MDAnalysis/visualization/.*\.py -| MDAnalysis/lib/.*\.py^ -| MDAnalysis/transformations/.*\.py -| MDAnalysis/topology/.*\.py -| MDAnalysis/analysis/.*\.py -| MDAnalysis/guesser/.*\.py -| MDAnalysis/converters/.*\.py -| MDAnalysis/coordinates/.*\.py -| MDAnalysis/tests/.*\.py -| MDAnalysis/selections/.*\.py -| MDAnalysis/core/.*\.py -) -''' extend-exclude = ''' ( __pycache__ diff --git a/testsuite/MDAnalysisTests/__init__.py b/testsuite/MDAnalysisTests/__init__.py index ea7b2d55706..75acebf06be 100644 --- a/testsuite/MDAnalysisTests/__init__.py +++ b/testsuite/MDAnalysisTests/__init__.py @@ -114,7 +114,7 @@ # collection of citations on the first `import MDAnalysis` so the environment # variable *must* come before MDAnalysis is imported the first time. See # issue #412 https://github.com/MDAnalysis/mdanalysis/issues/412 and PR #1822. -os.environ['DUECREDIT_ENABLE'] = 'yes' +os.environ["DUECREDIT_ENABLE"] = "yes" # Any tests that plot with matplotlib need to run with the simple agg backend # because on Travis there is no DISPLAY set. diff --git a/testsuite/MDAnalysisTests/datafiles.py b/testsuite/MDAnalysisTests/datafiles.py index 3d3d7d93129..deef782d773 100644 --- a/testsuite/MDAnalysisTests/datafiles.py +++ b/testsuite/MDAnalysisTests/datafiles.py @@ -37,14 +37,21 @@ """ __all__ = [ - "PSF", "DCD", "CRD", # CHARMM (AdK example, DIMS trajectory from JMB 2009 paper) + "PSF", + "DCD", + "CRD", # CHARMM (AdK example, DIMS trajectory from JMB 2009 paper) "DCD2", # CHARMM (AdK example, DIMS trajectory from PLOS Comput Biol paper) - "PSF_notop", "PSF_BAD", # Same as PSF but no bonds etc, malformed version of previous + "PSF_notop", + "PSF_BAD", # Same as PSF but no bonds etc, malformed version of previous "DCD_empty", - "PSF_TRICLINIC", "DCD_TRICLINIC", # CHARMM c36 new unitcell, NPT 125 TIP3P (box vectors, see Issue 187 for details) - "PSF_NAMD", "PDB_NAMD", # NAMD - "PSF_NAMD_TRICLINIC", "DCD_NAMD_TRICLINIC", # NAMD, triclinic unitcell (Issue 187) - "PSF_NAMD_GBIS", "DCD_NAMD_GBIS", # NAMD, implicit solvent, 100 steps, #1819 + "PSF_TRICLINIC", + "DCD_TRICLINIC", # CHARMM c36 new unitcell, NPT 125 TIP3P (box vectors, see Issue 187 for details) + "PSF_NAMD", + "PDB_NAMD", # NAMD + "PSF_NAMD_TRICLINIC", + "DCD_NAMD_TRICLINIC", # NAMD, triclinic unitcell (Issue 187) + "PSF_NAMD_GBIS", + "DCD_NAMD_GBIS", # NAMD, implicit solvent, 100 steps, #1819 "PSF_nosegid", # psf without a segid, Issue 121 "PSF_cmap", # ala3 PSF from ParmEd test files with cmap "PSF_inscode", # PSF file with insertion codes @@ -58,63 +65,130 @@ "PDB_icodes", # stripped down version of 1osm, has icodes! "PDB_varying", # varying occupancies and tempfactors "XPDB_small", - "PDB_full", # PDB 4E43 (full HEADER, TITLE, COMPND, REMARK, altloc) + "PDB_full", # PDB 4E43 (full HEADER, TITLE, COMPND, REMARK, altloc) "ALIGN", # Various way to align atom names in PDB files - "RNA_PSF", "RNA_PDB", # nucleic acid (PDB 1K5I in CHARMM36m) + "RNA_PSF", + "RNA_PDB", # nucleic acid (PDB 1K5I in CHARMM36m) "INC_PDB", # incomplete PDB file (Issue #396) # for testing cryst before/after model headers - "PDB_cm", "PDB_cm_bz2", "PDB_cm_gz", - "PDB_mc", "PDB_mc_bz2", "PDB_mc_gz", + "PDB_cm", + "PDB_cm_bz2", + "PDB_cm_gz", + "PDB_mc", + "PDB_mc_bz2", + "PDB_mc_gz", "PDB_chainidnewres", # Issue 1110 - "PDB_sameresid_diffresname", #Case where two residues share the same resid + "PDB_sameresid_diffresname", # Case where two residues share the same resid "PDB_chainidrepeat", # Issue #1107 - "PDB", "GRO", "XTC", "TRR", "TPR", "GRO_velocity", # Gromacs (AdK) + "PDB", + "GRO", + "XTC", + "TRR", + "TPR", + "GRO_velocity", # Gromacs (AdK) "GRO_incomplete_vels", "COORDINATES_GRO_BZ2", - "GRO_large", #atom number truncation at > 100,000 particles, Issue 550 + "GRO_large", # atom number truncation at > 100,000 particles, Issue 550 "GRO_residwrap", # resids wrapping because of 5 digit field (Issue #728) "GRO_residwrap_0base", # corner case of #728 with resid=0 for first atom "GRO_sameresid_diffresname", # Case where two residues share the same resid - "PDB_xvf", "TPR_xvf", "TRR_xvf", # Gromacs coords/veloc/forces (cobrotoxin, OPLS-AA, Gromacs 4.5.5 tpr) + "PDB_xvf", + "TPR_xvf", + "TRR_xvf", # Gromacs coords/veloc/forces (cobrotoxin, OPLS-AA, Gromacs 4.5.5 tpr) "H5MD_xvf", # TPR_xvf + TRR_xvf converted to h5md format "H5MD_energy", # H5MD trajectory with observables/atoms/energy "H5MD_malformed", # H5MD trajectory with malformed observable group "XVG_BZ2", # Compressed xvg file about cobrotoxin "PDB_xlserial", - "TPR400", "TPR402", "TPR403", "TPR404", "TPR405", "TPR406", "TPR407", - "TPR450", "TPR451", "TPR452", "TPR453", "TPR454", "TPR455", "TPR455Double", - "TPR460", "TPR461", "TPR502", "TPR504", "TPR505", "TPR510", "TPR2016", - "TPR2018", "TPR2019B3", "TPR2020B2", "TPR2020", "TPR2020Double", - "TPR2021", "TPR2021Double", "TPR2022RC1", "TPR2023", "TPR2024", + "TPR400", + "TPR402", + "TPR403", + "TPR404", + "TPR405", + "TPR406", + "TPR407", + "TPR450", + "TPR451", + "TPR452", + "TPR453", + "TPR454", + "TPR455", + "TPR455Double", + "TPR460", + "TPR461", + "TPR502", + "TPR504", + "TPR505", + "TPR510", + "TPR2016", + "TPR2018", + "TPR2019B3", + "TPR2020B2", + "TPR2020", + "TPR2020Double", + "TPR2021", + "TPR2021Double", + "TPR2022RC1", + "TPR2023", + "TPR2024", "TPR2024_4", - "TPR510_bonded", "TPR2016_bonded", "TPR2018_bonded", "TPR2019B3_bonded", - "TPR2020B2_bonded", "TPR2020_bonded", "TPR2020_double_bonded", - "TPR2021_bonded", "TPR2021_double_bonded", "TPR2022RC1_bonded", - "TPR334_bonded", "TPR2023_bonded", "TPR2024_bonded", + "TPR510_bonded", + "TPR2016_bonded", + "TPR2018_bonded", + "TPR2019B3_bonded", + "TPR2020B2_bonded", + "TPR2020_bonded", + "TPR2020_double_bonded", + "TPR2021_bonded", + "TPR2021_double_bonded", + "TPR2022RC1_bonded", + "TPR334_bonded", + "TPR2023_bonded", + "TPR2024_bonded", "TPR2024_4_bonded", - "TPR_EXTRA_2021", "TPR_EXTRA_2020", "TPR_EXTRA_2018", - "TPR_EXTRA_2016", "TPR_EXTRA_407", "TPR_EXTRA_2022RC1", - "TPR_EXTRA_2023", "TPR_EXTRA_2024", "TPR_EXTRA_2024_4", - "PDB_sub_sol", "PDB_sub_dry", # TRRReader sub selection + "TPR_EXTRA_2021", + "TPR_EXTRA_2020", + "TPR_EXTRA_2018", + "TPR_EXTRA_2016", + "TPR_EXTRA_407", + "TPR_EXTRA_2022RC1", + "TPR_EXTRA_2023", + "TPR_EXTRA_2024", + "TPR_EXTRA_2024_4", + "PDB_sub_sol", + "PDB_sub_dry", # TRRReader sub selection "TRR_sub_sol", "XTC_sub_sol", - "XYZ", "XYZ_psf", "XYZ_bz2", - "XYZ_mini", "XYZ_five", # 3 and 5 atoms xyzs for an easy topology - "TXYZ", "ARC", "ARC_PBC", # Tinker files + "XYZ", + "XYZ_psf", + "XYZ_bz2", + "XYZ_mini", + "XYZ_five", # 3 and 5 atoms xyzs for an easy topology + "TXYZ", + "ARC", + "ARC_PBC", # Tinker files "PRM", "PRM_chainid_bz2", "TRJ", "TRJ_bz2", # Amber (no periodic box) "INPCRD", - "PRMpbc", "TRJpbc_bz2", # Amber (periodic box) - "PRM7", "NCDFtruncoct", # Amber (cpptrj test trajectory, see Issue 488) - "PRM12", "TRJ12_bz2", # Amber (v12 format, Issue 100) - "PRMncdf", "TRJncdf", "NCDF", # Amber (netcdf) - "PFncdf_Top", "PFncdf_Trj", # Amber ncdf with Positions and Forces - "CPPTRAJ_TRAJ_TOP", "CPPTRAJ_TRAJ", # Amber ncdf extracted from CPPTRAJ without time variable + "PRMpbc", + "TRJpbc_bz2", # Amber (periodic box) + "PRM7", + "NCDFtruncoct", # Amber (cpptrj test trajectory, see Issue 488) + "PRM12", + "TRJ12_bz2", # Amber (v12 format, Issue 100) + "PRMncdf", + "TRJncdf", + "NCDF", # Amber (netcdf) + "PFncdf_Top", + "PFncdf_Trj", # Amber ncdf with Positions and Forces + "CPPTRAJ_TRAJ_TOP", + "CPPTRAJ_TRAJ", # Amber ncdf extracted from CPPTRAJ without time variable "PRMcs", # Amber (format, Issue 1331) "PRMNCRST", # Amber ncrst with positions/forces/velocities - "PRM_NCBOX", "TRJ_NCBOX", # Amber parm7 + nc w/ pos/forces/vels/box + "PRM_NCBOX", + "TRJ_NCBOX", # Amber parm7 + nc w/ pos/forces/vels/box "PRMNEGATIVE", # Amber negative ATOMIC_NUMBER (Issue 2306) "PRMErr1", # Amber TOP files to check raised errors "PRMErr2", @@ -122,7 +196,8 @@ "PRMErr4", "PRMErr5", "PRM_UreyBradley", # prmtop from ParmEd test files with Urey-Bradley angles - "PRM7_ala2", "RST7_ala2", # prmtop and rst files from ParmEd example files + "PRM7_ala2", + "RST7_ala2", # prmtop and rst files from ParmEd example files "PRM19SBOPC", # prmtop w/ ff19SB CMAP terms and OPC water (Issue #2449) "PQR", # PQR v1 "PQR_icodes", # PQR v2 with icodes @@ -140,7 +215,8 @@ "DMS_NO_SEGID", # ADK closed with no segids or chains "CONECT", # HIV Reverse Transcriptase with inhibitor "CONECT_ERROR", # PDB file with corrupt CONECT - "TRZ", "TRZ_psf", + "TRZ", + "TRZ_psf", "TRIC", "XTC_multi_frame", "TRR_multi_frame", @@ -148,15 +224,32 @@ "TNG_traj_gro", # topology for argon_npt_compressed_traj "TNG_traj_uneven_blocks", # TNG trajectory with pos and vel deposited on different strides "TNG_traj_vels_forces", # similar to above but with velocities and forces - "merge_protein", "merge_ligand", "merge_water", - "mol2_molecules", "mol2_molecule", "mol2_broken_molecule", - "mol2_zinc", "mol2_comments_header", "mol2_ligand", "mol2_sodium_ion", - "capping_input", "capping_output", "capping_ace", "capping_nma", - "contacts_villin_folded", "contacts_villin_unfolded", "contacts_file", - "LAMMPSdata", "trz4data", "LAMMPSdata_mini", - "LAMMPSdata2", "LAMMPSdcd2", - "LAMMPScnt", "LAMMPScnt2", # triclinic box - "LAMMPShyd", "LAMMPShyd2", + "merge_protein", + "merge_ligand", + "merge_water", + "mol2_molecules", + "mol2_molecule", + "mol2_broken_molecule", + "mol2_zinc", + "mol2_comments_header", + "mol2_ligand", + "mol2_sodium_ion", + "capping_input", + "capping_output", + "capping_ace", + "capping_nma", + "contacts_villin_folded", + "contacts_villin_unfolded", + "contacts_file", + "LAMMPSdata", + "trz4data", + "LAMMPSdata_mini", + "LAMMPSdata2", + "LAMMPSdcd2", + "LAMMPScnt", + "LAMMPScnt2", # triclinic box + "LAMMPShyd", + "LAMMPShyd2", "LAMMPSdata_many_bonds", "LAMMPSdata_deletedatoms", # with deleted atoms "LAMMPSdata_triclinic", # lammpsdata file to test triclinic dimension parsing, albite with most atoms deleted @@ -169,22 +262,29 @@ "LAMMPSDUMP_triclinic", # lammpsdump file to test triclinic dimension parsing, albite with most atoms deleted "LAMMPSDUMP_image_vf", # Lammps dump file with image flags, velocities, and forces. "LAMMPS_image_vf", # Lammps data file to go with LAMMPSDUMP_image_vf - "LAMMPSDUMP_chain1", # Lammps dump file with chain reader - "LAMMPSDUMP_chain2", # Lammps dump file with chain reader - "LAMMPS_chain", # Lammps data file with chain reader + "LAMMPSDUMP_chain1", # Lammps dump file with chain reader + "LAMMPSDUMP_chain2", # Lammps dump file with chain reader + "LAMMPS_chain", # Lammps data file with chain reader "LAMMPSDUMP_additional_columns", # lammpsdump file with additional data (an additional charge column) "unordered_res", # pdb file with resids non sequential "GMS_ASYMOPT", # GAMESS C1 optimization - "GMS_SYMOPT", # GAMESS D4h optimization + "GMS_SYMOPT", # GAMESS D4h optimization "GMS_ASYMSURF", # GAMESS C1 surface - "two_water_gro", "two_water_gro_nonames", # for bond guessing, 2 water molecules, one with weird names + "two_water_gro", + "two_water_gro_nonames", # for bond guessing, 2 water molecules, one with weird names "two_water_gro_multiframe", "two_water_gro_widebox", # Issue #548 - "DLP_CONFIG", "DLP_CONFIG_order", "DLP_CONFIG_minimal", # dl_poly 4 config file - "DLP_HISTORY", "DLP_HISTORY_order", "DLP_HISTORY_minimal", # dl_poly 4 history file + "DLP_CONFIG", + "DLP_CONFIG_order", + "DLP_CONFIG_minimal", # dl_poly 4 config file + "DLP_HISTORY", + "DLP_HISTORY_order", + "DLP_HISTORY_minimal", # dl_poly 4 history file "DLP_HISTORY_minimal_cell", # dl_poly 4 history file with cell parameters "DLP_HISTORY_classic", # dl_poly classic history file - "waterPSF","waterDCD","rmsfArray", + "waterPSF", + "waterDCD", + "rmsfArray", "HoomdXMLdata", "Make_Whole", # for testing the function lib.mdamath.make_whole, has 9 atoms "fullerene", # for make_whole, a nice friendly C60 with bonds @@ -201,37 +301,60 @@ "COORDINATES_DCD", "COORDINATES_TOPOLOGY", "NUCLsel", - "GRO_empty_atom", "GRO_missing_atomname", # for testing GROParser exception raise - "ENT", #for testing ENT file extension + "GRO_empty_atom", + "GRO_missing_atomname", # for testing GROParser exception raise + "ENT", # for testing ENT file extension "RANDOM_WALK", "RANDOM_WALK_TOPO", # garbage topology to go along with XTC positions above - "AUX_XVG", "XVG_BAD_NCOL", #for testing .xvg auxiliary reader - "AUX_XVG_LOWF", "AUX_XVG_HIGHF", - "AUX_EDR", "AUX_EDR_TPR", - "AUX_EDR_XTC", "AUX_EDR_RAW", + "AUX_XVG", + "XVG_BAD_NCOL", # for testing .xvg auxiliary reader + "AUX_XVG_LOWF", + "AUX_XVG_HIGHF", + "AUX_EDR", + "AUX_EDR_TPR", + "AUX_EDR_XTC", + "AUX_EDR_RAW", "AUX_EDR_SINGLE_FRAME", # for testing .edr auxiliary reader - "MMTF", "MMTF_gz", 'MMTF_skinny', # skinny - some optional fields stripped out + "MMTF", + "MMTF_gz", + "MMTF_skinny", # skinny - some optional fields stripped out "MMTF_skinny2", "ALIGN_BOUND", # two component bound system "ALIGN_UNBOUND", # two component unbound system "legacy_DCD_ADK_coords", # frames 5 and 29 read in for adk_dims.dcd using legacy DCD reader "legacy_DCD_NAMD_coords", # frame 0 read in for SiN_tric_namd.dcd using legacy DCD reader "legacy_DCD_c36_coords", # frames 1 and 4 read in for tip125_tric_C36.dcd using legacy DCD reader - "GSD", "GSD_bonds", "GSD_long", - "TRC_PDB_VAC", "TRC_TRAJ1_VAC", "TRC_TRAJ2_VAC", # 2x 3 frames of vacuum trajectory from GROMOS11 tutorial + "GSD", + "GSD_bonds", + "GSD_long", + "TRC_PDB_VAC", + "TRC_TRAJ1_VAC", + "TRC_TRAJ2_VAC", # 2x 3 frames of vacuum trajectory from GROMOS11 tutorial "TRC_CLUSTER_VAC", # three frames without TIMESTEP and GENBOX block but with unsupported POSITION block - "TRC_TRICLINIC_SOLV", "TRC_TRUNCOCT_VAC", - "TRC_GENBOX_ORIGIN", "TRC_GENBOX_EULER", + "TRC_TRICLINIC_SOLV", + "TRC_TRUNCOCT_VAC", + "TRC_GENBOX_ORIGIN", + "TRC_GENBOX_EULER", "TRC_EMPTY", # Empty file containing only one space - "TRC_PDB_SOLV", "TRC_TRAJ_SOLV", # 2 frames of solvated trajectory from GROMOS11 tutorial - "GRO_MEMPROT", "XTC_MEMPROT", # YiiP transporter in POPE:POPG lipids with Na+, Cl-, Zn2+ dummy model without water - "DihedralArray", "DihedralsArray", # time series of single dihedral - "RamaArray", "GLYRamaArray", # time series of phi/psi angles - "JaninArray", "LYSJaninArray", # time series of chi1/chi2 angles - "PDB_rama", "PDB_janin", # for testing failures of Ramachandran and Janin classes + "TRC_PDB_SOLV", + "TRC_TRAJ_SOLV", # 2 frames of solvated trajectory from GROMOS11 tutorial + "GRO_MEMPROT", + "XTC_MEMPROT", # YiiP transporter in POPE:POPG lipids with Na+, Cl-, Zn2+ dummy model without water + "DihedralArray", + "DihedralsArray", # time series of single dihedral + "RamaArray", + "GLYRamaArray", # time series of phi/psi angles + "JaninArray", + "LYSJaninArray", # time series of chi1/chi2 angles + "PDB_rama", + "PDB_janin", # for testing failures of Ramachandran and Janin classes "BATArray", # time series of bond-angle-torsion coordinates array from Molecule_comments_header.mol2 # DOS line endings - "WIN_PDB_multiframe", "WIN_DLP_HISTORY", "WIN_TRJ", "WIN_LAMMPSDUMP", "WIN_ARC", + "WIN_PDB_multiframe", + "WIN_DLP_HISTORY", + "WIN_TRJ", + "WIN_LAMMPSDUMP", + "WIN_ARC", "GRO_huge_box", # for testing gro parser with hige box sizes "ITP", # for GROMACS generated itps "ITP_nomass", # for ATB generated itps @@ -261,228 +384,274 @@ from importlib import resources import MDAnalysisTests.data -_data_ref = resources.files('MDAnalysisTests.data') - -WIN_PDB_multiframe = (_data_ref / 'windows/WIN_nmr_neopetrosiamide.pdb').as_posix() -WIN_DLP_HISTORY = (_data_ref / 'windows/WIN_HISTORY').as_posix() -WIN_TRJ = (_data_ref / 'windows/WIN_ache.mdcrd').as_posix() -WIN_ARC = (_data_ref / 'windows/WIN_test.arc').as_posix() -WIN_LAMMPSDUMP = (_data_ref / 'windows/WIN_wat.lammpstrj').as_posix() - -legacy_DCD_NAMD_coords = (_data_ref / 'legacy_DCD_NAMD_coords.npy').as_posix() -legacy_DCD_ADK_coords = (_data_ref / 'legacy_DCD_adk_coords.npy').as_posix() -legacy_DCD_c36_coords = (_data_ref / 'legacy_DCD_c36_coords.npy').as_posix() -AUX_XVG_LOWF = (_data_ref / 'test_lowf.xvg').as_posix() -AUX_XVG_HIGHF = (_data_ref / 'test_highf.xvg').as_posix() -XVG_BAD_NCOL = (_data_ref / 'bad_num_col.xvg').as_posix() -AUX_XVG = (_data_ref / 'test.xvg').as_posix() -AUX_EDR = (_data_ref / 'test.edr').as_posix() -AUX_EDR_RAW = (_data_ref / 'aux_edr_raw.txt').as_posix() -AUX_EDR_TPR = (_data_ref / 'aux_edr.tpr').as_posix() -AUX_EDR_XTC = (_data_ref / 'aux_edr.xtc').as_posix() -AUX_EDR_SINGLE_FRAME = (_data_ref / 'single_frame.edr').as_posix() -ENT = (_data_ref / 'testENT.ent').as_posix() -GRO_missing_atomname = (_data_ref / 'missing_atomname.gro').as_posix() -GRO_empty_atom = (_data_ref / 'empty_atom.gro').as_posix() -GRO_huge_box = (_data_ref / 'huge_box.gro').as_posix() - -COORDINATES_GRO = (_data_ref / 'coordinates/test.gro').as_posix() -COORDINATES_GRO_INCOMPLETE_VELOCITY = (_data_ref / 'coordinates/test_incomplete_vel.gro').as_posix() -COORDINATES_GRO_BZ2 = (_data_ref / 'coordinates/test.gro.bz2').as_posix() -COORDINATES_XYZ = (_data_ref / 'coordinates/test.xyz').as_posix() -COORDINATES_XYZ_BZ2 = (_data_ref / 'coordinates/test.xyz.bz2').as_posix() -COORDINATES_XTC = (_data_ref / 'coordinates/test.xtc').as_posix() -COORDINATES_TRR = (_data_ref / 'coordinates/test.trr').as_posix() -COORDINATES_TNG = (_data_ref / 'coordinates/test.tng').as_posix() -COORDINATES_H5MD = (_data_ref / 'coordinates/test.h5md').as_posix() -COORDINATES_DCD = (_data_ref / 'coordinates/test.dcd').as_posix() -COORDINATES_TOPOLOGY = (_data_ref / 'coordinates/test_topology.pdb').as_posix() - -PSF = (_data_ref / 'adk.psf').as_posix() -PSF_notop = (_data_ref / 'adk_notop.psf').as_posix() -PSF_BAD = (_data_ref / 'adk_notop_BAD.psf').as_posix() -DCD = (_data_ref / 'adk_dims.dcd').as_posix() -DCD_empty = (_data_ref / 'empty.dcd').as_posix() -CRD = (_data_ref / 'adk_open.crd').as_posix() -PSF_TRICLINIC = (_data_ref / 'tip125_tric_C36.psf').as_posix() -DCD_TRICLINIC = (_data_ref / 'tip125_tric_C36.dcd').as_posix() -DCD2 = (_data_ref / 'adk_dims2.dcd').as_posix() - -PSF_NAMD = (_data_ref / 'namd_cgenff.psf').as_posix() -PDB_NAMD = (_data_ref / 'namd_cgenff.pdb').as_posix() -PDB_multipole = (_data_ref / 'water_methane_acetic-acid_ammonia.pdb').as_posix() -PSF_NAMD_TRICLINIC = (_data_ref / 'SiN_tric_namd.psf').as_posix() -DCD_NAMD_TRICLINIC = (_data_ref / 'SiN_tric_namd.dcd').as_posix() -PSF_NAMD_GBIS = (_data_ref / 'adk_closed_NAMD.psf').as_posix() -DCD_NAMD_GBIS = (_data_ref / 'adk_gbis_tmd-fast1_NAMD.dcd').as_posix() - -PSF_nosegid = (_data_ref / 'nosegid.psf').as_posix() - -PSF_cmap = (_data_ref / 'parmed_ala3.psf').as_posix() - -PSF_inscode = (_data_ref / '1a2c_ins_code.psf').as_posix() - -PDB_varying = (_data_ref / 'varying_occ_tmp.pdb').as_posix() -PDB_small = (_data_ref / 'adk_open.pdb').as_posix() -PDB_closed = (_data_ref / 'adk_closed.pdb').as_posix() - -ALIGN = (_data_ref / 'align.pdb').as_posix() -RNA_PSF = (_data_ref / 'analysis/1k5i_c36.psf.gz').as_posix() -RNA_PDB = (_data_ref / 'analysis/1k5i_c36.pdb.gz').as_posix() -INC_PDB = (_data_ref / 'incomplete.pdb').as_posix() -PDB_cm = (_data_ref / 'cryst_then_model.pdb').as_posix() -PDB_cm_gz = (_data_ref / 'cryst_then_model.pdb.gz').as_posix() -PDB_cm_bz2 = (_data_ref / 'cryst_then_model.pdb.bz2').as_posix() -PDB_mc = (_data_ref / 'model_then_cryst.pdb').as_posix() -PDB_mc_gz = (_data_ref / 'model_then_cryst.pdb.gz').as_posix() -PDB_mc_bz2 = (_data_ref / 'model_then_cryst.pdb.bz2').as_posix() -PDB_chainidnewres = (_data_ref / 'chainIDnewres.pdb.gz').as_posix() -PDB_sameresid_diffresname = (_data_ref / 'sameresid_diffresname.pdb').as_posix() -PDB_chainidrepeat = (_data_ref / 'chainIDrepeat.pdb.gz').as_posix() -PDB_multiframe = (_data_ref / 'nmr_neopetrosiamide.pdb').as_posix() -PDB_helix = (_data_ref / 'A6PA6_alpha.pdb').as_posix() -PDB_conect = (_data_ref / 'conect_parsing.pdb').as_posix() -PDB_conect2TER = (_data_ref / 'CONECT2TER.pdb').as_posix() -PDB_singleconect = (_data_ref / 'SINGLECONECT.pdb').as_posix() -PDB_icodes = (_data_ref / '1osm.pdb.gz').as_posix() -PDB_CRYOEM_BOX = (_data_ref / '5a7u.pdb').as_posix() -PDB_CHECK_RIGHTHAND_PA = (_data_ref / '6msm.pdb.bz2').as_posix() -FHIAIMS = (_data_ref / 'fhiaims.in').as_posix() - -GRO = (_data_ref / 'adk_oplsaa.gro').as_posix() -GRO_velocity = (_data_ref / 'sample_velocity_file.gro').as_posix() -GRO_incomplete_vels = (_data_ref / 'grovels.gro').as_posix() -GRO_large = (_data_ref / 'bigbox.gro.bz2').as_posix() -GRO_residwrap = (_data_ref / 'residwrap.gro').as_posix() -GRO_residwrap_0base = (_data_ref / 'residwrap_0base.gro').as_posix() -GRO_sameresid_diffresname = (_data_ref / 'sameresid_diffresname.gro').as_posix() -PDB = (_data_ref / 'adk_oplsaa.pdb').as_posix() -XTC = (_data_ref / 'adk_oplsaa.xtc').as_posix() -TRR = (_data_ref / 'adk_oplsaa.trr').as_posix() -TPR = (_data_ref / 'adk_oplsaa.tpr').as_posix() -PDB_sub_dry = (_data_ref / 'cobrotoxin_dry_neutral_0.pdb').as_posix() -TRR_sub_sol = (_data_ref / 'cobrotoxin.trr').as_posix() -XTC_sub_sol = (_data_ref / 'cobrotoxin.xtc').as_posix() -PDB_sub_sol = (_data_ref / 'cobrotoxin.pdb').as_posix() -PDB_xlserial = (_data_ref / 'xl_serial.pdb').as_posix() -GRO_MEMPROT = (_data_ref / 'analysis/YiiP_lipids.gro.gz').as_posix() -XTC_MEMPROT = (_data_ref / 'analysis/YiiP_lipids.xtc').as_posix() -XTC_multi_frame = (_data_ref / 'xtc_test_only_10_frame_10_atoms.xtc').as_posix() -TRR_multi_frame = (_data_ref / 'trr_test_only_10_frame_10_atoms.trr').as_posix() -TNG_traj = (_data_ref / 'argon_npt_compressed.tng').as_posix() -TNG_traj_gro = (_data_ref / 'argon_npt_compressed.gro.gz').as_posix() -TNG_traj_uneven_blocks = (_data_ref / 'argon_npt_compressed_uneven.tng').as_posix() -TNG_traj_vels_forces = (_data_ref / 'argon_npt_compressed_vels_forces.tng').as_posix() -PDB_xvf = (_data_ref / 'cobrotoxin.pdb').as_posix() -TPR_xvf = (_data_ref / 'cobrotoxin.tpr').as_posix() -TRR_xvf = (_data_ref / 'cobrotoxin.trr').as_posix() -H5MD_xvf = (_data_ref / 'cobrotoxin.h5md').as_posix() -H5MD_energy = (_data_ref / 'cu.h5md').as_posix() -H5MD_malformed = (_data_ref / 'cu_malformed.h5md').as_posix() -XVG_BZ2 = (_data_ref / 'cobrotoxin_protein_forces.xvg.bz2').as_posix() - -XPDB_small = (_data_ref / '5digitResid.pdb').as_posix() +_data_ref = resources.files("MDAnalysisTests.data") + +WIN_PDB_multiframe = ( + _data_ref / "windows/WIN_nmr_neopetrosiamide.pdb" +).as_posix() +WIN_DLP_HISTORY = (_data_ref / "windows/WIN_HISTORY").as_posix() +WIN_TRJ = (_data_ref / "windows/WIN_ache.mdcrd").as_posix() +WIN_ARC = (_data_ref / "windows/WIN_test.arc").as_posix() +WIN_LAMMPSDUMP = (_data_ref / "windows/WIN_wat.lammpstrj").as_posix() + +legacy_DCD_NAMD_coords = (_data_ref / "legacy_DCD_NAMD_coords.npy").as_posix() +legacy_DCD_ADK_coords = (_data_ref / "legacy_DCD_adk_coords.npy").as_posix() +legacy_DCD_c36_coords = (_data_ref / "legacy_DCD_c36_coords.npy").as_posix() +AUX_XVG_LOWF = (_data_ref / "test_lowf.xvg").as_posix() +AUX_XVG_HIGHF = (_data_ref / "test_highf.xvg").as_posix() +XVG_BAD_NCOL = (_data_ref / "bad_num_col.xvg").as_posix() +AUX_XVG = (_data_ref / "test.xvg").as_posix() +AUX_EDR = (_data_ref / "test.edr").as_posix() +AUX_EDR_RAW = (_data_ref / "aux_edr_raw.txt").as_posix() +AUX_EDR_TPR = (_data_ref / "aux_edr.tpr").as_posix() +AUX_EDR_XTC = (_data_ref / "aux_edr.xtc").as_posix() +AUX_EDR_SINGLE_FRAME = (_data_ref / "single_frame.edr").as_posix() +ENT = (_data_ref / "testENT.ent").as_posix() +GRO_missing_atomname = (_data_ref / "missing_atomname.gro").as_posix() +GRO_empty_atom = (_data_ref / "empty_atom.gro").as_posix() +GRO_huge_box = (_data_ref / "huge_box.gro").as_posix() + +COORDINATES_GRO = (_data_ref / "coordinates/test.gro").as_posix() +COORDINATES_GRO_INCOMPLETE_VELOCITY = ( + _data_ref / "coordinates/test_incomplete_vel.gro" +).as_posix() +COORDINATES_GRO_BZ2 = (_data_ref / "coordinates/test.gro.bz2").as_posix() +COORDINATES_XYZ = (_data_ref / "coordinates/test.xyz").as_posix() +COORDINATES_XYZ_BZ2 = (_data_ref / "coordinates/test.xyz.bz2").as_posix() +COORDINATES_XTC = (_data_ref / "coordinates/test.xtc").as_posix() +COORDINATES_TRR = (_data_ref / "coordinates/test.trr").as_posix() +COORDINATES_TNG = (_data_ref / "coordinates/test.tng").as_posix() +COORDINATES_H5MD = (_data_ref / "coordinates/test.h5md").as_posix() +COORDINATES_DCD = (_data_ref / "coordinates/test.dcd").as_posix() +COORDINATES_TOPOLOGY = (_data_ref / "coordinates/test_topology.pdb").as_posix() + +PSF = (_data_ref / "adk.psf").as_posix() +PSF_notop = (_data_ref / "adk_notop.psf").as_posix() +PSF_BAD = (_data_ref / "adk_notop_BAD.psf").as_posix() +DCD = (_data_ref / "adk_dims.dcd").as_posix() +DCD_empty = (_data_ref / "empty.dcd").as_posix() +CRD = (_data_ref / "adk_open.crd").as_posix() +PSF_TRICLINIC = (_data_ref / "tip125_tric_C36.psf").as_posix() +DCD_TRICLINIC = (_data_ref / "tip125_tric_C36.dcd").as_posix() +DCD2 = (_data_ref / "adk_dims2.dcd").as_posix() + +PSF_NAMD = (_data_ref / "namd_cgenff.psf").as_posix() +PDB_NAMD = (_data_ref / "namd_cgenff.pdb").as_posix() +PDB_multipole = ( + _data_ref / "water_methane_acetic-acid_ammonia.pdb" +).as_posix() +PSF_NAMD_TRICLINIC = (_data_ref / "SiN_tric_namd.psf").as_posix() +DCD_NAMD_TRICLINIC = (_data_ref / "SiN_tric_namd.dcd").as_posix() +PSF_NAMD_GBIS = (_data_ref / "adk_closed_NAMD.psf").as_posix() +DCD_NAMD_GBIS = (_data_ref / "adk_gbis_tmd-fast1_NAMD.dcd").as_posix() + +PSF_nosegid = (_data_ref / "nosegid.psf").as_posix() + +PSF_cmap = (_data_ref / "parmed_ala3.psf").as_posix() + +PSF_inscode = (_data_ref / "1a2c_ins_code.psf").as_posix() + +PDB_varying = (_data_ref / "varying_occ_tmp.pdb").as_posix() +PDB_small = (_data_ref / "adk_open.pdb").as_posix() +PDB_closed = (_data_ref / "adk_closed.pdb").as_posix() + +ALIGN = (_data_ref / "align.pdb").as_posix() +RNA_PSF = (_data_ref / "analysis/1k5i_c36.psf.gz").as_posix() +RNA_PDB = (_data_ref / "analysis/1k5i_c36.pdb.gz").as_posix() +INC_PDB = (_data_ref / "incomplete.pdb").as_posix() +PDB_cm = (_data_ref / "cryst_then_model.pdb").as_posix() +PDB_cm_gz = (_data_ref / "cryst_then_model.pdb.gz").as_posix() +PDB_cm_bz2 = (_data_ref / "cryst_then_model.pdb.bz2").as_posix() +PDB_mc = (_data_ref / "model_then_cryst.pdb").as_posix() +PDB_mc_gz = (_data_ref / "model_then_cryst.pdb.gz").as_posix() +PDB_mc_bz2 = (_data_ref / "model_then_cryst.pdb.bz2").as_posix() +PDB_chainidnewres = (_data_ref / "chainIDnewres.pdb.gz").as_posix() +PDB_sameresid_diffresname = ( + _data_ref / "sameresid_diffresname.pdb" +).as_posix() +PDB_chainidrepeat = (_data_ref / "chainIDrepeat.pdb.gz").as_posix() +PDB_multiframe = (_data_ref / "nmr_neopetrosiamide.pdb").as_posix() +PDB_helix = (_data_ref / "A6PA6_alpha.pdb").as_posix() +PDB_conect = (_data_ref / "conect_parsing.pdb").as_posix() +PDB_conect2TER = (_data_ref / "CONECT2TER.pdb").as_posix() +PDB_singleconect = (_data_ref / "SINGLECONECT.pdb").as_posix() +PDB_icodes = (_data_ref / "1osm.pdb.gz").as_posix() +PDB_CRYOEM_BOX = (_data_ref / "5a7u.pdb").as_posix() +PDB_CHECK_RIGHTHAND_PA = (_data_ref / "6msm.pdb.bz2").as_posix() +FHIAIMS = (_data_ref / "fhiaims.in").as_posix() + +GRO = (_data_ref / "adk_oplsaa.gro").as_posix() +GRO_velocity = (_data_ref / "sample_velocity_file.gro").as_posix() +GRO_incomplete_vels = (_data_ref / "grovels.gro").as_posix() +GRO_large = (_data_ref / "bigbox.gro.bz2").as_posix() +GRO_residwrap = (_data_ref / "residwrap.gro").as_posix() +GRO_residwrap_0base = (_data_ref / "residwrap_0base.gro").as_posix() +GRO_sameresid_diffresname = ( + _data_ref / "sameresid_diffresname.gro" +).as_posix() +PDB = (_data_ref / "adk_oplsaa.pdb").as_posix() +XTC = (_data_ref / "adk_oplsaa.xtc").as_posix() +TRR = (_data_ref / "adk_oplsaa.trr").as_posix() +TPR = (_data_ref / "adk_oplsaa.tpr").as_posix() +PDB_sub_dry = (_data_ref / "cobrotoxin_dry_neutral_0.pdb").as_posix() +TRR_sub_sol = (_data_ref / "cobrotoxin.trr").as_posix() +XTC_sub_sol = (_data_ref / "cobrotoxin.xtc").as_posix() +PDB_sub_sol = (_data_ref / "cobrotoxin.pdb").as_posix() +PDB_xlserial = (_data_ref / "xl_serial.pdb").as_posix() +GRO_MEMPROT = (_data_ref / "analysis/YiiP_lipids.gro.gz").as_posix() +XTC_MEMPROT = (_data_ref / "analysis/YiiP_lipids.xtc").as_posix() +XTC_multi_frame = ( + _data_ref / "xtc_test_only_10_frame_10_atoms.xtc" +).as_posix() +TRR_multi_frame = ( + _data_ref / "trr_test_only_10_frame_10_atoms.trr" +).as_posix() +TNG_traj = (_data_ref / "argon_npt_compressed.tng").as_posix() +TNG_traj_gro = (_data_ref / "argon_npt_compressed.gro.gz").as_posix() +TNG_traj_uneven_blocks = ( + _data_ref / "argon_npt_compressed_uneven.tng" +).as_posix() +TNG_traj_vels_forces = ( + _data_ref / "argon_npt_compressed_vels_forces.tng" +).as_posix() +PDB_xvf = (_data_ref / "cobrotoxin.pdb").as_posix() +TPR_xvf = (_data_ref / "cobrotoxin.tpr").as_posix() +TRR_xvf = (_data_ref / "cobrotoxin.trr").as_posix() +H5MD_xvf = (_data_ref / "cobrotoxin.h5md").as_posix() +H5MD_energy = (_data_ref / "cu.h5md").as_posix() +H5MD_malformed = (_data_ref / "cu_malformed.h5md").as_posix() +XVG_BZ2 = (_data_ref / "cobrotoxin_protein_forces.xvg.bz2").as_posix() + +XPDB_small = (_data_ref / "5digitResid.pdb").as_posix() # number is the gromacs version -TPR400 = (_data_ref / 'tprs/2lyz_gmx_4.0.tpr').as_posix() -TPR402 = (_data_ref / 'tprs/2lyz_gmx_4.0.2.tpr').as_posix() -TPR403 = (_data_ref / 'tprs/2lyz_gmx_4.0.3.tpr').as_posix() -TPR404 = (_data_ref / 'tprs/2lyz_gmx_4.0.4.tpr').as_posix() -TPR405 = (_data_ref / 'tprs/2lyz_gmx_4.0.5.tpr').as_posix() -TPR406 = (_data_ref / 'tprs/2lyz_gmx_4.0.6.tpr').as_posix() -TPR407 = (_data_ref / 'tprs/2lyz_gmx_4.0.7.tpr').as_posix() -TPR450 = (_data_ref / 'tprs/2lyz_gmx_4.5.tpr').as_posix() -TPR451 = (_data_ref / 'tprs/2lyz_gmx_4.5.1.tpr').as_posix() -TPR452 = (_data_ref / 'tprs/2lyz_gmx_4.5.2.tpr').as_posix() -TPR453 = (_data_ref / 'tprs/2lyz_gmx_4.5.3.tpr').as_posix() -TPR454 = (_data_ref / 'tprs/2lyz_gmx_4.5.4.tpr').as_posix() -TPR455 = (_data_ref / 'tprs/2lyz_gmx_4.5.5.tpr').as_posix() -TPR502 = (_data_ref / 'tprs/2lyz_gmx_5.0.2.tpr').as_posix() -TPR504 = (_data_ref / 'tprs/2lyz_gmx_5.0.4.tpr').as_posix() -TPR505 = (_data_ref / 'tprs/2lyz_gmx_5.0.5.tpr').as_posix() -TPR510 = (_data_ref / 'tprs/2lyz_gmx_5.1.tpr').as_posix() -TPR2016 = (_data_ref / 'tprs/2lyz_gmx_2016.tpr').as_posix() -TPR2018 = (_data_ref / 'tprs/2lyz_gmx_2018.tpr').as_posix() -TPR2019B3 = (_data_ref / 'tprs/2lyz_gmx_2019-beta3.tpr').as_posix() -TPR2020B2 = (_data_ref / 'tprs/2lyz_gmx_2020-beta2.tpr').as_posix() -TPR2020 = (_data_ref / 'tprs/2lyz_gmx_2020.tpr').as_posix() -TPR2021 = (_data_ref / 'tprs/2lyz_gmx_2021.tpr').as_posix() -TPR2022RC1 = (_data_ref / 'tprs/2lyz_gmx_2022-rc1.tpr').as_posix() -TPR2023 = (_data_ref / 'tprs/2lyz_gmx_2023.tpr').as_posix() -TPR2024 = (_data_ref / 'tprs/2lyz_gmx_2024.tpr').as_posix() -TPR2024_4 = (_data_ref / 'tprs/2lyz_gmx_2024_4.tpr').as_posix() +TPR400 = (_data_ref / "tprs/2lyz_gmx_4.0.tpr").as_posix() +TPR402 = (_data_ref / "tprs/2lyz_gmx_4.0.2.tpr").as_posix() +TPR403 = (_data_ref / "tprs/2lyz_gmx_4.0.3.tpr").as_posix() +TPR404 = (_data_ref / "tprs/2lyz_gmx_4.0.4.tpr").as_posix() +TPR405 = (_data_ref / "tprs/2lyz_gmx_4.0.5.tpr").as_posix() +TPR406 = (_data_ref / "tprs/2lyz_gmx_4.0.6.tpr").as_posix() +TPR407 = (_data_ref / "tprs/2lyz_gmx_4.0.7.tpr").as_posix() +TPR450 = (_data_ref / "tprs/2lyz_gmx_4.5.tpr").as_posix() +TPR451 = (_data_ref / "tprs/2lyz_gmx_4.5.1.tpr").as_posix() +TPR452 = (_data_ref / "tprs/2lyz_gmx_4.5.2.tpr").as_posix() +TPR453 = (_data_ref / "tprs/2lyz_gmx_4.5.3.tpr").as_posix() +TPR454 = (_data_ref / "tprs/2lyz_gmx_4.5.4.tpr").as_posix() +TPR455 = (_data_ref / "tprs/2lyz_gmx_4.5.5.tpr").as_posix() +TPR502 = (_data_ref / "tprs/2lyz_gmx_5.0.2.tpr").as_posix() +TPR504 = (_data_ref / "tprs/2lyz_gmx_5.0.4.tpr").as_posix() +TPR505 = (_data_ref / "tprs/2lyz_gmx_5.0.5.tpr").as_posix() +TPR510 = (_data_ref / "tprs/2lyz_gmx_5.1.tpr").as_posix() +TPR2016 = (_data_ref / "tprs/2lyz_gmx_2016.tpr").as_posix() +TPR2018 = (_data_ref / "tprs/2lyz_gmx_2018.tpr").as_posix() +TPR2019B3 = (_data_ref / "tprs/2lyz_gmx_2019-beta3.tpr").as_posix() +TPR2020B2 = (_data_ref / "tprs/2lyz_gmx_2020-beta2.tpr").as_posix() +TPR2020 = (_data_ref / "tprs/2lyz_gmx_2020.tpr").as_posix() +TPR2021 = (_data_ref / "tprs/2lyz_gmx_2021.tpr").as_posix() +TPR2022RC1 = (_data_ref / "tprs/2lyz_gmx_2022-rc1.tpr").as_posix() +TPR2023 = (_data_ref / "tprs/2lyz_gmx_2023.tpr").as_posix() +TPR2024 = (_data_ref / "tprs/2lyz_gmx_2024.tpr").as_posix() +TPR2024_4 = (_data_ref / "tprs/2lyz_gmx_2024_4.tpr").as_posix() # double precision -TPR455Double = (_data_ref / 'tprs/drew_gmx_4.5.5.double.tpr').as_posix() -TPR460 = (_data_ref / 'tprs/ab42_gmx_4.6.tpr').as_posix() -TPR461 = (_data_ref / 'tprs/ab42_gmx_4.6.1.tpr').as_posix() -TPR2020Double = (_data_ref / 'tprs/2lyz_gmx_2020_double.tpr').as_posix() -TPR2021Double = (_data_ref / 'tprs/2lyz_gmx_2021_double.tpr').as_posix() +TPR455Double = (_data_ref / "tprs/drew_gmx_4.5.5.double.tpr").as_posix() +TPR460 = (_data_ref / "tprs/ab42_gmx_4.6.tpr").as_posix() +TPR461 = (_data_ref / "tprs/ab42_gmx_4.6.1.tpr").as_posix() +TPR2020Double = (_data_ref / "tprs/2lyz_gmx_2020_double.tpr").as_posix() +TPR2021Double = (_data_ref / "tprs/2lyz_gmx_2021_double.tpr").as_posix() # all bonded interactions -TPR334_bonded = (_data_ref / 'tprs/all_bonded/dummy_3.3.4.tpr').as_posix() -TPR510_bonded = (_data_ref / 'tprs/all_bonded/dummy_5.1.tpr').as_posix() -TPR2016_bonded = (_data_ref / 'tprs/all_bonded/dummy_2016.tpr').as_posix() -TPR2018_bonded = (_data_ref / 'tprs/all_bonded/dummy_2018.tpr').as_posix() -TPR2019B3_bonded = (_data_ref / 'tprs/all_bonded/dummy_2019-beta3.tpr').as_posix() -TPR2020B2_bonded = (_data_ref / 'tprs/all_bonded/dummy_2020-beta2.tpr').as_posix() -TPR2020_bonded = (_data_ref / 'tprs/all_bonded/dummy_2020.tpr').as_posix() -TPR2020_double_bonded = (_data_ref / 'tprs/all_bonded/dummy_2020_double.tpr').as_posix() -TPR2021_bonded = (_data_ref / 'tprs/all_bonded/dummy_2021.tpr').as_posix() -TPR2021_double_bonded = (_data_ref / 'tprs/all_bonded/dummy_2021_double.tpr').as_posix() -TPR2022RC1_bonded = (_data_ref / 'tprs/all_bonded/dummy_2022-rc1.tpr').as_posix() -TPR2023_bonded = (_data_ref / 'tprs/all_bonded/dummy_2023.tpr').as_posix() -TPR2024_bonded = (_data_ref / 'tprs/all_bonded/dummy_2024.tpr').as_posix() -TPR2024_4_bonded = (_data_ref / 'tprs/all_bonded/dummy_2024_4.tpr').as_posix() +TPR334_bonded = (_data_ref / "tprs/all_bonded/dummy_3.3.4.tpr").as_posix() +TPR510_bonded = (_data_ref / "tprs/all_bonded/dummy_5.1.tpr").as_posix() +TPR2016_bonded = (_data_ref / "tprs/all_bonded/dummy_2016.tpr").as_posix() +TPR2018_bonded = (_data_ref / "tprs/all_bonded/dummy_2018.tpr").as_posix() +TPR2019B3_bonded = ( + _data_ref / "tprs/all_bonded/dummy_2019-beta3.tpr" +).as_posix() +TPR2020B2_bonded = ( + _data_ref / "tprs/all_bonded/dummy_2020-beta2.tpr" +).as_posix() +TPR2020_bonded = (_data_ref / "tprs/all_bonded/dummy_2020.tpr").as_posix() +TPR2020_double_bonded = ( + _data_ref / "tprs/all_bonded/dummy_2020_double.tpr" +).as_posix() +TPR2021_bonded = (_data_ref / "tprs/all_bonded/dummy_2021.tpr").as_posix() +TPR2021_double_bonded = ( + _data_ref / "tprs/all_bonded/dummy_2021_double.tpr" +).as_posix() +TPR2022RC1_bonded = ( + _data_ref / "tprs/all_bonded/dummy_2022-rc1.tpr" +).as_posix() +TPR2023_bonded = (_data_ref / "tprs/all_bonded/dummy_2023.tpr").as_posix() +TPR2024_bonded = (_data_ref / "tprs/all_bonded/dummy_2024.tpr").as_posix() +TPR2024_4_bonded = (_data_ref / "tprs/all_bonded/dummy_2024_4.tpr").as_posix() # all interactions -TPR_EXTRA_2024_4 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2024_4.tpr').as_posix() -TPR_EXTRA_2024 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2024.tpr').as_posix() -TPR_EXTRA_2023 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2023.tpr').as_posix() -TPR_EXTRA_2022RC1 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2022-rc1.tpr').as_posix() -TPR_EXTRA_2021 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2021.tpr').as_posix() -TPR_EXTRA_2020 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2020.tpr').as_posix() -TPR_EXTRA_2018 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2018.tpr').as_posix() -TPR_EXTRA_2016 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2016.3.tpr').as_posix() -TPR_EXTRA_407 = (_data_ref / 'tprs/virtual_sites/extra-interactions-4.0.7.tpr').as_posix() - -XYZ_psf = (_data_ref / '2r9r-1b.psf').as_posix() -XYZ_bz2 = (_data_ref / '2r9r-1b.xyz.bz2').as_posix() -XYZ = (_data_ref / '2r9r-1b.xyz').as_posix() -XYZ_mini = (_data_ref / 'mini.xyz').as_posix() -XYZ_five = (_data_ref / 'five.xyz').as_posix() -TXYZ = (_data_ref / 'coordinates/test.txyz').as_posix() -ARC = (_data_ref / 'coordinates/test.arc').as_posix() -ARC_PBC = (_data_ref / 'coordinates/new_hexane.arc').as_posix() - -PRM = (_data_ref / 'Amber/ache.prmtop').as_posix() -TRJ = (_data_ref / 'Amber/ache.mdcrd').as_posix() -INPCRD = (_data_ref / 'Amber/test.inpcrd').as_posix() -TRJ_bz2 = (_data_ref / 'Amber/ache.mdcrd.bz2').as_posix() -PFncdf_Top = (_data_ref / 'Amber/posfor.top').as_posix() -PFncdf_Trj = (_data_ref / 'Amber/posfor.ncdf').as_posix() +TPR_EXTRA_2024_4 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2024_4.tpr" +).as_posix() +TPR_EXTRA_2024 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2024.tpr" +).as_posix() +TPR_EXTRA_2023 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2023.tpr" +).as_posix() +TPR_EXTRA_2022RC1 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2022-rc1.tpr" +).as_posix() +TPR_EXTRA_2021 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2021.tpr" +).as_posix() +TPR_EXTRA_2020 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2020.tpr" +).as_posix() +TPR_EXTRA_2018 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2018.tpr" +).as_posix() +TPR_EXTRA_2016 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-2016.3.tpr" +).as_posix() +TPR_EXTRA_407 = ( + _data_ref / "tprs/virtual_sites/extra-interactions-4.0.7.tpr" +).as_posix() + +XYZ_psf = (_data_ref / "2r9r-1b.psf").as_posix() +XYZ_bz2 = (_data_ref / "2r9r-1b.xyz.bz2").as_posix() +XYZ = (_data_ref / "2r9r-1b.xyz").as_posix() +XYZ_mini = (_data_ref / "mini.xyz").as_posix() +XYZ_five = (_data_ref / "five.xyz").as_posix() +TXYZ = (_data_ref / "coordinates/test.txyz").as_posix() +ARC = (_data_ref / "coordinates/test.arc").as_posix() +ARC_PBC = (_data_ref / "coordinates/new_hexane.arc").as_posix() + +PRM = (_data_ref / "Amber/ache.prmtop").as_posix() +TRJ = (_data_ref / "Amber/ache.mdcrd").as_posix() +INPCRD = (_data_ref / "Amber/test.inpcrd").as_posix() +TRJ_bz2 = (_data_ref / "Amber/ache.mdcrd.bz2").as_posix() +PFncdf_Top = (_data_ref / "Amber/posfor.top").as_posix() +PFncdf_Trj = (_data_ref / "Amber/posfor.ncdf").as_posix() PRM_chainid_bz2 = (_data_ref / "Amber/ache_chainid.prmtop.bz2").as_posix() -CPPTRAJ_TRAJ_TOP = (_data_ref / 'Amber/cpptraj_traj.prmtop').as_posix() -CPPTRAJ_TRAJ = (_data_ref / 'Amber/cpptraj_traj.nc').as_posix() +CPPTRAJ_TRAJ_TOP = (_data_ref / "Amber/cpptraj_traj.prmtop").as_posix() +CPPTRAJ_TRAJ = (_data_ref / "Amber/cpptraj_traj.nc").as_posix() -PRMpbc = (_data_ref / 'Amber/capped-ala.prmtop').as_posix() -TRJpbc_bz2 = (_data_ref / 'Amber/capped-ala.mdcrd.bz2').as_posix() +PRMpbc = (_data_ref / "Amber/capped-ala.prmtop").as_posix() +TRJpbc_bz2 = (_data_ref / "Amber/capped-ala.mdcrd.bz2").as_posix() -PRMncdf = (_data_ref / 'Amber/bala.prmtop').as_posix() -TRJncdf = (_data_ref / 'Amber/bala.trj').as_posix() -NCDF = (_data_ref / 'Amber/bala.ncdf').as_posix() +PRMncdf = (_data_ref / "Amber/bala.prmtop").as_posix() +TRJncdf = (_data_ref / "Amber/bala.trj").as_posix() +NCDF = (_data_ref / "Amber/bala.ncdf").as_posix() -PRM12 = (_data_ref / 'Amber/anti.top').as_posix() -TRJ12_bz2 = (_data_ref / 'Amber/anti_md1.mdcrd.bz2').as_posix() +PRM12 = (_data_ref / "Amber/anti.top").as_posix() +TRJ12_bz2 = (_data_ref / "Amber/anti_md1.mdcrd.bz2").as_posix() -PRM7 = (_data_ref / 'Amber/tz2.truncoct.parm7.bz2').as_posix() -NCDFtruncoct = (_data_ref / 'Amber/tz2.truncoct.nc').as_posix() +PRM7 = (_data_ref / "Amber/tz2.truncoct.parm7.bz2").as_posix() +NCDFtruncoct = (_data_ref / "Amber/tz2.truncoct.nc").as_posix() -PRMcs = (_data_ref / 'Amber/chitosan.prmtop').as_posix() +PRMcs = (_data_ref / "Amber/chitosan.prmtop").as_posix() -PRMNCRST = (_data_ref / 'Amber/ace_mbondi3.parm7').as_posix() +PRMNCRST = (_data_ref / "Amber/ace_mbondi3.parm7").as_posix() -PRM_NCBOX = (_data_ref / 'Amber/ace_tip3p.parm7').as_posix() -TRJ_NCBOX = (_data_ref / 'Amber/ace_tip3p.nc').as_posix() +PRM_NCBOX = (_data_ref / "Amber/ace_tip3p.parm7").as_posix() +TRJ_NCBOX = (_data_ref / "Amber/ace_tip3p.nc").as_posix() -PRMNEGATIVE = (_data_ref / 'Amber/ace_mbondi3.negative.parm7').as_posix() +PRMNEGATIVE = (_data_ref / "Amber/ace_mbondi3.negative.parm7").as_posix() PRMErr1 = (_data_ref / "Amber/ace_mbondi3.error1.parm7").as_posix() PRMErr2 = (_data_ref / "Amber/ace_mbondi3.error2.parm7").as_posix() @@ -490,37 +659,41 @@ PRMErr4 = (_data_ref / "Amber/ace_mbondi3.error4.parm7").as_posix() PRMErr5 = (_data_ref / "Amber/ache_chainid.error5.prmtop.bz2").as_posix() -PRM_UreyBradley = (_data_ref / 'Amber/parmed_fad.prmtop').as_posix() -PRM7_ala2 = (_data_ref / 'Amber/parmed_ala2_solv.parm7').as_posix() -RST7_ala2 = (_data_ref / 'Amber/parmed_ala2_solv.rst7').as_posix() +PRM_UreyBradley = (_data_ref / "Amber/parmed_fad.prmtop").as_posix() +PRM7_ala2 = (_data_ref / "Amber/parmed_ala2_solv.parm7").as_posix() +RST7_ala2 = (_data_ref / "Amber/parmed_ala2_solv.rst7").as_posix() -PRM19SBOPC = (_data_ref / 'Amber/ala.ff19SB.OPC.parm7.bz2').as_posix() +PRM19SBOPC = (_data_ref / "Amber/ala.ff19SB.OPC.parm7.bz2").as_posix() -PQR = (_data_ref / 'adk_open.pqr').as_posix() -PQR_icodes = (_data_ref / '1A2C.pqr').as_posix() +PQR = (_data_ref / "adk_open.pqr").as_posix() +PQR_icodes = (_data_ref / "1A2C.pqr").as_posix() PDBQT_input = (_data_ref / "pdbqt_inputpdbqt.pdbqt").as_posix() PDBQT_querypdb = (_data_ref / "pdbqt_querypdb.pdb").as_posix() PDBQT_tyrosol = (_data_ref / "tyrosol.pdbqt.bz2").as_posix() -FASTA = (_data_ref / 'test.fasta').as_posix() -HELANAL_BENDING_MATRIX = (_data_ref / 'helanal_bending_matrix_AdK_DIMS_H8.dat').as_posix() -HELANAL_BENDING_MATRIX_SUBSET = (_data_ref / 'helanal_bending_matrix_AdK_DIMS_H8_frames10to79.dat').as_posix() +FASTA = (_data_ref / "test.fasta").as_posix() +HELANAL_BENDING_MATRIX = ( + _data_ref / "helanal_bending_matrix_AdK_DIMS_H8.dat" +).as_posix() +HELANAL_BENDING_MATRIX_SUBSET = ( + _data_ref / "helanal_bending_matrix_AdK_DIMS_H8_frames10to79.dat" +).as_posix() -PDB_HOLE = (_data_ref / '1grm_single.pdb').as_posix() -MULTIPDB_HOLE = (_data_ref / '1grm_elNemo_mode7.pdb.bz2').as_posix() +PDB_HOLE = (_data_ref / "1grm_single.pdb").as_posix() +MULTIPDB_HOLE = (_data_ref / "1grm_elNemo_mode7.pdb.bz2").as_posix() -DMS = (_data_ref / 'adk_closed.dms').as_posix() -DMS_DOMAINS = (_data_ref / 'adk_closed_domains.dms').as_posix() -DMS_NO_SEGID = (_data_ref / 'adk_closed_no_segid.dms').as_posix() +DMS = (_data_ref / "adk_closed.dms").as_posix() +DMS_DOMAINS = (_data_ref / "adk_closed_domains.dms").as_posix() +DMS_NO_SEGID = (_data_ref / "adk_closed_no_segid.dms").as_posix() -CONECT = (_data_ref / '1hvr.pdb').as_posix() -CONECT_ERROR = (_data_ref / 'conect_error.pdb').as_posix() +CONECT = (_data_ref / "1hvr.pdb").as_posix() +CONECT_ERROR = (_data_ref / "conect_error.pdb").as_posix() -TRZ = (_data_ref / 'trzfile.trz').as_posix() -TRZ_psf = (_data_ref / 'trz_psf.psf').as_posix() +TRZ = (_data_ref / "trzfile.trz").as_posix() +TRZ_psf = (_data_ref / "trz_psf.psf").as_posix() -TRIC = (_data_ref / 'dppc_vesicle_hg.gro').as_posix() +TRIC = (_data_ref / "dppc_vesicle_hg.gro").as_posix() PDB_full = (_data_ref / "4E43.pdb").as_posix() @@ -532,7 +705,9 @@ mol2_molecule = (_data_ref / "mol2/Molecule.mol2").as_posix() mol2_ligand = (_data_ref / "mol2/Ligand.mol2").as_posix() mol2_broken_molecule = (_data_ref / "mol2/BrokenMolecule.mol2").as_posix() -mol2_comments_header = (_data_ref / "mol2/Molecule_comments_header.mol2").as_posix() +mol2_comments_header = ( + _data_ref / "mol2/Molecule_comments_header.mol2" +).as_posix() # MOL2 file without substructure field mol2_zinc = (_data_ref / "mol2/zinc_856218.mol2").as_posix() # MOL2 file without bonds @@ -543,8 +718,12 @@ capping_ace = (_data_ref / "capping/ace.pdb").as_posix() capping_nma = (_data_ref / "capping/nma.pdb").as_posix() -contacts_villin_folded = (_data_ref / "contacts/villin_folded.gro.bz2").as_posix() -contacts_villin_unfolded = (_data_ref / "contacts/villin_unfolded.gro.bz2").as_posix() +contacts_villin_folded = ( + _data_ref / "contacts/villin_folded.gro.bz2" +).as_posix() +contacts_villin_unfolded = ( + _data_ref / "contacts/villin_unfolded.gro.bz2" +).as_posix() contacts_file = (_data_ref / "contacts/2F4K_qlist5_remap.dat").as_posix() trz4data = (_data_ref / "lammps/datatest.trz").as_posix() @@ -556,31 +735,43 @@ LAMMPScnt2 = (_data_ref / "lammps/cnt-hexagonal-class1.data2").as_posix() LAMMPShyd = (_data_ref / "lammps/hydrogen-class1.data").as_posix() LAMMPShyd2 = (_data_ref / "lammps/hydrogen-class1.data2").as_posix() -LAMMPSdata_deletedatoms = (_data_ref / 'lammps/deletedatoms.data').as_posix() +LAMMPSdata_deletedatoms = (_data_ref / "lammps/deletedatoms.data").as_posix() LAMMPSdata_triclinic = (_data_ref / "lammps/albite_triclinic.data").as_posix() LAMMPSdata_PairIJ = (_data_ref / "lammps/pairij_coeffs.data.bz2").as_posix() LAMMPSDUMP = (_data_ref / "lammps/wat.lammpstrj.bz2").as_posix() LAMMPSDUMP_long = (_data_ref / "lammps/wat.lammpstrj_long.bz2").as_posix() -LAMMPSDUMP_allcoords = (_data_ref / "lammps/spce_all_coords.lammpstrj.bz2").as_posix() -LAMMPSDUMP_nocoords = (_data_ref / "lammps/spce_no_coords.lammpstrj.bz2").as_posix() +LAMMPSDUMP_allcoords = ( + _data_ref / "lammps/spce_all_coords.lammpstrj.bz2" +).as_posix() +LAMMPSDUMP_nocoords = ( + _data_ref / "lammps/spce_no_coords.lammpstrj.bz2" +).as_posix() LAMMPSDUMP_triclinic = (_data_ref / "lammps/albite_triclinic.dump").as_posix() LAMMPSDUMP_image_vf = (_data_ref / "lammps/image_vf.lammpstrj").as_posix() LAMMPS_image_vf = (_data_ref / "lammps/image_vf.data").as_posix() LAMMPSDUMP_chain1 = (_data_ref / "lammps/chain_dump_1.lammpstrj").as_posix() LAMMPSDUMP_chain2 = (_data_ref / "lammps/chain_dump_2.lammpstrj").as_posix() LAMMPS_chain = (_data_ref / "lammps/chain_initial.data").as_posix() -LAMMPSdata_many_bonds = (_data_ref / "lammps/a_lot_of_bond_types.data").as_posix() -LAMMPSdata_additional_columns = (_data_ref / "lammps/additional_columns.data").as_posix() -LAMMPSDUMP_additional_columns = (_data_ref / "lammps/additional_columns.lammpstrj").as_posix() +LAMMPSdata_many_bonds = ( + _data_ref / "lammps/a_lot_of_bond_types.data" +).as_posix() +LAMMPSdata_additional_columns = ( + _data_ref / "lammps/additional_columns.data" +).as_posix() +LAMMPSDUMP_additional_columns = ( + _data_ref / "lammps/additional_columns.lammpstrj" +).as_posix() unordered_res = (_data_ref / "unordered_res.pdb").as_posix() -GMS_ASYMOPT = (_data_ref / "gms/c1opt.gms.gz").as_posix() -GMS_SYMOPT = (_data_ref / "gms/symopt.gms").as_posix() -GMS_ASYMSURF = (_data_ref / "gms/surf2wat.gms").as_posix() +GMS_ASYMOPT = (_data_ref / "gms/c1opt.gms.gz").as_posix() +GMS_SYMOPT = (_data_ref / "gms/symopt.gms").as_posix() +GMS_ASYMSURF = (_data_ref / "gms/surf2wat.gms").as_posix() two_water_gro = (_data_ref / "two_water_gro.gro").as_posix() -two_water_gro_multiframe = (_data_ref / "two_water_gro_multiframe.gro").as_posix() +two_water_gro_multiframe = ( + _data_ref / "two_water_gro_multiframe.gro" +).as_posix() two_water_gro_nonames = (_data_ref / "two_water_gro_nonames.gro").as_posix() two_water_gro_widebox = (_data_ref / "two_water_gro_widebox.gro").as_posix() @@ -590,91 +781,103 @@ DLP_HISTORY = (_data_ref / "dlpoly/HISTORY").as_posix() DLP_HISTORY_order = (_data_ref / "dlpoly/HISTORY_order").as_posix() DLP_HISTORY_minimal = (_data_ref / "dlpoly/HISTORY_minimal").as_posix() -DLP_HISTORY_minimal_cell = (_data_ref / "dlpoly/HISTORY_minimal_cell").as_posix() +DLP_HISTORY_minimal_cell = ( + _data_ref / "dlpoly/HISTORY_minimal_cell" +).as_posix() DLP_HISTORY_classic = (_data_ref / "dlpoly/HISTORY_classic").as_posix() -waterPSF = (_data_ref / 'watdyn.psf').as_posix() -waterDCD = (_data_ref / 'watdyn.dcd').as_posix() +waterPSF = (_data_ref / "watdyn.psf").as_posix() +waterDCD = (_data_ref / "watdyn.dcd").as_posix() -rmsfArray = (_data_ref / 'adk_oplsaa_CA_rmsf.npy').as_posix() +rmsfArray = (_data_ref / "adk_oplsaa_CA_rmsf.npy").as_posix() -HoomdXMLdata = (_data_ref / 'C12x64.xml.bz2').as_posix() +HoomdXMLdata = (_data_ref / "C12x64.xml.bz2").as_posix() -Make_Whole = (_data_ref / 'make_whole.gro').as_posix() -fullerene = (_data_ref / 'fullerene.pdb.gz').as_posix() +Make_Whole = (_data_ref / "make_whole.gro").as_posix() +fullerene = (_data_ref / "fullerene.pdb.gz").as_posix() -Plength = (_data_ref / 'plength.gro').as_posix() -Martini_membrane_gro = (_data_ref / 'martini_dppc_chol_bilayer.gro').as_posix() +Plength = (_data_ref / "plength.gro").as_posix() +Martini_membrane_gro = (_data_ref / "martini_dppc_chol_bilayer.gro").as_posix() # Contains one of each residue in 'nucleic' selections -NUCLsel = (_data_ref / 'nucl_res.pdb').as_posix() +NUCLsel = (_data_ref / "nucl_res.pdb").as_posix() -RANDOM_WALK = (_data_ref / 'xyz_random_walk.xtc').as_posix() -RANDOM_WALK_TOPO = (_data_ref / 'RANDOM_WALK_TOPO.pdb').as_posix() +RANDOM_WALK = (_data_ref / "xyz_random_walk.xtc").as_posix() +RANDOM_WALK_TOPO = (_data_ref / "RANDOM_WALK_TOPO.pdb").as_posix() -MMTF = (_data_ref / '173D.mmtf').as_posix() -MMTF_gz = (_data_ref / '5KIH.mmtf.gz').as_posix() -MMTF_skinny = (_data_ref / '1ubq-less-optional.mmtf').as_posix() -MMTF_skinny2 = (_data_ref / '3NJW-onlyrequired.mmtf').as_posix() +MMTF = (_data_ref / "173D.mmtf").as_posix() +MMTF_gz = (_data_ref / "5KIH.mmtf.gz").as_posix() +MMTF_skinny = (_data_ref / "1ubq-less-optional.mmtf").as_posix() +MMTF_skinny2 = (_data_ref / "3NJW-onlyrequired.mmtf").as_posix() MMTF_NOCRYST = (_data_ref / "6QYR.mmtf.gz").as_posix() -ALIGN_BOUND = (_data_ref / 'analysis/align_bound.pdb.gz').as_posix() -ALIGN_UNBOUND = (_data_ref / 'analysis/align_unbound.pdb.gz').as_posix() - -GSD = (_data_ref / 'example.gsd').as_posix() -GSD_bonds = (_data_ref / 'example_bonds.gsd').as_posix() -GSD_long = (_data_ref / 'example_longer.gsd').as_posix() - -TRC_PDB_VAC = (_data_ref / 'gromos11/gromos11_traj_vac.pdb.gz').as_posix() -TRC_TRAJ1_VAC = (_data_ref / 'gromos11/gromos11_traj_vac_1.trc.gz').as_posix() -TRC_TRAJ2_VAC = (_data_ref / 'gromos11/gromos11_traj_vac_2.trc.gz').as_posix() -TRC_PDB_SOLV = (_data_ref / 'gromos11/gromos11_traj_solv.pdb.gz').as_posix() -TRC_TRAJ_SOLV = (_data_ref / 'gromos11/gromos11_traj_solv.trc.gz').as_posix() -TRC_CLUSTER_VAC = (_data_ref / 'gromos11/gromos11_cluster_vac.trj.gz').as_posix() -TRC_TRICLINIC_SOLV = (_data_ref / 'gromos11/gromos11_triclinic_solv.trc.gz').as_posix() -TRC_TRUNCOCT_VAC = (_data_ref / 'gromos11/gromos11_truncOcta_vac.trc.gz').as_posix() -TRC_GENBOX_ORIGIN = (_data_ref / 'gromos11/gromos11_genbox_origin.trc.gz').as_posix() -TRC_GENBOX_EULER = (_data_ref / 'gromos11/gromos11_genbox_euler.trc.gz').as_posix() -TRC_EMPTY = (_data_ref / 'gromos11/gromos11_empty.trc').as_posix() - -DihedralArray = (_data_ref / 'adk_oplsaa_dihedral.npy').as_posix() -DihedralsArray = (_data_ref / 'adk_oplsaa_dihedral_list.npy').as_posix() -RamaArray = (_data_ref / 'adk_oplsaa_rama.npy').as_posix() -GLYRamaArray = (_data_ref / 'adk_oplsaa_GLY_rama.npy').as_posix() -JaninArray = (_data_ref / 'adk_oplsaa_janin.npy').as_posix() -LYSJaninArray = (_data_ref / 'adk_oplsaa_LYS_janin.npy').as_posix() -PDB_rama = (_data_ref / '19hc.pdb.gz').as_posix() -PDB_janin = (_data_ref / '1a28.pdb.gz').as_posix() - -BATArray = (_data_ref / 'mol2_comments_header_bat.npy').as_posix() - -ITP = (_data_ref / 'gromacs_ala10.itp').as_posix() -ITP_nomass = (_data_ref / 'itp_nomass.itp').as_posix() -ITP_atomtypes = (_data_ref / 'atomtypes.itp').as_posix() -ITP_charges = (_data_ref / 'atomtypes_charge.itp').as_posix() -ITP_edited = (_data_ref / 'edited_itp.itp').as_posix() +ALIGN_BOUND = (_data_ref / "analysis/align_bound.pdb.gz").as_posix() +ALIGN_UNBOUND = (_data_ref / "analysis/align_unbound.pdb.gz").as_posix() + +GSD = (_data_ref / "example.gsd").as_posix() +GSD_bonds = (_data_ref / "example_bonds.gsd").as_posix() +GSD_long = (_data_ref / "example_longer.gsd").as_posix() + +TRC_PDB_VAC = (_data_ref / "gromos11/gromos11_traj_vac.pdb.gz").as_posix() +TRC_TRAJ1_VAC = (_data_ref / "gromos11/gromos11_traj_vac_1.trc.gz").as_posix() +TRC_TRAJ2_VAC = (_data_ref / "gromos11/gromos11_traj_vac_2.trc.gz").as_posix() +TRC_PDB_SOLV = (_data_ref / "gromos11/gromos11_traj_solv.pdb.gz").as_posix() +TRC_TRAJ_SOLV = (_data_ref / "gromos11/gromos11_traj_solv.trc.gz").as_posix() +TRC_CLUSTER_VAC = ( + _data_ref / "gromos11/gromos11_cluster_vac.trj.gz" +).as_posix() +TRC_TRICLINIC_SOLV = ( + _data_ref / "gromos11/gromos11_triclinic_solv.trc.gz" +).as_posix() +TRC_TRUNCOCT_VAC = ( + _data_ref / "gromos11/gromos11_truncOcta_vac.trc.gz" +).as_posix() +TRC_GENBOX_ORIGIN = ( + _data_ref / "gromos11/gromos11_genbox_origin.trc.gz" +).as_posix() +TRC_GENBOX_EULER = ( + _data_ref / "gromos11/gromos11_genbox_euler.trc.gz" +).as_posix() +TRC_EMPTY = (_data_ref / "gromos11/gromos11_empty.trc").as_posix() + +DihedralArray = (_data_ref / "adk_oplsaa_dihedral.npy").as_posix() +DihedralsArray = (_data_ref / "adk_oplsaa_dihedral_list.npy").as_posix() +RamaArray = (_data_ref / "adk_oplsaa_rama.npy").as_posix() +GLYRamaArray = (_data_ref / "adk_oplsaa_GLY_rama.npy").as_posix() +JaninArray = (_data_ref / "adk_oplsaa_janin.npy").as_posix() +LYSJaninArray = (_data_ref / "adk_oplsaa_LYS_janin.npy").as_posix() +PDB_rama = (_data_ref / "19hc.pdb.gz").as_posix() +PDB_janin = (_data_ref / "1a28.pdb.gz").as_posix() + +BATArray = (_data_ref / "mol2_comments_header_bat.npy").as_posix() + +ITP = (_data_ref / "gromacs_ala10.itp").as_posix() +ITP_nomass = (_data_ref / "itp_nomass.itp").as_posix() +ITP_atomtypes = (_data_ref / "atomtypes.itp").as_posix() +ITP_charges = (_data_ref / "atomtypes_charge.itp").as_posix() +ITP_edited = (_data_ref / "edited_itp.itp").as_posix() ITP_tip5p = (_data_ref / "tip5p.itp").as_posix() -ITP_spce = (_data_ref / 'spce.itp').as_posix() +ITP_spce = (_data_ref / "spce.itp").as_posix() -GMX_TOP = (_data_ref / 'gromacs_ala10.top').as_posix() -GMX_DIR = (_data_ref / 'gromacs/').as_posix() -GMX_TOP_BAD = (_data_ref / 'bad_top.top').as_posix() -ITP_no_endif = (_data_ref / 'no_endif_spc.itp').as_posix() +GMX_TOP = (_data_ref / "gromacs_ala10.top").as_posix() +GMX_DIR = (_data_ref / "gromacs/").as_posix() +GMX_TOP_BAD = (_data_ref / "bad_top.top").as_posix() +ITP_no_endif = (_data_ref / "no_endif_spc.itp").as_posix() -NAMDBIN = (_data_ref / 'adk_open.coor').as_posix() +NAMDBIN = (_data_ref / "adk_open.coor").as_posix() -SDF_molecule = (_data_ref / 'molecule.sdf').as_posix() +SDF_molecule = (_data_ref / "molecule.sdf").as_posix() -PDB_elements = (_data_ref / 'elements.pdb').as_posix() -PDB_charges = (_data_ref / 'charges.pdb').as_posix() +PDB_elements = (_data_ref / "elements.pdb").as_posix() +PDB_charges = (_data_ref / "charges.pdb").as_posix() PDBX = (_data_ref / "4x8u.pdbx").as_posix() -SURFACE_PDB = (_data_ref / 'surface.pdb.bz2').as_posix() -SURFACE_TRR = (_data_ref / 'surface.trr').as_posix() +SURFACE_PDB = (_data_ref / "surface.pdb.bz2").as_posix() +SURFACE_TRR = (_data_ref / "surface.trr").as_posix() # DSSP testing: from https://github.com/ShintaroMinami/PyDSSP -DSSP = (_data_ref / 'dssp').as_posix() +DSSP = (_data_ref / "dssp").as_posix() # This should be the last line: clean up namespace del resources diff --git a/testsuite/MDAnalysisTests/dummy.py b/testsuite/MDAnalysisTests/dummy.py index fc4c77326b3..7bfa11fdb86 100644 --- a/testsuite/MDAnalysisTests/dummy.py +++ b/testsuite/MDAnalysisTests/dummy.py @@ -38,8 +38,9 @@ _RESIDUES_PER_SEG = _N_RESIDUES // _N_SEGMENTS -def make_Universe(extras=None, size=None, - trajectory=False, velocities=False, forces=False): +def make_Universe( + extras=None, size=None, trajectory=False, velocities=False, forces=False +): """Make a dummy reference Universe Allows the construction of arbitrary-sized Universes. Suitable for @@ -81,10 +82,10 @@ def make_Universe(extras=None, size=None, n_atoms=n_atoms, n_residues=n_residues, n_segments=n_segments, - atom_resindex=np.repeat( - np.arange(n_residues), n_atoms // n_residues), + atom_resindex=np.repeat(np.arange(n_residues), n_atoms // n_residues), residue_segindex=np.repeat( - np.arange(n_segments), n_residues // n_segments), + np.arange(n_segments), n_residues // n_segments + ), # trajectory things trajectory=trajectory, velocities=velocities, @@ -106,12 +107,12 @@ def make_Universe(extras=None, size=None, return u + def make_altLocs(size): """AltLocs cycling through A B C D E""" na, nr, ns = size - alts = itertools.cycle(('A', 'B', 'C', 'D', 'E')) - return np.array(['{}'.format(next(alts)) for _ in range(na)], - dtype=object) + alts = itertools.cycle(("A", "B", "C", "D", "E")) + return np.array(["{}".format(next(alts)) for _ in range(na)], dtype=object) def make_bfactors(size): @@ -130,57 +131,73 @@ def make_charges(size): charges = itertools.cycle([-1.5, -0.5, 0.0, 0.5, 1.5]) return np.array([next(charges) for _ in range(na)]) + def make_resnames(size): - """Creates residues named RsA RsB ... """ + """Creates residues named RsA RsB ...""" na, nr, ns = size - return np.array(['Rs{}'.format(string.ascii_uppercase[i]) - for i in range(nr)], dtype=object) + return np.array( + ["Rs{}".format(string.ascii_uppercase[i]) for i in range(nr)], + dtype=object, + ) + def make_segids(size): """Segids SegA -> SegY""" na, nr, ns = size - return np.array(['Seg{}'.format(string.ascii_uppercase[i]) - for i in range(ns)], dtype=object) + return np.array( + ["Seg{}".format(string.ascii_uppercase[i]) for i in range(ns)], + dtype=object, + ) + def make_types(size): """Atoms are given types TypeA -> TypeE on a loop""" na, nr, ns = size types = itertools.cycle(string.ascii_uppercase[:5]) - return np.array(['Type{}'.format(next(types)) for _ in range(na)], - dtype=object) + return np.array( + ["Type{}".format(next(types)) for _ in range(na)], dtype=object + ) + def make_names(size): """Atom names AAA -> ZZZ (all unique)""" na, nr, ns = size # produces, AAA, AAB, AAC, ABA etc names = itertools.product(*[string.ascii_uppercase] * 3) - return np.array(['{}'.format(''.join(next(names))) for _ in range(na)], - dtype=object) + return np.array( + ["{}".format("".join(next(names))) for _ in range(na)], dtype=object + ) + def make_occupancies(size): na, nr, ns = size return np.tile(np.array([1.0, 2, 3, 4, 5]), nr) + def make_radii(size): na, nr, ns = size return np.tile(np.array([1.0, 2, 3, 4, 5]), nr) + def make_serials(size): """Serials go from 10 to size+10""" na, nr, ns = size return np.arange(na) + 10 + def make_masses(size): """Atom masses (5.1, 4.2, 3.3, 1.5, 0.5) repeated""" na, nr, ns = size masses = itertools.cycle([5.1, 4.2, 3.3, 1.5, 0.5]) return np.array([next(masses) for _ in range(na)]) + def make_resnums(size): """Resnums 1 and upwards""" na, nr, ns = size return np.arange(nr, dtype=np.int64) + 1 + def make_resids(size): """Resids 1 and upwards""" na, nr, ns = size @@ -190,20 +207,20 @@ def make_resids(size): # Available extra TopologyAttrs to a dummy Universe _MENU = { # Atoms - 'altLocs': make_altLocs, - 'bfactors': make_bfactors, - 'charges': make_charges, - 'names': make_names, - 'occupancies': make_occupancies, - 'radii': make_radii, - 'serials': make_serials, - 'tempfactors': make_tempfactors, - 'types': make_types, - 'masses': make_masses, + "altLocs": make_altLocs, + "bfactors": make_bfactors, + "charges": make_charges, + "names": make_names, + "occupancies": make_occupancies, + "radii": make_radii, + "serials": make_serials, + "tempfactors": make_tempfactors, + "types": make_types, + "masses": make_masses, # Residues - 'resnames': make_resnames, - 'resnums': make_resnums, - 'resids': make_resids, + "resnames": make_resnames, + "resnums": make_resnums, + "resids": make_resids, # Segments - 'segids': make_segids, + "segids": make_segids, } diff --git a/testsuite/MDAnalysisTests/test_api.py b/testsuite/MDAnalysisTests/test_api.py index a3a476825cf..2819cd549a7 100644 --- a/testsuite/MDAnalysisTests/test_api.py +++ b/testsuite/MDAnalysisTests/test_api.py @@ -32,6 +32,7 @@ from numpy.testing import assert_equal import MDAnalysis as mda + mda_dirname = os.path.dirname(mda.__file__) @@ -61,19 +62,26 @@ def init_files(): for root, dirs, files in os.walk("."): if "__init__.py" in files: submodule = ".".join(PurePath(root).parts) - submodule = "."*(len(submodule) > 0) + submodule + submodule = "." * (len(submodule) > 0) + submodule yield submodule -@pytest.mark.parametrize('submodule', init_files()) +@pytest.mark.parametrize("submodule", init_files()) def test_all_import(submodule): module = importlib.import_module("MDAnalysis" + submodule) module_path = os.path.join(mda_dirname, *submodule.split(".")) if hasattr(module, "__all__"): - missing = [name for name in module.__all__ - if name not in module.__dict__.keys() - and name not in [os.path.splitext(f)[0] for - f in os.listdir(module_path)]] - assert_equal(missing, [], err_msg="{}".format(submodule) + - " has errors in __all__ list: " + - "missing = {}".format(missing)) + missing = [ + name + for name in module.__all__ + if name not in module.__dict__.keys() + and name + not in [os.path.splitext(f)[0] for f in os.listdir(module_path)] + ] + assert_equal( + missing, + [], + err_msg="{}".format(submodule) + + " has errors in __all__ list: " + + "missing = {}".format(missing), + ) diff --git a/testsuite/MDAnalysisTests/util.py b/testsuite/MDAnalysisTests/util.py index 88631bdcff7..afd8199e4f4 100644 --- a/testsuite/MDAnalysisTests/util.py +++ b/testsuite/MDAnalysisTests/util.py @@ -26,7 +26,8 @@ """ import builtins -builtins_name = 'builtins' + +builtins_name = "builtins" importer = builtins.__import__ from contextlib import contextmanager @@ -58,20 +59,26 @@ def try_and_do_something(): Shadows the builtin import method, sniffs import requests and blocks the designated package. """ + def blocker_wrapper(func): @wraps(func) def func_wrapper(*args, **kwargs): - with mock.patch('{}.__import__'.format(builtins_name), - wraps=importer) as mbi: + with mock.patch( + "{}.__import__".format(builtins_name), wraps=importer + ) as mbi: + def blocker(*args, **kwargs): if package in args[0]: raise ImportError("Blocked by block_import") else: # returning DEFAULT allows the real function to continue return mock.DEFAULT + mbi.side_effect = blocker func(*args, **kwargs) + return func_wrapper + return blocker_wrapper @@ -200,24 +207,28 @@ def assert_nowarns(warning_class, *args, **kwargs): return True else: # There was a warning even though we do not want to see one. - raise AssertionError("function {0} raises warning of class {1}".format( - func.__name__, warning_class.__name__)) + raise AssertionError( + "function {0} raises warning of class {1}".format( + func.__name__, warning_class.__name__ + ) + ) @contextmanager def no_warning(warning_class): """contextmanager to check that no warning was raised""" with warnings.catch_warnings(record=True) as record: - warnings.simplefilter('always') + warnings.simplefilter("always") yield if len(record) != 0: - raise AssertionError("Raised warning of class {}".format( - warning_class.__name__)) + raise AssertionError( + "Raised warning of class {}".format(warning_class.__name__) + ) class _NoDeprecatedCallContext(object): - # modified version of similar pytest class object that checks for - # raised DeprecationWarning + # modified version of similar pytest class object that checks for + # raised DeprecationWarning def __enter__(self): self._captured_categories = [] @@ -245,16 +256,24 @@ def __exit__(self, exc_type, exc_val, exc_tb): warnings.warn = self._old_warn if exc_type is None: - deprecation_categories = (DeprecationWarning, PendingDeprecationWarning) - if any(issubclass(c, deprecation_categories) for c in self._captured_categories): + deprecation_categories = ( + DeprecationWarning, + PendingDeprecationWarning, + ) + if any( + issubclass(c, deprecation_categories) + for c in self._captured_categories + ): __tracebackhide__ = True - msg = "Produced DeprecationWarning or PendingDeprecationWarning" + msg = ( + "Produced DeprecationWarning or PendingDeprecationWarning" + ) raise AssertionError(msg) def no_deprecated_call(func=None, *args, **kwargs): - # modified version of similar pytest function - # check that DeprecationWarning is NOT raised + # modified version of similar pytest function + # check that DeprecationWarning is NOT raised if not func: return _NoDeprecatedCallContext() else: @@ -268,7 +287,7 @@ def get_userid(): Calls os.geteuid() where possible, or returns 1000 (usually on windows). """ # no such thing as euid on Windows, assuming normal user 1000 - if (os.name == 'nt' or not hasattr(os, "geteuid")): + if os.name == "nt" or not hasattr(os, "geteuid"): return 1000 else: return os.geteuid() diff --git a/testsuite/pyproject.toml b/testsuite/pyproject.toml index acac47ed0b9..c3529a7bd63 100644 --- a/testsuite/pyproject.toml +++ b/testsuite/pyproject.toml @@ -156,27 +156,6 @@ filterwarnings = [ [tool.black] line-length = 79 target-version = ['py310', 'py311', 'py312', 'py313'] -include = ''' -( -setup\.py -| MDAnalysisTests/auxiliary/.*\.py -| MDAnalysisTests/lib/.*\.py -| MDAnalysisTests/transformations/.*\.py -| MDAnalysisTests/topology/.*\.py -| MDAnalysisTests/analysis/.*\.py -| MDAnalysisTests/guesser/.*\.py -| MDAnalysisTests/converters/.*\.py -| MDAnalysisTests/coordinates/.*\.py -| MDAnalysisTests/data/.*\.py -| MDAnalysisTests/formats/.*\.py -| MDAnalysisTests/parallelism/.*\.py -| MDAnalysisTests/scripts/.*\.py -| MDAnalysisTests/core/.*\.py -| MDAnalysisTests/import/.*\.py -| MDAnalysisTests/utils/.*\.py -| MDAnalysisTests/visualization/.*\.py -) -''' extend-exclude = ''' ( __pycache__ diff --git a/testsuite/scripts/modeller_make_A6PA6_alpha.py b/testsuite/scripts/modeller_make_A6PA6_alpha.py index d67746826bc..9af0bff2189 100644 --- a/testsuite/scripts/modeller_make_A6PA6_alpha.py +++ b/testsuite/scripts/modeller_make_A6PA6_alpha.py @@ -14,17 +14,17 @@ # Set up environment e = environ() # use all-hydrogen topology: -e.libs.topology.read('${LIB}/top_allh.lib') -e.libs.parameters.read('${LIB}/par.lib') +e.libs.topology.read("${LIB}/top_allh.lib") +e.libs.parameters.read("${LIB}/par.lib") e.io.hydrogen = True # Build an extended chain model from primary sequence m = model(e) -m.build_sequence('AAAAAAPAAAAAA') +m.build_sequence("AAAAAAPAAAAAA") # Make stereochemical restraints on all atoms allatoms = selection(m) -m.restraints.make(allatoms, restraint_type='STEREO', spline_on_site=False) +m.restraints.make(allatoms, restraint_type="STEREO", spline_on_site=False) # Constrain all residues to be alpha-helical # (Could also use m.residue_range() rather than m.residues here.) @@ -33,4 +33,4 @@ # Get an optimized structure with CG, and write it out cg = conjugate_gradients() cg.optimize(allatoms, max_iterations=1000) -m.write(file='A6PA6_alpha.pdb') +m.write(file="A6PA6_alpha.pdb")