Skip to content

Commit

Permalink
Fix spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jul 19, 2023
1 parent 3539fba commit 723d96e
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions examples/analysis/clustering_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"metadata": {},
"source": [
"This tutorial describes how to run a cluster analysis, when the calculation was run with a ReplicaExchange protocol.\n",
"The clustering algorithm will create cluster.$index directories, therefore you may want to remove these directories everytime you rerun the calculation. The matrix calculation is very time consuming. The matrix can be saved in a file, in case you want to apply different clustering methods. In additio, one can run the calculation in parallel (you need the mpi4py python library installed).\n",
"The clustering algorithm will create cluster.$index directories, therefore you may want to remove these directories every time you rerun the calculation. The matrix calculation is very time consuming. The matrix can be saved in a file, in case you want to apply different clustering methods. In additio, one can run the calculation in parallel (you need the mpi4py python library installed).\n",
"\n",
"Paste the python code below in a file, and run it. (eg, imp/setup_environment.sh mpirun -np 8 python this_script.py)"
]
Expand Down Expand Up @@ -142,4 +142,4 @@
"metadata": {}
}
]
}
}
4 changes: 2 additions & 2 deletions examples/analysis/sampling exhaustiveness analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"source": [
"Last, setup the clustering. \n",
"\n",
"`skip_clustering=True` it will actually not perform the clustering at all, but it will exctract the best scoring models\n",
"`skip_clustering=True` it will actually not perform the clustering at all, but it will extract the best scoring models\n",
"\n",
"`prefiltervalue=300` this value indicates the upper-bound score value. It is needed for memory efficiency.\n",
"\n",
Expand Down Expand Up @@ -129,4 +129,4 @@
"metadata": {}
}
]
}
}
4 changes: 2 additions & 2 deletions examples/cross-link/cross-link_ms-ambiguity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"# Compositional ambiguity occurs when identical copies of the same protein is present \n",
"# in the sample, and we are not able to attribute the cross-link to one or the other copy.\n",
"\n",
"# Furthermore, let's suppose to have already an indentification ambiguity, to complicate the example\n",
"# Furthermore, let's suppose to have already an identification ambiguity, to complicate the example\n",
"# and see how the two ambiguities combine each other. See the data below, note that two crosslinks have the same \n",
"# UniqueID\n",
"\n",
Expand Down Expand Up @@ -412,4 +412,4 @@
"metadata": {}
}
]
}
}
6 changes: 3 additions & 3 deletions pyext/src/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def matrix_calculation(self, all_coords, template_coords, list_of_pairs):
template_rmsd, transformation = Ali.align()

# here we calculate the rmsd
# we will align two models based n the nuber of subunits provided
# we will align two models based on the number of subunits provided
# and transform coordinates of model 2 to model 1
coords_f1 = dict([(pr, all_coords[model_list_names[f1]][pr])
for pr in rmsd_protein_names])
Expand Down Expand Up @@ -1308,11 +1308,11 @@ def get_subunit_coords(self, frame, align=0):

def add_xlinks(
self,
filname,
filename,
identification_string='ISDCrossLinkMS_Distance_'):
# 'ISDCrossLinkMS_Distance_interrb_6629-State:0-20:RPS30_218:eIF3j-1-1-0.1_None'
self.xlinks = 1
data = open(filname)
data = open(filename)
D = data.readlines()
data.close()

Expand Down
2 changes: 1 addition & 1 deletion pyext/src/io/crosslink.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ def __init__(self,CrossLinkDataBase,rmf_or_stat_handler):
self.array_to_id={}
self.id_to_array={}

print("computing distances fro all crosslinks and all structures")
print("computing distances for all crosslinks and all structures")
for i in self.prots[::10]:
self.compute_distances()
for key,xl in enumerate(self.CrossLinkDataBase):
Expand Down
10 changes: 5 additions & 5 deletions pyext/src/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ def clustering(self,
rmsd_coordinates)

if self.rank == 0:
# save needed informations in external files
# save needed information in external files
self.save_objects(
[best_score_feature_keyword_list_dict,
rmf_file_name_index_dict],
Expand Down Expand Up @@ -1745,7 +1745,7 @@ def clustering(self,
self.cluster_obj.save_distance_matrix_file(file_name=distance_matrix_file)

# ------------------------------------------------------------------------
# Alteratively, load the distance matrix from file and cluster that
# Alternatively, load the distance matrix from file and cluster that
# ------------------------------------------------------------------------
else:
if self.rank==0:
Expand All @@ -1765,7 +1765,7 @@ def clustering(self,
self.comm.Barrier()

# ------------------------------------------------------------------------
# now save all informations about the clusters
# now save all information about the clusters
# ------------------------------------------------------------------------

if self.rank == 0:
Expand Down Expand Up @@ -2789,7 +2789,7 @@ def rmsd(self,metric=IMP.atom.get_rmsd):

def set_reference(self,reference,cluster):
"""
Fix the reference structure for structural alignment, rmsd and chain assignemnt
Fix the reference structure for structural alignment, rmsd and chain assignment
@param reference can be either "Absolute" (cluster center of the first cluster)
or Relative (cluster center of the current cluster)
"""
Expand All @@ -2804,7 +2804,7 @@ def set_reference(self,reference,cluster):

def apply_molecular_assignments(self, n1):
"""
compute the molecular assignemnts between multiple copies
compute the molecular assignments between multiple copies
of the same sequence. It changes the Copy index of Molecules
"""
d1=self.stath1[n1]
Expand Down
20 changes: 10 additions & 10 deletions pyext/src/nonmantained.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def destroy_residues(self, segments):
segment[1] + 1)))
for p in s.get_selected_particles():
if IMP.core.RigidMember.get_is_setup(p):
print("MultipleStates: one particle was not destroied because it was a RigidMember.")
print("MultipleStates: one particle was not destroyed because it was a RigidMember.")
else:
# destroy the residue and the associated atom
a = IMP.atom.Atom(p)
Expand Down Expand Up @@ -354,7 +354,7 @@ def destroy_everything_but_the_residues(self, segments):
for p in IMP.atom.get_leaves(prot):
if p not in pstokeep:
if IMP.core.RigidMember.get_is_setup(p):
print("MultipleStates: one particle was not destroied because it was a RigidMember.")
print("MultipleStates: one particle was not destroyed because it was a RigidMember.")
else:
# destroy the residue and the associated atom
a = IMP.atom.Atom(p).get_parent()
Expand Down Expand Up @@ -584,7 +584,7 @@ def read_pdbs(self, list_pdb_file):
if the pdbs are given a individual strings, it will read the
pdbs and give the chain name as specified in the pdb
If it s a tuple like (filename,chainname) it will read
the pdb and assing a name chainname
the pdb and assign a name chainname
to the chain"""

# create an empty hierarchy
Expand Down Expand Up @@ -673,7 +673,7 @@ def shuffle_configuration(self, bounding_box_length):
"shuffle configuration, used to restart the optimization"
"it only works if rigid bodies were initialized"
if len(self.rigid_bodies) == 0:
print("MultipleStates: rigid bodies were not intialized")
print("MultipleStates: rigid bodies were not initialized")
hbbl = bounding_box_length / 2
for rbl in self.rigid_bodies:
for rb in rbl:
Expand Down Expand Up @@ -708,10 +708,10 @@ def calculate_drms(self):
# calculate DRMSD matrix

if len(self.xyzmodellist) == 0:
print("MultipleStates: hierarchies were not intialized")
print("MultipleStates: hierarchies were not initialized")

if len(self.xyzreflist) == 0:
print("MultipleStates: reference hierarchies were not intialized")
print("MultipleStates: reference hierarchies were not initialized")

drmsd = {}
for i in range(len(self.xyzreflist)):
Expand Down Expand Up @@ -1233,7 +1233,7 @@ def __init__(self, prots,
# this map is used in the new cross-link file reader
#{"Nsp1":"A","Nup82":"B"} etc.
self.mbpnc = map_between_protein_names_and_chains
# check whther the file was initialized
# check whether the file was initialized

#-------------------------------
def get_crosslinker_dict(self, typeofprofile="gofr"):
Expand Down Expand Up @@ -1930,7 +1930,7 @@ def __init__(self, m, prots,
# this map is used in the new cross-link file reader
#{"Nsp1":"A","Nup82":"B"} etc.
self.mbpnc = map_between_protein_names_and_chains
# check whther the file was initialized
# check whether the file was initialized

def create_psi(self, index, value):
if value is None:
Expand Down Expand Up @@ -2407,7 +2407,7 @@ def __init__(self, prot, restraints_file, TruncatedHarmonic=True):

# part1=[]
# part2=[]
# this list contain the list of simmetric pairs to avoid
# this list contain the list of symmetric pairs to avoid
# duplications

# this is the map between particle pairs and the restraints (there
Expand All @@ -2422,7 +2422,7 @@ def __init__(self, prot, restraints_file, TruncatedHarmonic=True):
print("WARNING> residue %d of chain %s and residue %d of chain %s belong to the same rigid body" % (r1, c1, r2, c2))
continue

# this list contain the list of simmetric pairs to avoid
# this list contain the list of symmetric pairs to avoid
# duplications
if (p1, p2, crosslinker) in addedd_pairs_list:
print("WARNING> pair %d %s %d %s already there" % (r1, c1, r2, c2))
Expand Down
2 changes: 1 addition & 1 deletion pyext/src/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def init_rmf(self, name, hierarchies, rs=None, geometries=None, listofobjects=No
This function initialize an RMF file
@param name the name of the RMF file
@param hierarchies the hiearchies to be included (it is a list)
@param hierarchies the hierarchies to be included (it is a list)
@param rs optional, the restraint sets (it is a list)
@param geometries optional, the geometries (it is a list)
@param listofobjects optional, the list of objects for the stat (it is a list)
Expand Down
6 changes: 3 additions & 3 deletions pyext/src/process_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
# print the queried fields
if not result.fields is None:
field_list = []
# check whether the fields exist and convert them to best maching existing
# check whether the fields exist and convert them to best matching existing
# field names
for field in result.fields:
found_entries = difflib.get_close_matches(
Expand Down Expand Up @@ -168,7 +168,7 @@
f.close()

if (not result.search_field is None) and (not result.search_value is None):
# check whether the fields exist and convert them to best maching existing
# check whether the fields exist and convert them to best matching existing
# field names
found_entries = difflib.get_close_matches(
result.search_field,
Expand Down Expand Up @@ -203,7 +203,7 @@
f.close()

if not result.print_raw_number is None:
# check whether the fields exist and convert them to best maching existing
# check whether the fields exist and convert them to best matching existing
# field names
f = open(result.filename, "r")
line_number = 0
Expand Down
2 changes: 1 addition & 1 deletion pyext/src/process_output_rmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# print the queried fields
if not result.fields is None:
field_list = []
# check whether the fields exist and convert them to best maching existing
# check whether the fields exist and convert them to best matching existing
# field names
for field in result.fields:
found_entries = difflib.get_close_matches(
Expand Down
4 changes: 2 additions & 2 deletions pyext/src/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, model, upperharmonic=True, disorderedlength=True):
self._non_modeled_components = {}

# this flag uses either harmonic (False) or upperharmonic (True)
# in the intra-pair connectivity restraint. Harmonic is used whe you want to
# in the intra-pair connectivity restraint. Harmonic is used when you want to
# remove the intra-ev term from energy calculations, e.g.:
# upperharmonic=False
# ip=self.get_connected_intra_pairs()
Expand Down Expand Up @@ -1428,7 +1428,7 @@ def shuffle_configuration(
hierarchies_excluded_from_collision = []

if len(self.rigid_bodies) == 0:
print("shuffle_configuration: rigid bodies were not intialized")
print("shuffle_configuration: rigid bodies were not initialized")

gcpf = IMP.core.GridClosePairsFinder()
gcpf.set_distance(cutoff)
Expand Down
2 changes: 1 addition & 1 deletion pyext/src/restraints/npc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
the xy plane and centered at the origin. Individual proteins
(or parts of proteins, such as the N- or C- termini) are then localized to
different regions of the complex (e.g. near the membrane or pore, or on
the nuclear or cytoplasmic side) by simple restraints on ther Cartesian
the nuclear or cytoplasmic side) by simple restraints on their Cartesian
coordinates.
"""

Expand Down
4 changes: 2 additions & 2 deletions pyext/src/restraints/saxs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, input_objects, saxs_datafile, weight=1.0,
@param label Label for the restraint in outputs
@param maxq - maximum q value that the restraint will be evaluated at
Default vaules for ff_type = ALL_ATOMS : 0.5. HEAVY_ATOMS : 0.4,
Default values for ff_type = ALL_ATOMS : 0.5. HEAVY_ATOMS : 0.4,
CA_ATOMS and RESIDUES = 0.15. These values were eyeballed
by comparing ALL_ATOM calculated SAXS profiles to those calculated
with the reduced representations, so could be improved.
Expand Down Expand Up @@ -251,7 +251,7 @@ def get_output(self):

@staticmethod
def _logspace(a, b, num=100):
"""Mimick numpy's logspace function"""
"""Mimic numpy's logspace function"""
for i in range(num):
val = a + float(b - a) / float(num - 1) * i
yield 10 ** val
6 changes: 3 additions & 3 deletions pyext/src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1648,12 +1648,12 @@ def input_adaptor(stuff,
else:
stuff = [stuff]

# check that it is a hierarchy homogenously:
# check that it is a hierarchy homogeneously:
try:
is_hierarchy=all(IMP.atom.Hierarchy.get_is_setup(s) for s in stuff)
except NotImplementedError:
is_hierarchy=False
# get the other types homogenously
# get the other types homogeneously
is_system=False
is_state=False
is_molecule=False
Expand Down Expand Up @@ -2016,7 +2016,7 @@ def shuffle_configuration(objects,
else:
raise Exception("Could not find any particles in the hierarchy")
if len(rigid_bodies) == 0:
print("shuffle_configuration: rigid bodies were not intialized")
print("shuffle_configuration: rigid bodies were not initialized")

### gather all particles
gcpf = IMP.core.GridClosePairsFinder()
Expand Down
2 changes: 1 addition & 1 deletion pyext/src/topology/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def read_sequences(self,fasta_fn,name_map=None):


class TopologyReader(object):
"""Automatically setup Sytem and Degrees of Freedom with a formatted text file.
"""Automatically setup System and Degrees of Freedom with a formatted text file.
The file is read in and each part of the topology is stored as a
ComponentTopology object for input into IMP::pmi1::macros::BuildSystem.
The topology file should be in a simple pipe-delimited format:
Expand Down
2 changes: 1 addition & 1 deletion test/test_stopwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def mocked_object(parent, objname, replacement):

def get_times(outkey, *args, **kwargs):
"""Get a sequence of times by calling Stopwatch repeatedly. Ensure that
times are reliable by overridding time.clock() to always return whole
times are reliable by overriding time.clock() to always return whole
seconds."""
class MockClock(object):
count = 0
Expand Down

0 comments on commit 723d96e

Please sign in to comment.