diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..1b194584 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,533 @@ +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist= + +# Add files or directories to the blacklist. They should be base names, not +# paths. +ignore=CVS,redistributed + +# Add files or directories matching the regex patterns to the blacklist. The +# regex matches against base names, not paths. +ignore-patterns= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. +jobs=0 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Specify a configuration file. +#rcfile= + +# When enabled, pylint would attempt to guess common misconfiguration and emit +# user-friendly hints instead of false-positive error messages +suggestion-mode=yes + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +disable=print-statement, + parameter-unpacking, + unpacking-in-except, + old-raise-syntax, + backtick, + long-suffix, + old-ne-operator, + old-octal-literal, + import-star-module-level, + non-ascii-bytes-literal, + raw-checker-failed, + bad-inline-option, + locally-disabled, + locally-enabled, + file-ignored, + suppressed-message, + useless-suppression, + deprecated-pragma, + apply-builtin, + basestring-builtin, + buffer-builtin, + cmp-builtin, + coerce-builtin, + execfile-builtin, + file-builtin, + long-builtin, + raw_input-builtin, + reduce-builtin, + standarderror-builtin, + unicode-builtin, + xrange-builtin, + coerce-method, + delslice-method, + getslice-method, + setslice-method, + no-absolute-import, + old-division, + dict-iter-method, + dict-view-method, + next-method-called, + metaclass-assignment, + indexing-exception, + raising-string, + reload-builtin, + oct-method, + hex-method, + nonzero-method, + cmp-method, + input-builtin, + round-builtin, + intern-builtin, + unichr-builtin, + map-builtin-not-iterating, + zip-builtin-not-iterating, + range-builtin-not-iterating, + filter-builtin-not-iterating, + using-cmp-argument, + eq-without-hash, + div-method, + idiv-method, + rdiv-method, + exception-message-attribute, + invalid-str-codec, + sys-max-int, + bad-python3-import, + deprecated-string-function, + deprecated-str-translate-call, + deprecated-itertools-function, + deprecated-types-field, + next-method-defined, + dict-items-not-iterating, + dict-keys-not-iterating, + dict-values-not-iterating + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable=c-extension-no-member + + +[REPORTS] + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio).You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + +# Complete name of functions that never returns. When checking for +# inconsistent-return-statements if a never returning function is called then +# it will be considered as an explicit return statement and no message will be +# printed. +never-returning-functions=optparse.Values,sys.exit + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[SIMILARITIES] + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=no + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_, + _cb + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,past.builtins,future.builtins + + +[BASIC] + +# Naming style matching correct argument names +argument-naming-style=snake_case + +# Regular expression matching correct argument names. Overrides argument- +# naming-style +#argument-rgx= + +# Naming style matching correct attribute names +attr-naming-style=snake_case + +# Regular expression matching correct attribute names. Overrides attr-naming- +# style +#attr-rgx= + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo, + bar, + baz, + toto, + tutu, + tata + +# Naming style matching correct class attribute names +class-attribute-naming-style=snake_case + +# Regular expression matching correct class attribute names. Overrides class- +# attribute-naming-style +#class-attribute-rgx= + +# Naming style matching correct class names +class-naming-style=PascalCase + +# Regular expression matching correct class names. Overrides class-naming-style +#class-rgx= + +# Naming style matching correct constant names +const-naming-style=UPPER_CASE + +# Regular expression matching correct constant names. Overrides const-naming- +# style +#const-rgx= + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming style matching correct function names +function-naming-style=snake_case + +# Regular expression matching correct function names. Overrides function- +# naming-style +#function-rgx= + +# Good variable names which should always be accepted, separated by a comma +good-names=_ + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Naming style matching correct inline iteration names +inlinevar-naming-style=snake_case + +# Regular expression matching correct inline iteration names. Overrides +# inlinevar-naming-style +#inlinevar-rgx= + +# Naming style matching correct method names +method-naming-style=snake_case + +# Regular expression matching correct method names. Overrides method-naming- +# style +#method-rgx= + +# Naming style matching correct module names +module-naming-style=snake_case + +# Regular expression matching correct module names. Overrides module-naming- +# style +#module-rgx= + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +property-classes=abc.abstractproperty + +# Naming style matching correct variable names +variable-naming-style=snake_case + +# Regular expression matching correct variable names. Overrides variable- +# naming-style +#variable-rgx= + + +[SPELLING] + +# Limits count of emitted suggestions for spelling mistakes +max-spelling-suggestions=4 + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words=no + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME, + XXX, + TODO + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module +max-module-lines=1000 + +# List of optional constructs for which whitespace checking is disabled. `dict- +# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. +# `trailing-comma` allows a space between comma and closing bracket: (a, ). +# `empty-line` allows space-only lines. +no-space-check=trailing-comma, + dict-separator + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis. It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + + +[IMPORTS] + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=optparse,tkinter.tix + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=5 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in a if statement +max-bool-expr=5 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of locals for function / method body +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of statements in function / method body +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 + + +[CLASSES] + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__, + __new__ + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict, + _fields, + _replace, + _source, + _make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception diff --git a/vermouth/__init__.py b/vermouth/__init__.py index 48cbac9c..6cf6e713 100644 --- a/vermouth/__init__.py +++ b/vermouth/__init__.py @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:41:47 2017 - -@author: Peter Kroon -""" - # Find the data directory once. try: import pkg_resources diff --git a/vermouth/deferred_file.py b/vermouth/deferred_file.py index cd332138..e5f74cd0 100644 --- a/vermouth/deferred_file.py +++ b/vermouth/deferred_file.py @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Mon Oct 9 10:04:01 2017 - -@author: Peter Kroon -""" - import os import sys import tempfile diff --git a/vermouth/ffinput.py b/vermouth/ffinput.py index 5cee7ed2..30d9e23d 100644 --- a/vermouth/ffinput.py +++ b/vermouth/ffinput.py @@ -24,7 +24,6 @@ import collections import copy -import math import numbers import json from .molecule import ( @@ -33,8 +32,6 @@ Choice, NotDefinedOrNot, ParamDistance, ParamAngle, ParamDihedral, ParamDihedralPhase, ) -import networkx as nx -import copy VALUE_PREDICATES = { 'not': NotDefinedOrNot, @@ -55,7 +52,7 @@ def _tokenize(line): An interaction line is any uncommented and non empty line that follows a section header about an interaction type. Such a line is composed of the following parts: - + * a list of atoms involved in the interaction, * an optional delimiter that indicates the end of the atom list, * a list of parameters for the interaction. @@ -218,7 +215,7 @@ def _substitute_macros(line, macros): end = start + len(macro_value) return line - + def _some_atoms_left(tokens, atoms, natoms): if tokens and tokens[0] == '--': tokens.popleft() @@ -285,7 +282,7 @@ def _treat_block_interaction_atoms(atoms, context, section): msg = ('Atom names in blocks cannot be prefixed with + or -. ' 'The name "{}", used in section "{}" of the block "{}" ' 'is not valid in a block.') - raise IOError(msg.format(reference, section, block.name)) + raise IOError(msg.format(reference, section, context.name)) def _split_node_key(key): @@ -296,6 +293,7 @@ def _split_node_key(key): raise IOError('A node key cannot be empty.') # If the atom name is prefixed, we can get the order. + prefix_end = 0 # Make sure prefix_end is defined even if key is empty for prefix_end, char in enumerate(key): if char not in '+-><*': break @@ -320,7 +318,7 @@ def _split_node_key(key): def _get_order_and_prefix_from_attributes(attributes): prefix_from_attributes = '' order_from_attributes = None - Sequence = collections.Sequence + Sequence = collections.Sequence # pylint: disable=invalid-name if attributes.get('order') is not None: order = attributes['order'] order_from_attributes = order @@ -707,7 +705,7 @@ def _parse_patterns(tokens, context, context_type): context.patterns.append(atoms) -def _parse_variables(tokens, force_field): +def _parse_variables(tokens, force_field, section): if len(tokens) > 2: raise IOError('Unexpected column in section "{}".'.format(section)) elif len(tokens) < 2: @@ -724,6 +722,16 @@ def _parse_features(tokens, context, context_type): def read_ff(lines, force_field): + """ + Read a .ff file and update the force field with its content. + + Parameters + ---------- + lines + Iterable on the file lines to read. + force_field: vermouth.ForceField + The force field to update. + """ interactions_natoms = { 'bonds': 2, 'angles': 3, @@ -808,7 +816,7 @@ def read_ff(lines, force_field): if context is not None: raise IOError('The [variables] section must be defined ' 'before the blocks and the links.') - _parse_variables(tokens, force_field) + _parse_variables(tokens, force_field, section) elif tokens[0] == '#meta': _parse_meta(tokens, context, context_type, section) else: diff --git a/vermouth/forcefield.py b/vermouth/forcefield.py index 2a6b8008..83bb4502 100644 --- a/vermouth/forcefield.py +++ b/vermouth/forcefield.py @@ -14,7 +14,6 @@ import itertools from glob import glob -from pathlib import Path import os from .gmx.rtp import read_rtp from .ffinput import read_ff @@ -24,6 +23,19 @@ class ForceField(object): + """ + Description of a force field. + + Attributes + ---------- + blocks: dict + links: list + modifications: list + renamed_residues: dict + name: str + variables: dict + reference_graphs: dict + """ def __init__(self, directory): self.blocks = {} self.links = [] @@ -34,6 +46,12 @@ def __init__(self, directory): self.read_from(directory) def read_from(self, directory): + """ + Populate or update the force field from a directory. + + The provided directory must contain a subdirectory with the same name + as the force field. + """ source_files = iter_force_field_files(directory) for source in source_files: extension = os.path.splitext(source)[-1] @@ -69,14 +87,35 @@ def has_feature(self, feature): bool """ return feature in self.features - + def find_force_fields(directory, force_fields=None): """ - Find all the force fields in the given directory. + Read all the force fields in the given directory. A force field is defined as a directory that contains at least one RTP file. The name of the force field is the base name of the directory. + + If the force field argument is not ``None``, then it must be a dictionary + with force field names as keys and instances of :class:`ForceField` as + values. The force fields in the dictionary will be updated if force fields + with the same names are found in the directory. + + Parameters + ---------- + directory: pathlib.Path or str + The path to the directory containing the force fields. + force_fields: dict (optional) + A dictionary of force fields to update. + + Returns + ------- + dict + A dictionary of force fields read or updated. Keys are force field + names as strings, and values are instances of :class:`ForceField`. If a + dictionary was provided as the "force_fields" argument, then the + returned dictionary is the same instance as the one provided but with + updated content. """ if force_fields is None: force_fields = {} @@ -99,10 +138,13 @@ def find_force_fields(directory, force_fields=None): return force_fields -def iter_force_field_files(directory, parsers=FORCE_FIELD_PARSERS): +def iter_force_field_files(directory, extensions=FORCE_FIELD_PARSERS.keys()): + """ + Returns a generator over the path of all the force field files in the directory. + """ return itertools.chain(*( glob(os.path.join(directory, '*' + extension)) - for extension in parsers + for extension in extensions )) diff --git a/vermouth/geometry.py b/vermouth/geometry.py index 41ffadae..727590ae 100644 --- a/vermouth/geometry.py +++ b/vermouth/geometry.py @@ -49,7 +49,7 @@ def distance_matrix(coordinates_a, coordinates_b): ) -def angle(vectorBA, vectorBC): +def angle(vector_ba, vector_bc): """ Calculate the angle in radians between two vectors. @@ -61,8 +61,8 @@ def angle(vectorBA, vectorBC): It returns the angle between BA and BC. """ - nominator = np.dot(vectorBA, vectorBC) - denominator = np.linalg.norm(vectorBA) * np.linalg.norm(vectorBC) + nominator = np.dot(vector_ba, vector_bc) + denominator = np.linalg.norm(vector_ba) * np.linalg.norm(vector_bc) cosine = nominator / denominator # Floating errors at the limits may cause issues. cosine = np.clip(cosine, -1, 1) @@ -84,13 +84,13 @@ def dihedral(coordinates): float The calculated angle between -pi and +pi. """ - vectorAB = coordinates[1, :] - coordinates[0, :] - vectorBC = coordinates[2, :] - coordinates[1, :] - vectorCD = coordinates[3, :] - coordinates[2, :] - normalABC = np.cross(vectorAB, vectorBC) - normalBCD = np.cross(vectorBC, vectorCD) - psin = np.dot(normalABC, vectorCD) * np.linalg.norm(vectorBC) - pcos = np.dot(normalABC, normalBCD) + vector_ab = coordinates[1, :] - coordinates[0, :] + vector_bc = coordinates[2, :] - coordinates[1, :] + vector_cd = coordinates[3, :] - coordinates[2, :] + normal_abc = np.cross(vector_ab, vector_bc) + normal_bcd = np.cross(vector_bc, vector_cd) + psin = np.dot(normal_abc, vector_cd) * np.linalg.norm(vector_bc) + pcos = np.dot(normal_abc, normal_bcd) return np.arctan2(psin, pcos) @@ -114,10 +114,10 @@ def dihedral_phase(coordinates): dihedral Calculate a dihedral angle. """ - angle = dihedral(coordinates) - angle -= np.pi - if angle > np.pi: - angle -= 2 * np.pi - if angle < -np.pi: - angle += 2 * np.pi - return angle + dihedral_angle = dihedral(coordinates) + dihedral_angle -= np.pi + if dihedral_angle > np.pi: + dihedral_angle -= 2 * np.pi + if dihedral_angle < -np.pi: + dihedral_angle += 2 * np.pi + return dihedral_angle diff --git a/vermouth/gmx/__init__.py b/vermouth/gmx/__init__.py index f68c9050..0f9f2edd 100644 --- a/vermouth/gmx/__init__.py +++ b/vermouth/gmx/__init__.py @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:42:17 2017 - -@author: Peter Kroon -""" - from .gro import read_gro, write_gro from .itp import write_molecule_itp from .rtp import read_rtp diff --git a/vermouth/gmx/gro.py b/vermouth/gmx/gro.py index 8e02e8cf..7f03922d 100644 --- a/vermouth/gmx/gro.py +++ b/vermouth/gmx/gro.py @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:34:12 2017 - -@author: Peter Kroon -""" from ..molecule import Molecule from ..utils import first_alpha from ..truncating_formatter import TruncFormatter diff --git a/vermouth/graph_utils.py b/vermouth/graph_utils.py index 2271b3da..b07fc392 100644 --- a/vermouth/graph_utils.py +++ b/vermouth/graph_utils.py @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Oct 10 10:51:03 2017 - -@author: peterkroon -""" from collections import defaultdict import itertools import networkx as nx diff --git a/vermouth/map_input.py b/vermouth/map_input.py index ce3e85cb..d352bd57 100644 --- a/vermouth/map_input.py +++ b/vermouth/map_input.py @@ -183,9 +183,13 @@ def read_mapping_directory(directory): except IOError: raise IOError('An error occured while reading "{}".'.format(path)) for from_ff in all_from_ff: + to_ff = None for to_ff in all_to_ff: mappings[from_ff][to_ff][name] = (mapping, weights, extra) - mappings[from_ff][to_ff] = dict(mappings[from_ff][to_ff]) + if to_ff is not None: + # If all_to_ff is empty, then to_ff will not be redefined by + # the above for loop. + mappings[from_ff][to_ff] = dict(mappings[from_ff][to_ff]) return dict(mappings) diff --git a/vermouth/molecule.py b/vermouth/molecule.py index dd0c35e9..33a80196 100644 --- a/vermouth/molecule.py +++ b/vermouth/molecule.py @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Thu Sep 14 10:58:04 2017 - -@author: Peter Kroon -""" - from collections import defaultdict, OrderedDict, namedtuple import copy from functools import partial diff --git a/vermouth/pdb/__init__.py b/vermouth/pdb/__init__.py index 717a1394..38a5642d 100644 --- a/vermouth/pdb/__init__.py +++ b/vermouth/pdb/__init__.py @@ -13,10 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:42:42 2017 - -@author: Peter Kroon -""" - from .pdb import read_pdb, write_pdb diff --git a/vermouth/pdb/pdb.py b/vermouth/pdb/pdb.py index b66be791..7f1bb29c 100644 --- a/vermouth/pdb/pdb.py +++ b/vermouth/pdb/pdb.py @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:33:07 2017 - -@author: Peter Kroon -""" from ..molecule import Molecule from ..utils import first_alpha, distance from ..truncating_formatter import TruncFormatter diff --git a/vermouth/processors/__init__.py b/vermouth/processors/__init__.py index 877b5ff1..077d3312 100644 --- a/vermouth/processors/__init__.py +++ b/vermouth/processors/__init__.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 10:45:54 2017 - -@author: peterkroon -""" - from .gro_reader import GROInput from .make_bonds import MakeBonds from .pdb_reader import PDBInput diff --git a/vermouth/processors/apply_blocks.py b/vermouth/processors/apply_blocks.py index cd2f79b7..12aa5d56 100644 --- a/vermouth/processors/apply_blocks.py +++ b/vermouth/processors/apply_blocks.py @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Fri Oct 27 14:39:20 2017 - -@author: peterkroon -""" from ..gmx import read_rtp from .processor import Processor diff --git a/vermouth/processors/do_links.py b/vermouth/processors/do_links.py index 06442734..317c6611 100644 --- a/vermouth/processors/do_links.py +++ b/vermouth/processors/do_links.py @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 25 16:00:02 2017 - -@author: peterkroon -""" from ..molecule import LinkPredicate, attributes_match, NotDefinedOrNot from .processor import Processor from ..gmx import read_rtp diff --git a/vermouth/processors/do_mapping.py b/vermouth/processors/do_mapping.py index e0263005..6fa9e21a 100644 --- a/vermouth/processors/do_mapping.py +++ b/vermouth/processors/do_mapping.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Oct 10 11:11:54 2017 - -@author: peterkroon -""" - from ..molecule import Molecule from .processor import Processor from ..utils import are_all_equal diff --git a/vermouth/processors/gro_reader.py b/vermouth/processors/gro_reader.py index be740783..311f398e 100644 --- a/vermouth/processors/gro_reader.py +++ b/vermouth/processors/gro_reader.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 10:41:10 2017 - -@author: peterkroon -""" - from ..gmx import gro from .processor import Processor diff --git a/vermouth/processors/make_bonds.py b/vermouth/processors/make_bonds.py index 6bdcecb7..8d03a96e 100644 --- a/vermouth/processors/make_bonds.py +++ b/vermouth/processors/make_bonds.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 10:48:58 2017 - -@author: peterkroon -""" - from .. import KDTree from ..molecule import Molecule from .processor import Processor diff --git a/vermouth/processors/pdb_reader.py b/vermouth/processors/pdb_reader.py index ffaa452a..20a5ba17 100644 --- a/vermouth/processors/pdb_reader.py +++ b/vermouth/processors/pdb_reader.py @@ -14,15 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 10:41:10 2017 - -@author: peterkroon -""" - from ..pdb import read_pdb from .processor import Processor + class PDBInput(Processor): def run_system(self, system, filename): molecule = read_pdb(filename) diff --git a/vermouth/processors/processor.py b/vermouth/processors/processor.py index 11860398..5d5b0a69 100644 --- a/vermouth/processors/processor.py +++ b/vermouth/processors/processor.py @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 13:03:50 2017 - -@author: peterkroon -""" class Processor: def run_system(self, system): diff --git a/vermouth/processors/repair_graph.py b/vermouth/processors/repair_graph.py index e9cfe65b..2fcd036e 100644 --- a/vermouth/processors/repair_graph.py +++ b/vermouth/processors/repair_graph.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Thu Oct 5 10:43:19 2017 - -@author: peterkroon -""" - from .processor import Processor from ..graph_utils import * diff --git a/vermouth/system.py b/vermouth/system.py index a11d3f07..015d90ba 100644 --- a/vermouth/system.py +++ b/vermouth/system.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Wed Oct 4 10:39:09 2017 - -@author: peterkroon -""" - class System: def __init__(self): diff --git a/vermouth/truncating_formatter.py b/vermouth/truncating_formatter.py index fbe9c159..32b302d0 100644 --- a/vermouth/truncating_formatter.py +++ b/vermouth/truncating_formatter.py @@ -14,12 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Fri Oct 20 13:53:45 2017 - -@author: peterkroon -""" - import string import re from collections import namedtuple diff --git a/vermouth/utils.py b/vermouth/utils.py index e554c215..48f8a3dc 100644 --- a/vermouth/utils.py +++ b/vermouth/utils.py @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" -Created on Tue Aug 22 11:38:17 2017 - -@author: Peter Kroon -""" - import numpy as np try: