diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 722f436063..4954fb522b 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -44,7 +44,7 @@ usually faster than using tools like Valgrind. .. code-block:: bash -D ENABLE_SANITIZE_ADDRESS=value # enable Address Sanitizer, value = no (default) or yes - -D ENABLE_SANITIZE_UNDEFINED=value # enable Undefined Behaviour Sanitizer, value = no (default) or yes + -D ENABLE_SANITIZE_UNDEFINED=value # enable Undefined Behavior Sanitizer, value = no (default) or yes -D ENABLE_SANITIZE_THREAD=value # enable Thread Sanitizer, value = no (default) or yes ---------- diff --git a/examples/USER/cgdna/examples/oxDNA2/unique_bp/generate_unique.py b/examples/USER/cgdna/examples/oxDNA2/unique_bp/generate_unique.py index 0760d24a0b..131f51e9b4 100644 --- a/examples/USER/cgdna/examples/oxDNA2/unique_bp/generate_unique.py +++ b/examples/USER/cgdna/examples/oxDNA2/unique_bp/generate_unique.py @@ -373,7 +373,7 @@ def generate_strand(bp, sequence=None, start_pos=np.array([0, 0, 0]), \ # if not provided switch off random orientation if perp is None or perp is False: v1 = np.random.random_sample(3) - # comment in to suppress randomised base vector + # comment in to suppress randomized base vector v1 = [1,0,0] v1 -= dir * (np.dot(dir, v1)) v1 /= np.sqrt(sum(v1*v1)) @@ -644,12 +644,12 @@ def read_strands(filename): # generate random position of the first nucleotide com = box_offset + np.random.random_sample(3) * box - # comment out to randomise + # comment out to randomize com = [0,0,0] # generate the random direction of the helix axis = np.random.random_sample(3) - # comment out to randomise + # comment out to randomize axis = [0,0,1] axis /= np.sqrt(np.dot(axis, axis)) @@ -702,12 +702,12 @@ def read_strands(filename): # generate random position of the first nucleotide com = box_offset + np.random.random_sample(3) * box - # comment out to randomise + # comment out to randomize com = [-30,0,0] # generate the random direction of the helix axis = np.random.random_sample(3) - # comment out to randomise + # comment out to randomize axis = [0,0,1] axis /= np.sqrt(np.dot(axis, axis)) diff --git a/examples/USER/manifold/diffusion/plot_msd.gpl b/examples/USER/manifold/diffusion/plot_msd.gpl index dbc87eee07..4694343ad4 100644 --- a/examples/USER/manifold/diffusion/plot_msd.gpl +++ b/examples/USER/manifold/diffusion/plot_msd.gpl @@ -47,7 +47,7 @@ set object 1 rectangle from graph 0,0 to graph 1,1 fillcolor rgb "white" behind unset key set grid front -set title 'Short time behaviour' offset 0,-0.8 +set title 'Short time behavior' offset 0,-0.8 set ylabel '' set xrange[0:10] set yrange[0:40] diff --git a/python/examples/pylammps/montecarlo/mc.ipynb b/python/examples/pylammps/montecarlo/mc.ipynb index 8509845a3d..0275171bdd 100644 --- a/python/examples/pylammps/montecarlo/mc.ipynb +++ b/python/examples/pylammps/montecarlo/mc.ipynb @@ -822,7 +822,7 @@ "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " // Handle any extra behaviour associated with a key event\n", + " // Handle any extra behavior associated with a key event\n", "}\n", "\n", "mpl.figure.prototype.key_event = function(event, name) {\n", @@ -1053,7 +1053,7 @@ "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", + " // IPython event is triggered only after the cells have been serialized, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", diff --git a/src/RIGID/fix_rattle.cpp b/src/RIGID/fix_rattle.cpp index 93bf610e94..ff31ab9755 100644 --- a/src/RIGID/fix_rattle.cpp +++ b/src/RIGID/fix_rattle.cpp @@ -119,7 +119,7 @@ int FixRattle::setmask() void FixRattle::init() { - // initialise SHAKE first + // initialize SHAKE first FixShake::init(); diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 3342f02194..b1ce975005 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -3059,7 +3059,7 @@ void FixShake::correct_velocities() {} void FixShake::correct_coordinates(int vflag) { // save current forces and velocities so that you - // initialise them to zero such that FixShake::unconstrained_coordinate_update has no effect + // initialize them to zero such that FixShake::unconstrained_coordinate_update has no effect for (int j=0; jall(FLERR,"Incorrect args for pair coefficients"); // Initialise potential - // First call initialises potential via the fortran code in memory, and returns the necessary size - // of quip_potential. This behaviour is invoked by setting n_potential_quip to 0. + // First call initializes potential via the fortran code in memory, and returns the necessary size + // of quip_potential. This behavior is invoked by setting n_potential_quip to 0. n_quip_potential = 0; quip_potential = new int[0]; quip_lammps_potential_initialise(quip_potential,&n_quip_potential,&cutoff,quip_file,&n_quip_file,quip_string,&n_quip_string); diff --git a/tools/amber2lmp/amber2lammps.py b/tools/amber2lmp/amber2lammps.py index cb0820f96c..5a2d17c53b 100644 --- a/tools/amber2lmp/amber2lammps.py +++ b/tools/amber2lmp/amber2lammps.py @@ -175,7 +175,7 @@ class Lammps: class Amber: def __init__(self): - 'Initialise the Amber class' + 'Initialize the Amber class' self.CRD_is_read = 0 self.TOP_is_read = 0 diff --git a/tools/amber2lmp/dump2trj.py b/tools/amber2lmp/dump2trj.py index d406ae7eb9..0f0b936397 100644 --- a/tools/amber2lmp/dump2trj.py +++ b/tools/amber2lmp/dump2trj.py @@ -70,7 +70,7 @@ def Find_dump_files(): class Snapshot: def __init__(self, The_trajectory): - 'Initialise the Snapshot class' + 'Initialize the Snapshot class' self.timestep = The_trajectory.timestep self.atoms = The_trajectory.atoms diff --git a/tools/amber2lmp/dump2trj99.py b/tools/amber2lmp/dump2trj99.py index 19e6064e7c..3cac42987c 100755 --- a/tools/amber2lmp/dump2trj99.py +++ b/tools/amber2lmp/dump2trj99.py @@ -68,7 +68,7 @@ def Find_dump_files(): class Snapshot: def __init__(self, The_trajectory): - 'Initialise the Snapshot class' + 'Initialize the Snapshot class' self.atoms = The_trajectory.atoms self.xlo = The_trajectory.xlo diff --git a/tools/i-pi/ipi/engine/atoms.py b/tools/i-pi/ipi/engine/atoms.py index fd52ccf96b..9e6e2752f6 100644 --- a/tools/i-pi/ipi/engine/atoms.py +++ b/tools/i-pi/ipi/engine/atoms.py @@ -51,7 +51,7 @@ class Atom(dobject): """ def __init__(self, system, index): - """Initialises Atom. + """Initializes Atom. Args: system: An Atoms object containing the required atom. @@ -116,7 +116,7 @@ class Atoms(dobject): def __init__(self, natoms, _prebind=None): - """Initialises Atoms. + """Initializes Atoms. Each replica and the centroid coordinate are all held as Atoms objects, and so slices of the global position and momentum arrays must be used in diff --git a/tools/i-pi/ipi/engine/barostats.py b/tools/i-pi/ipi/engine/barostats.py index 5dbc6049d5..b65e62746c 100644 --- a/tools/i-pi/ipi/engine/barostats.py +++ b/tools/i-pi/ipi/engine/barostats.py @@ -70,7 +70,7 @@ class Barostat(dobject): """ def __init__(self, dt=None, temp=None, pext=None, tau=None, ebaro=None, thermostat=None): - """Initialises base barostat class. + """Initializes base barostat class. Note that the external stress and the external pressure are synchronized. This makes most sense going from the stress to the pressure, but if you diff --git a/tools/i-pi/ipi/engine/beads.py b/tools/i-pi/ipi/engine/beads.py index ba4ddf1509..1a20574522 100644 --- a/tools/i-pi/ipi/engine/beads.py +++ b/tools/i-pi/ipi/engine/beads.py @@ -71,7 +71,7 @@ class Beads(dobject): """ def __init__(self, natoms, nbeads): - """Initialises Beads. + """Initializes Beads. Args: natoms: Number of atoms. diff --git a/tools/i-pi/ipi/engine/cell.py b/tools/i-pi/ipi/engine/cell.py index e9bf813502..f800773a23 100644 --- a/tools/i-pi/ipi/engine/cell.py +++ b/tools/i-pi/ipi/engine/cell.py @@ -44,7 +44,7 @@ class Cell(dobject): """ def __init__(self, h=None): - """Initialises base cell class. + """Initializes base cell class. Args: h: Optional array giving the initial lattice vector matrix. The diff --git a/tools/i-pi/ipi/engine/ensembles.py b/tools/i-pi/ipi/engine/ensembles.py index ef592405b0..23d88e436b 100644 --- a/tools/i-pi/ipi/engine/ensembles.py +++ b/tools/i-pi/ipi/engine/ensembles.py @@ -78,7 +78,7 @@ class Ensemble(dobject): """ def __init__(self, dt, temp, fixcom=False): - """Initialises Ensemble. + """Initializes Ensemble. Args: dt: The timestep of the simulation algorithms. @@ -177,7 +177,7 @@ class NVEEnsemble(Ensemble): """ def __init__(self, dt, temp, fixcom=False): - """Initialises NVEEnsemble. + """Initializes NVEEnsemble. Args: dt: The simulation timestep. @@ -273,7 +273,7 @@ class NVTEnsemble(NVEEnsemble): """ def __init__(self, dt, temp, thermostat=None, fixcom=False): - """Initialises NVTEnsemble. + """Initializes NVTEnsemble. Args: dt: The simulation timestep. @@ -384,7 +384,7 @@ class NPTEnsemble(NVTEnsemble): """ def __init__(self, dt, temp, pext, thermostat=None, barostat=None, fixcom=False): - """Initialises NPTEnsemble. + """Initializes NPTEnsemble. Args: dt: The simulation timestep. @@ -508,7 +508,7 @@ class ReplayEnsemble(Ensemble): """ def __init__(self, dt, temp, fixcom=False, intraj=None): - """Initialises ReplayEnsemble. + """Initializes ReplayEnsemble. Args: dt: The simulation timestep. diff --git a/tools/i-pi/ipi/engine/forces.py b/tools/i-pi/ipi/engine/forces.py index 58987f1e4d..5e3dabf8db 100644 --- a/tools/i-pi/ipi/engine/forces.py +++ b/tools/i-pi/ipi/engine/forces.py @@ -66,7 +66,7 @@ class ForceField(dobject): """ def __init__(self): - """Initialises ForceField.""" + """Initializes ForceField.""" # ufvx is a list [ u, f, vir, extra ] which stores the results of the force #calculation @@ -217,7 +217,7 @@ class FFSocket(ForceField): """ def __init__(self, pars=None, interface=None): - """Initialises FFSocket. + """Initializes FFSocket. Args: pars: Optional dictionary, giving the parameters needed by the driver. diff --git a/tools/i-pi/ipi/engine/initializer.py b/tools/i-pi/ipi/engine/initializer.py index de629c7f96..fd9bcfb9fa 100644 --- a/tools/i-pi/ipi/engine/initializer.py +++ b/tools/i-pi/ipi/engine/initializer.py @@ -493,7 +493,7 @@ class Initializer(dobject): rv *= np.sqrt(self.nbeads/nbeads) set_vector(v, simul.beads.p, rv) fmom = True - elif k == "thermostat": pass # thermostats must be initialised in a second stage + elif k == "thermostat": pass # thermostats must be initialized in a second stage if simul.beads.natoms == 0: raise ValueError("Initializer could not initialize the atomic positions") diff --git a/tools/i-pi/ipi/engine/outputs.py b/tools/i-pi/ipi/engine/outputs.py index 605d6a3b2d..7d6e7587b5 100644 --- a/tools/i-pi/ipi/engine/outputs.py +++ b/tools/i-pi/ipi/engine/outputs.py @@ -349,7 +349,7 @@ class CheckpointOutput(dobject): """Writes out the required trajectories. Used for both the checkpoint files and the soft-exit restart file. - We have slightly different behaviour for these two different types of + We have slightly different behavior for these two different types of checkpoint file, as the soft-exit files have their store() function called automatically, and we do not want this to be updated as the status of the simulation after a soft-exit call is unlikely to be in diff --git a/tools/i-pi/ipi/engine/properties.py b/tools/i-pi/ipi/engine/properties.py index e9c9646708..48b0c00ecc 100644 --- a/tools/i-pi/ipi/engine/properties.py +++ b/tools/i-pi/ipi/engine/properties.py @@ -212,7 +212,7 @@ class Properties(dobject): _DEFAULT_MINFID = 1e-12 def __init__(self): - """Initialises Properties.""" + """Initializes Properties.""" self.property_dict = { "step": { "dimension" : "number", @@ -1094,7 +1094,7 @@ class Trajectories(dobject): """ def __init__(self): - """Initialises a Trajectories object.""" + """Initializes a Trajectories object.""" self.traj_dict = { # Note that here we want to return COPIES of the different arrays, so we make sure to make an operation in order not to return a reference. diff --git a/tools/i-pi/ipi/engine/simulation.py b/tools/i-pi/ipi/engine/simulation.py index eba03cc036..b1483de576 100644 --- a/tools/i-pi/ipi/engine/simulation.py +++ b/tools/i-pi/ipi/engine/simulation.py @@ -20,7 +20,7 @@ along with this program. If not, see . The root class for the whole simulation. Contains references to all the top level objects used in the simulation, and controls all the steps that are not inherently system dependent, like the running of each time step, -choosing which properties to initialise, and which properties to output. +choosing which properties to initialize, and which properties to output. Classes: Simulation: Deals with running the simulation and outputting the results. @@ -81,7 +81,7 @@ class Simulation(dobject): """ def __init__(self, beads, cell, forces, ensemble, prng, outputs, nm, init, step=0, tsteps=1000, ttime=0): - """Initialises Simulation class. + """Initializes Simulation class. Args: beads: A beads object giving the atom positions. diff --git a/tools/i-pi/ipi/engine/thermostats.py b/tools/i-pi/ipi/engine/thermostats.py index 943deb47fd..7941f55916 100644 --- a/tools/i-pi/ipi/engine/thermostats.py +++ b/tools/i-pi/ipi/engine/thermostats.py @@ -31,11 +31,11 @@ Classes: the entire system. ThermoSVR: Holds the algorithms for a stochastic velocity rescaling thermostat. - ThermoGLE: Holds the algorithms for a generalised langevin equation + ThermoGLE: Holds the algorithms for a generalized langevin equation thermostat. - ThermoNMGLE: Holds the algorithms for a generalised langevin equation + ThermoNMGLE: Holds the algorithms for a generalized langevin equation thermostat in the normal mode representation. - ThermoNMGLEG: Holds the algorithms for a generalised langevin equation + ThermoNMGLEG: Holds the algorithms for a generalized langevin equation thermostat in the normal mode representation, with kinetic energy as well as potential energy sampling optimization. """ @@ -75,14 +75,14 @@ class Thermostat(dobject): """ def __init__(self, temp = 1.0, dt = 1.0, ethermo=0.0): - """Initialises Thermostat. + """Initializes Thermostat. Args: temp: The simulation temperature. Defaults to 1.0. dt: The simulation time step. Defaults to 1.0. ethermo: The initial heat energy transferred to the bath. Defaults to 0.0. Will be non-zero if the thermostat is - initialised from a checkpoint file. + initialized from a checkpoint file. """ dset(self,"temp", depend_value(name='temp', value=temp)) @@ -181,7 +181,7 @@ class ThermoLangevin(Thermostat): return np.sqrt(Constants.kb*self.temp*(1 - self.T**2)) def __init__(self, temp = 1.0, dt = 1.0, tau = 1.0, ethermo=0.0): - """Initialises ThermoLangevin. + """Initializes ThermoLangevin. Args: temp: The simulation temperature. Defaults to 1.0. @@ -189,7 +189,7 @@ class ThermoLangevin(Thermostat): tau: The thermostat damping timescale. Defaults to 1.0. ethermo: The initial heat energy transferred to the bath. Defaults to 0.0. Will be non-zero if the thermostat is - initialised from a checkpoint file. + initialized from a checkpoint file. """ super(ThermoLangevin,self).__init__(temp, dt, ethermo) @@ -241,14 +241,14 @@ class ThermoPILE_L(Thermostat): """ def __init__(self, temp = 1.0, dt = 1.0, tau = 1.0, ethermo=0.0, scale=1.0): - """Initialises ThermoPILE_L. + """Initializes ThermoPILE_L. Args: temp: The simulation temperature. Defaults to 1.0. dt: The simulation time step. Defaults to 1.0. tau: The centroid thermostat damping timescale. Defaults to 1.0. ethermo: The initial conserved energy quantity. Defaults to 0.0. Will - be non-zero if the thermostat is initialised from a checkpoint file. + be non-zero if the thermostat is initialized from a checkpoint file. scale: A float used to reduce the intensity of the PILE thermostat if required. @@ -404,14 +404,14 @@ class ThermoSVR(Thermostat): return Constants.kb*self.temp*0.5 def __init__(self, temp = 1.0, dt = 1.0, tau = 1.0, ethermo=0.0): - """Initialises ThermoSVR. + """Initializes ThermoSVR. Args: temp: The simulation temperature. Defaults to 1.0. dt: The simulation time step. Defaults to 1.0. tau: The thermostat damping timescale. Defaults to 1.0. ethermo: The initial conserved energy quantity. Defaults to 0.0. Will - be non-zero if the thermostat is initialised from a checkpoint file. + be non-zero if the thermostat is initialized from a checkpoint file. """ super(ThermoSVR,self).__init__(temp,dt,ethermo) @@ -459,14 +459,14 @@ class ThermoPILE_G(ThermoPILE_L): """ def __init__(self, temp = 1.0, dt = 1.0, tau = 1.0, ethermo=0.0, scale = 1.0): - """Initialises ThermoPILE_G. + """Initializes ThermoPILE_G. Args: temp: The simulation temperature. Defaults to 1.0. dt: The simulation time step. Defaults to 1.0. tau: The centroid thermostat damping timescale. Defaults to 1.0. ethermo: The initial conserved energy quantity. Defaults to 0.0. Will - be non-zero if the thermostat is initialised from a checkpoint file. + be non-zero if the thermostat is initialized from a checkpoint file. scale: A float used to reduce the intensity of the PILE thermostat if required. """ @@ -556,7 +556,7 @@ class ThermoGLE(Thermostat): return matrix_exp(-0.5*self.dt*self.A) def get_S(self): - """Calculates the matrix for the coloured noise.""" + """Calculates the matrix for the colored noise.""" SST = Constants.kb*(self.C - np.dot(self.T,np.dot(self.C,self.T.T))) @@ -570,7 +570,7 @@ class ThermoGLE(Thermostat): return rC[:] def __init__(self, temp = 1.0, dt = 1.0, A = None, C = None, ethermo=0.0): - """Initialises ThermoGLE. + """Initializes ThermoGLE. Args: temp: The simulation temperature. Defaults to 1.0. @@ -582,7 +582,7 @@ class ThermoGLE(Thermostat): total number of degrees of freedom in the system. ethermo: The initial heat energy transferred to the bath. Defaults to 0.0. Will be non-zero if the thermostat is - initialised from a checkpoint file. + initialized from a checkpoint file. """ super(ThermoGLE,self).__init__(temp,dt,ethermo) @@ -643,15 +643,15 @@ class ThermoGLE(Thermostat): # allocates, initializes or restarts an array of s's if self.s.shape != (self.ns + 1, len(dget(self,"m"))): if len(self.s) > 0: - warning("Mismatch in GLE s array size on restart, will reinitialise to free particle.", verbosity.low) + warning("Mismatch in GLE s array size on restart, will reinitialize to free particle.", verbosity.low) self.s = np.zeros((self.ns + 1, len(dget(self,"m")))) # Initializes the s vector in the free-particle limit - info(" GLE additional DOFs initialised to the free-particle limit.", verbosity.low) + info(" GLE additional DOFs initialized to the free-particle limit.", verbosity.low) SC = stab_cholesky(self.C*Constants.kb) self.s[:] = np.dot(SC, self.prng.gvec(self.s.shape)) else: - info("GLE additional DOFs initialised from input.", verbosity.medium) + info("GLE additional DOFs initialized from input.", verbosity.medium) def step(self): """Updates the bound momentum vector with a GLE thermostat""" @@ -699,7 +699,7 @@ class ThermoNMGLE(Thermostat): return rv[:] def __init__(self, temp = 1.0, dt = 1.0, A = None, C = None, ethermo=0.0): - """Initialises ThermoGLE. + """Initializes ThermoGLE. Args: temp: The simulation temperature. Defaults to 1.0. @@ -711,7 +711,7 @@ class ThermoNMGLE(Thermostat): total number of degrees of freedom in the system. ethermo: The initial heat energy transferred to the bath. Defaults to 0.0. Will be non-zero if the thermostat is - initialised from a checkpoint file. + initialized from a checkpoint file. """ super(ThermoNMGLE,self).__init__(temp,dt,ethermo) @@ -767,16 +767,16 @@ class ThermoNMGLE(Thermostat): # allocates, initializes or restarts an array of s's if self.s.shape != (self.nb, self.ns + 1, nm.natoms *3) : if len(self.s) > 0: - warning("Mismatch in GLE s array size on restart, will reinitialise to free particle.", verbosity.low) + warning("Mismatch in GLE s array size on restart, will reinitialize to free particle.", verbosity.low) self.s = np.zeros((self.nb, self.ns + 1, nm.natoms*3)) # Initializes the s vector in the free-particle limit - info(" GLE additional DOFs initialised to the free-particle limit.", verbosity.low) + info(" GLE additional DOFs initialized to the free-particle limit.", verbosity.low) for b in range(self.nb): SC = stab_cholesky(self.C[b]*Constants.kb) self.s[b] = np.dot(SC, self.prng.gvec(self.s[b].shape)) else: - info("GLE additional DOFs initialised from input.", verbosity.medium) + info("GLE additional DOFs initialized from input.", verbosity.medium) prev_ethermo = self.ethermo diff --git a/tools/i-pi/ipi/inputs/atoms.py b/tools/i-pi/ipi/inputs/atoms.py index 6068be1961..4ae16bfdf5 100644 --- a/tools/i-pi/ipi/inputs/atoms.py +++ b/tools/i-pi/ipi/inputs/atoms.py @@ -78,7 +78,7 @@ class InputAtoms(Input): """Takes an Atoms instance and stores a minimal representation of it. Args: - atoms: An Atoms object from which to initialise from. + atoms: An Atoms object from which to initialize from. filename: An optional string giving a filename to take the atom positions from. Defaults to ''. """ diff --git a/tools/i-pi/ipi/inputs/beads.py b/tools/i-pi/ipi/inputs/beads.py index f4caafcbb9..d889563d92 100644 --- a/tools/i-pi/ipi/inputs/beads.py +++ b/tools/i-pi/ipi/inputs/beads.py @@ -82,7 +82,7 @@ class InputBeads(Input): """Takes a Beads instance and stores a minimal representation of it. Args: - beads: A Beads object from which to initialise from. + beads: A Beads object from which to initialize from. """ super(InputBeads,self).store() diff --git a/tools/i-pi/ipi/inputs/prng.py b/tools/i-pi/ipi/inputs/prng.py index 58faaca5f0..e3464ca791 100644 --- a/tools/i-pi/ipi/inputs/prng.py +++ b/tools/i-pi/ipi/inputs/prng.py @@ -38,7 +38,7 @@ class InputRandom(Input): instance of the object. Attributes: - seed: An optional integer giving a seed to initialise the random number + seed: An optional integer giving a seed to initialize the random number generator from. Defaults to 123456. state: An optional array giving the state of the random number generator. Defaults to an empty array. @@ -74,7 +74,7 @@ class InputRandom(Input): representation of it. Args: - prng: A random number object from which to initialise from. + prng: A random number object from which to initialize from. """ super(InputRandom,self).store(prng) diff --git a/tools/i-pi/ipi/inputs/thermostats.py b/tools/i-pi/ipi/inputs/thermostats.py index cbe2deefcf..5c1ec2d65b 100644 --- a/tools/i-pi/ipi/inputs/thermostats.py +++ b/tools/i-pi/ipi/inputs/thermostats.py @@ -56,7 +56,7 @@ class InputThermo(Input): attribs = { "mode": (InputAttribute, { "dtype" : str, "options" : [ "", "langevin", "svr", "pile_l", "pile_g", "gle", "nm_gle", "nm_gle_g" ], - "help" : "The style of thermostatting. 'langevin' specifies a white noise langevin equation to be attached to the cartesian representation of the momenta. 'svr' attaches a velocity rescaling thermostat to the cartesian representation of the momenta. Both 'pile_l' and 'pile_g' attaches a white noise langevin thermostat to the normal mode representation, with 'pile_l' attaching a local langevin thermostat to the centroid mode and 'pile_g' instead attaching a global velocity rescaling thermostat. 'gle' attaches a coloured noise langevin thermostat to the cartesian representation of the momenta, 'nm_gle' attaches a coloured noise langevin thermostat to the normal mode representation of the momenta and a langevin thermostat to the centroid and 'nm_gle_g' attaches a gle thermostat to the normal modes and a svr thermostat to the centroid." + "help" : "The style of thermostatting. 'langevin' specifies a white noise langevin equation to be attached to the cartesian representation of the momenta. 'svr' attaches a velocity rescaling thermostat to the cartesian representation of the momenta. Both 'pile_l' and 'pile_g' attaches a white noise langevin thermostat to the normal mode representation, with 'pile_l' attaching a local langevin thermostat to the centroid mode and 'pile_g' instead attaching a global velocity rescaling thermostat. 'gle' attaches a colored noise langevin thermostat to the cartesian representation of the momenta, 'nm_gle' attaches a colored noise langevin thermostat to the normal mode representation of the momenta and a langevin thermostat to the centroid and 'nm_gle_g' attaches a gle thermostat to the normal modes and a svr thermostat to the centroid." }) } fields = { "ethermo" : (InputValue, { "dtype" : float, "default" : 0.0, diff --git a/tools/i-pi/ipi/interfaces/sockets.py b/tools/i-pi/ipi/interfaces/sockets.py index 2783d31e06..f946cf3149 100644 --- a/tools/i-pi/ipi/interfaces/sockets.py +++ b/tools/i-pi/ipi/interfaces/sockets.py @@ -108,7 +108,7 @@ class DriverSocket(socket.socket): """Deals with communication between the client and driver code. Deals with sending and receiving the data from the driver code. Keeps track - of the status of the driver. Initialises the driver forcefield, sends the + of the status of the driver. Initializes the driver forcefield, sends the position and cell data, and receives the force data. Attributes: @@ -119,7 +119,7 @@ class DriverSocket(socket.socket): """ def __init__(self, socket): - """Initialises DriverSocket. + """Initializes DriverSocket. Args: socket: A socket through which the communication should be done. @@ -378,7 +378,7 @@ class InterfaceSocket(object): """ def __init__(self, address="localhost", port=31415, slots=4, mode="unix", latency=1e-3, timeout=1.0, dopbc=True): - """Initialises interface. + """Initializes interface. Args: address: An optional string giving the name of the host server. @@ -556,7 +556,7 @@ class InterfaceSocket(object): Deals with maintaining the jobs list. Gets data from drivers that have finished their calculation and removes that job from the list of running - jobs, adds jobs to free clients and initialises the forcefields of new + jobs, adds jobs to free clients and initializes the forcefields of new clients. """ diff --git a/tools/i-pi/ipi/utils/depend.py b/tools/i-pi/ipi/utils/depend.py index 6c7f4ce24d..a4da91b47b 100644 --- a/tools/i-pi/ipi/utils/depend.py +++ b/tools/i-pi/ipi/utils/depend.py @@ -73,7 +73,7 @@ class synchronizer(object): """ def __init__(self, deps=None): - """Initialises synchronizer. + """Initializes synchronizer. Args: deps: Optional dictionary giving the synched objects of the form @@ -113,7 +113,7 @@ class depend_base(object): """ def __init__(self, name, synchro=None, func=None, dependants=None, dependencies=None, tainted=None): - """Initialises depend_base. + """Initializes depend_base. An unusual initialization routine, as it has to be able to deal with the depend array mechanism for returning slices as new depend arrays. @@ -291,7 +291,7 @@ class depend_value(depend_base): """ def __init__(self, name, value=None, synchro=None, func=None, dependants=None, dependencies=None, tainted=None): - """Initialises depend_value. + """Initializes depend_value. Args: name: A string giving the name of self. @@ -375,7 +375,7 @@ class depend_array(np.ndarray, depend_base): return obj def __init__(self, value, name, synchro=None, func=None, dependants=None, dependencies=None, tainted=None, base=None): - """Initialises depend_array. + """Initializes depend_array. Note that this is only called when a new array is created by an explicit constructor. diff --git a/tools/i-pi/ipi/utils/inputvalue.py b/tools/i-pi/ipi/utils/inputvalue.py index aae989a3c9..35b2945910 100644 --- a/tools/i-pi/ipi/utils/inputvalue.py +++ b/tools/i-pi/ipi/utils/inputvalue.py @@ -22,7 +22,7 @@ attributes dictionary, which are filled with the tags and attributes that are allowed to be present, along with their default values and data type. These are then filled with the data from the xml file when the program -is initialised, and are filled by the values calculated in the program which +is initialized, and are filled by the values calculated in the program which are then output to the checkpoint file when a restart file is required. Also deals with checking for user input errors, of the form of misspelt tags, @@ -65,14 +65,14 @@ class input_default(object): """ def __init__(self, factory, args = None, kwargs = None): - """Initialises input_default. + """Initializes input_default. Args: type: The class or function to be used to create the default object. - args: A tuple giving the arguments to be used to initialise + args: A tuple giving the arguments to be used to initialize the default value. kwargs: A dictionary giving the key word arguments to be used - to initialise the default value. + to initialize the default value. """ if args is None: @@ -147,10 +147,10 @@ class Input(object): #hyperlinks def __init__(self, help=None, default=None): - """Initialises Input. + """Initializes Input. Automatically adds all the fields and attribs names to the input object's - dictionary, then initialises all the appropriate input objects + dictionary, then initializes all the appropriate input objects as the corresponding values. Args: @@ -676,7 +676,7 @@ class InputAttribute(Input): """ def __init__(self, help=None, default=None, dtype=None, options=None): - """Initialises InputAttribute. + """Initializes InputAttribute. Args: help: A help string. @@ -773,7 +773,7 @@ class InputValue(InputAttribute): attribs= { "units" : ( InputAttribute, { "dtype" : str, "help" : "The units the input data is given in.", "default" : default_units } ) } def __init__(self, help=None, default=None, dtype=None, options=None, dimension=None): - """Initialises InputValue. + """Initializes InputValue. Args: help: A help string. @@ -874,7 +874,7 @@ class InputArray(InputValue): attribs["shape"] = (InputAttribute, {"dtype": tuple, "help": "The shape of the array.", "default": (0,)}) def __init__(self, help=None, default=None, dtype=None, dimension=None): - """Initialises InputArray. + """Initializes InputArray. Args: help: A help string. diff --git a/tools/i-pi/ipi/utils/io/io_xml.py b/tools/i-pi/ipi/utils/io/io_xml.py index fbf8867aaf..961a398848 100644 --- a/tools/i-pi/ipi/utils/io/io_xml.py +++ b/tools/i-pi/ipi/utils/io/io_xml.py @@ -63,7 +63,7 @@ class xml_node(object): """ def __init__(self, attribs=None, name="", fields=None): - """Initialises xml_node. + """Initializes xml_node. Args: attribs: An optional dictionary giving attribute data. Defaults to {}. @@ -101,7 +101,7 @@ class xml_handler(ContentHandler): """ def __init__(self): - """Initialises xml_handler.""" + """Initializes xml_handler.""" #root xml node with all the data self.root = xml_node(name="root", fields=[]) diff --git a/tools/i-pi/ipi/utils/prng.py b/tools/i-pi/ipi/utils/prng.py index c6626828a9..b6d9e6d21d 100644 --- a/tools/i-pi/ipi/utils/prng.py +++ b/tools/i-pi/ipi/utils/prng.py @@ -34,7 +34,7 @@ import math class Random(object): """Class to interface with the standard pseudo-random number generator. - Initialises the standard numpy pseudo-random number generator from a seed + Initializes the standard numpy pseudo-random number generator from a seed at the beginning of the simulation, and keeps track of the state so that it can be output to the checkpoint files throughout the simulation. @@ -51,11 +51,11 @@ class Random(object): """ def __init__(self, seed=12345, state=None): - """Initialises Random. + """Initializes Random. Args: - seed: An optional seed giving an integer to initialise the state with. - state: An optional state tuple to initialise the state with. + seed: An optional seed giving an integer to initialize the state with. + state: An optional state tuple to initialize the state with. """ self.rng = np.random.mtrand.RandomState(seed=seed) diff --git a/tools/polybond/lmpsdata.py b/tools/polybond/lmpsdata.py index 49e0d32544..52bc749ca6 100644 --- a/tools/polybond/lmpsdata.py +++ b/tools/polybond/lmpsdata.py @@ -881,7 +881,7 @@ class Lmpsdata: class booleanarray: """A class that stores boolean values in a list of lists.""" def __init__(self,rownum, colnum, initval): - """ initialise a list of lists (array) with + """ initialize a list of lists (array) with rownum correspondinig to the number of lists in the list and colnum corresponding to the number of elements in the list's list. initval is the value the list of lists will be initialized with. diff --git a/tools/replica/reorder_remd_traj.py b/tools/replica/reorder_remd_traj.py index 01a179351d..5033ae1e53 100644 --- a/tools/replica/reorder_remd_traj.py +++ b/tools/replica/reorder_remd_traj.py @@ -53,7 +53,7 @@ except ImportError: -#### INITIALISE MPI #### +#### INITIALIZE MPI #### # (note that all output on screen will be printed only on the ROOT proc) ROOT = 0 comm = MPI.COMM_WORLD