Unverified Commit 82703dff authored by Christian Clauss's avatar Christian Clauss Committed by GitHub
Browse files

Fix typos discovered by codespell in Python files (#5173)

parent 07b738c5
......@@ -293,7 +293,7 @@ def buildResidueDict( residueXmlFileName ):
atoms = getXmlAtoms( residue.findall('Atom') )
bondInfo = getXmlBonds( residue.findall('Bond') )
# if residue is an amino acid, then create CALA and NALA residues, in addition to non-termianal residue, and include approriate atoms
# if residue is an amino acid, then create CALA and NALA residues, in addition to non-termianal residue, and include appropriate atoms
# HXT is excluded from all residues
if( isWater ):
......
......@@ -2,7 +2,7 @@
Run test suite through CTest, with some options set for the CI environment.
- Runs with a per-test and overall timeout which can be governed by the
avialable time on the CI system.
available time on the CI system.
- Reruns tests which fail (does not rerun tests which merely timeout).
"""
......
......@@ -34,7 +34,7 @@ def appendTestResult(filename=None, test_result=None, system_info=None):
The filename to append a result to, ending either in .yaml or .json
If None, no result is written
test_result : dict, optional, default=None
The test result to append to the 'benchmarks' blcok
The test result to append to the 'benchmarks' block
system_info : dict, optional, default=None
System info to append to the 'system' block
"""
......
......@@ -52,7 +52,7 @@ def createRigidBodies(system, positions, bodies):
Care is needed when using constraints, since virtual particles cannot participate in constraints. If the
input system includes any constraints, this function will automatically remove ones that connect two
particles in the same rigid body. But if there is a constraint beween a particle in a rigid body and
particles in the same rigid body. But if there is a constraint between a particle in a rigid body and
another particle not in that body, it will likely lead to an exception when you try to create a context.
Parameters:
......
......@@ -60,7 +60,7 @@ class DesmondDMSFile(object):
# sqlite3 is included in the standard lib, but at python
# compile time, you can disable support (I think), so it's
# not *guarenteed* to be available. Doing the import here
# not *guaranteed* to be available. Doing the import here
# means we only raise an ImportError if people try to use
# this class, so the module can be safely imported
import sqlite3
......@@ -90,7 +90,7 @@ class DesmondDMSFile(object):
self._open[fcounter] = True
tables = self._readSchemas(conn)
if len(tables) == 0:
raise IOError('DMS file %s was not loaded sucessfully. No tables found' % str(f))
raise IOError('DMS file %s was not loaded successfully. No tables found' % str(f))
if 'nbtype' not in tables['particle']:
raise ValueError('No nonbonded parameters associated with '
'DMS file %s. You can add a forcefield with the '
......@@ -882,7 +882,7 @@ class DesmondDMSFile(object):
def _checkForUnsupportedTerms(self):
"""Check the file for forcefield terms that are not currenty supported,
"""Check the file for forcefield terms that are not currently supported,
raising a NotImplementedError
"""
flat_bottom_potential_terms = ['stretch_fbhw_term', 'angle_fbhw_term',
......
......@@ -697,7 +697,7 @@ def readAmberSystem(topology, prmtop_filename=None, prmtop_loader=None, shake=No
scee (float) - 1-4 electrostatics scaling factor (default: taken from prmtop or 2.0 if not present there)
mm - if specified, this module will be used in place of pyopenmm (default: None)
verbose (boolean) - if True, print out information on progress (default: False)
flexibleConstraints (boolean) - if True, flexible bonds will be added in addition ot constrained bonds
flexibleConstraints (boolean) - if True, flexible bonds will be added in addition to constrained bonds
rigidWater (boolean=True) If true, water molecules will be fully rigid regardless of the value passed for the shake argument
sasaMethod (str='ACE') The string representing the SA model to use for GB calculations. Must be 'ACE', 'LCPO', or None
......
......@@ -280,7 +280,7 @@ class AmoebaBondForceBuilder(BaseAmoebaForceBuilder):
bonds : list
List of bonds indices as tuples of (atom1, atom2).
isConstrained : list
List of flags indicating if a given bond is constrainted.
List of flags indicating if a given bond is constrained.
flexibleConstraints : bool
If True, constrained bonds will still be added to the system.
"""
......@@ -426,7 +426,7 @@ class AmoebaAngleForceBuilder(BaseAmoebaForceBuilder):
angles : List[Tuple[int, int, int]]
List of angle indices as tuples of (atom1, atom2, atom3).
anglesConstraints : Optional[list]
List of flags indicating if a given angle is constrainted.
List of flags indicating if a given angle is constrained.
flexibleConstraints : bool
If True, constrained angles will still be added to the system.
"""
......@@ -545,7 +545,7 @@ class AmoebaInPlaneAngleForceBuilder(BaseAmoebaForceBuilder):
inPlaneAngles : List[Tuple[int, int, int, int]]
List of in-plane angle indices as tuples of (atom1, atom2, atom3, atom4).
anglesConstraints : Optional[list]
List of flags indicating if a given angle is constrainted.
List of flags indicating if a given angle is constrained.
flexibleConstraints : bool
If True, constrained angles will still be added to the system.
"""
......
"""
pdbstructure.py: Used for managing PDB formated files.
pdbstructure.py: Used for managing PDB formatted files.
This is part of the OpenMM molecular simulation toolkit.
See https://openmm.org/development.
......@@ -890,7 +890,7 @@ class Atom(object):
if alternate_location_indicator is None:
alternate_location_indicator = self.alternate_location_indicator
# produce PDB line in three parts: names, numbers, and end
# Accomodate 4-character residue names that use column 21
# Accommodate 4-character residue names that use column 21
long_res_name = self.residue_name_with_spaces
if len(long_res_name) == 3:
long_res_name += " "
......
......@@ -23,7 +23,7 @@ A base container class is defined which supports common features of
data and definition containers. PDBx data files are organized in
sections called data blocks which are mapped to data containers.
PDBx dictionaries contain definition sections and data sections
which are mapped to definition and data containes respectively.
which are mapped to definition and data containers respectively.
Data in both PDBx data files and dictionaries are organized in
data categories. In the PDBx syntax individual items or data
......
......@@ -6,7 +6,7 @@
#
# 2009-11-05 - (jdw) Change table storage architecture for list of
# dictionaries to list of lists.
# 2012-01-09 - (jdw) This module now obsolted by PdbxReader/PdbxWriter
# 2012-01-09 - (jdw) This module now obsoleted by PdbxReader/PdbxWriter
# modules. APIs are preserved.
#
# 2012-09-01 - (jdw) Revise tokenizer to better handle embedded quoting.
......@@ -334,7 +334,7 @@ class PdbxReader(object):
curCatName,curAttName,curQuotedString,curWord = next(tokenizer)
elif state == "ST_UNKNOWN":
self.__syntaxError("Unrecogized syntax element: " + str(curWord))
self.__syntaxError("Unrecognized syntax element: " + str(curWord))
return
......@@ -532,7 +532,7 @@ class PdbxWriter(object):
if len(objL) == 0:
continue
# Item - value formattting
# Item - value formatting
elif len(objL) == 1:
self.__writeItemValueFormat(obj)
......
......@@ -323,7 +323,7 @@ class PdbxReader(object):
curCatName,curAttName,curQuotedString,curWord = next(tokenizer)
elif state == "ST_UNKNOWN":
self.__syntaxError("Unrecogized syntax element: " + str(curWord))
self.__syntaxError("Unrecognized syntax element: " + str(curWord))
return
......
......@@ -75,7 +75,7 @@ class PdbxWriter(object):
if len(objL) == 0:
continue
# Item - value formattting
# Item - value formatting
elif len(objL) == 1:
self.__writeItemValueFormat(obj)
......
......@@ -10,7 +10,7 @@ Contributors: Peter Eastman
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, includ ing without limitation
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
......
......@@ -223,7 +223,7 @@ class MyMatrix(MyVector):
n = len(rhs[0])
r = len(rhs)
if self.numCols() != r:
raise ArithmeticError("Matrix multplication size mismatch (%d vs %d)" % (self.numCols(), r))
raise ArithmeticError("Matrix multiplication size mismatch (%d vs %d)" % (self.numCols(), r))
result = zeros(m, n)
for i in range(m):
for j in range(n):
......
......@@ -144,7 +144,7 @@ def define_prefixed_units(base_unit, module = sys.modules[__name__]):
new_unit = Unit({new_base_unit: 1.0})
# Create base_unit attribute, needed for creating UnitSystems
module.__dict__[name + '_base_unit'] = new_base_unit # e.g. "kilometer_base_unit"
# Create attribue in this module
# Create attribute in this module
module.__dict__[name] = new_unit # e.g. "kilometer"
# And plural version
module.__dict__[name + 's'] = new_unit # e.g. "kilometers"
......
......@@ -151,10 +151,10 @@ class Quantity(object):
if isinstance(value, numpy.ndarray):
value = numpy.array(new_container._value)
else:
# delegate contruction to container class from list
# delegate construction to container class from list
value = value.__class__(new_container._value)
except ImportError:
# delegate contruction to container class from list
# delegate construction to container class from list
value = value.__class__(new_container._value)
else:
# Non-Quantity, non container
......
......@@ -91,7 +91,7 @@ class Unit(object):
if base_unit not in self._all_base_units[dim]:
self._all_base_units[dim][base_unit] = 0
self._all_base_units[dim][base_unit] += exponent1 * exponent2
# What about heterogenous units that cancel? --> leave them
# What about heterogeneous units that cancel? --> leave them
self._scaled_units.sort()
def create_unit(self, scale, name, symbol):
......@@ -466,7 +466,7 @@ class Unit(object):
def get_name(self):
"""
Returns a unit name (string) for this Unit, composed of its various
BaseUnit symbols. e.g. 'kilogram meter**2 secon**-1'.
BaseUnit symbols. e.g. 'kilogram meter**2 second**-1'.
"""
try:
return self._name
......
#!/usr/bin/env python
"""Build swig imput file from xml encoded header files (see gccxml)."""
"""Build swig input file from xml encoded header files (see gccxml)."""
__author__ = "Randall J. Radmer"
__version__ = "1.0"
......
......@@ -4,7 +4,7 @@
# Add base classes missing from the XML input file
MISSING_BASE_CLASSES = {'OpenMMException':'std::exception'}
# Doc strings to replace some fo the confusing ones generaged by swig
# Doc strings to replace some of the confusing ones generated by swig
# Indexed by (className, methodName)
DOC_STRINGS = {("Context", "setPositions") :
"setPositions(self, positions)",
......
......@@ -1258,7 +1258,7 @@ class TestAPIUnits(unittest.TestCase):
integrator.setRelativeCollisionFrequency(0.1/picosecond)
self.assertEqual(integrator.getRelativeCollisionFrequency(), 0.1/picosecond)
# Test bare consructor and addThermostat
# Test bare constructor and addThermostat
integrator = NoseHooverIntegrator(1*femtosecond)
self.assertEqual(integrator.getStepSize(), 1*femtosecond)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment