Skip to content

Commit 1cf05e0

Browse files
committed
delete doc str empty :return:
1 parent c4296e4 commit 1cf05e0

26 files changed

+46
-126
lines changed

pymatgen/analysis/bond_dissociation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def fragment_and_process(self, bonds):
115115
Fragment and process bonds.
116116
117117
:param bonds: Bonds to process.
118-
:return:
119118
"""
120119
# Try to split the principle:
121120
try:
@@ -269,7 +268,6 @@ def filter_fragment_entries(self, fragment_entries):
269268
Filter the fragment entries.
270269
271270
:param fragment_entries:
272-
:return:
273271
"""
274272
self.filtered_entries = []
275273
for entry in fragment_entries:
@@ -331,7 +329,6 @@ def build_new_entry(self, frags, bonds):
331329
332330
:param frags:
333331
:param bonds:
334-
:return:
335332
"""
336333
specie = nx.get_node_attributes(self.mol_graph.graph, "specie")
337334
if len(frags) == 2:

pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ def __eq__(self, other: object) -> bool:
440440
"""
441441
Equality method that should be implemented for any strategy
442442
:param other: strategy to be compared with the current one
443-
:return:
444443
"""
445444
raise NotImplementedError
446445

@@ -1343,7 +1342,6 @@ def from_dict(cls, dd):
13431342
"""
13441343
From dict
13451344
:param dd:
1346-
:return:
13471345
"""
13481346
return cls(aa=dd["aa"])
13491347

@@ -1903,7 +1901,6 @@ def delta_cn_specifics(
19031901
def as_dict(self):
19041902
"""
19051903
MSONable dict.
1906-
:return:
19071904
"""
19081905
return {
19091906
"@module": type(self).__module__,
@@ -2206,7 +2203,6 @@ def rectangle_crosses_area(self, d1, d2, a1, a2):
22062203
:param d2: upper d.
22072204
:param a1: lower a.
22082205
:param a2: upper a.
2209-
:return:
22102206
"""
22112207
# Case 1
22122208
if d1 <= self.dmin and d2 <= self.dmin:

pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def from_cg(cls, cg, centering_type="standard", include_central_site_in_centroid
192192
:param cg:
193193
:param centering_type:
194194
:param include_central_site_in_centroid:
195-
:return:
196195
"""
197196
central_site = cg.get_central_site()
198197
bare_coords = [np.array(pt, np.float_) for pt in cg.points]
@@ -206,7 +205,6 @@ def from_cg(cls, cg, centering_type="standard", include_central_site_in_centroid
206205
def points_wcs_csc(self, permutation=None):
207206
"""
208207
:param permutation:
209-
:return:
210208
"""
211209
if permutation is None:
212210
return self._points_wcs_csc
@@ -215,7 +213,6 @@ def points_wcs_csc(self, permutation=None):
215213
def points_wocs_csc(self, permutation=None):
216214
"""
217215
:param permutation:
218-
:return:
219216
"""
220217
if permutation is None:
221218
return self._points_wocs_csc
@@ -224,7 +221,6 @@ def points_wocs_csc(self, permutation=None):
224221
def points_wcs_ctwcc(self, permutation=None):
225222
"""
226223
:param permutation:
227-
:return:
228224
"""
229225
if permutation is None:
230226
return self._points_wcs_ctwcc
@@ -238,7 +234,6 @@ def points_wcs_ctwcc(self, permutation=None):
238234
def points_wocs_ctwcc(self, permutation=None):
239235
"""
240236
:param permutation:
241-
:return:
242237
"""
243238
if permutation is None:
244239
return self._points_wocs_ctwcc
@@ -247,7 +242,6 @@ def points_wocs_ctwcc(self, permutation=None):
247242
def points_wcs_ctwocc(self, permutation=None):
248243
"""
249244
:param permutation:
250-
:return:
251245
"""
252246
if permutation is None:
253247
return self._points_wcs_ctwocc
@@ -261,7 +255,6 @@ def points_wcs_ctwocc(self, permutation=None):
261255
def points_wocs_ctwocc(self, permutation=None):
262256
"""
263257
:param permutation:
264-
:return:
265258
"""
266259
if permutation is None:
267260
return self._points_wocs_ctwocc
@@ -508,7 +501,6 @@ def compute_coordination_environments(
508501
:param strategy:
509502
:param valences:
510503
:param initial_structure_environments:
511-
:return:
512504
"""
513505
self.setup_structure(structure=structure)
514506
if valences == "bond-valence-analysis":
@@ -867,7 +859,6 @@ def update_nb_set_environments(self, se, isite, cn, inb_set, nb_set, recompute=F
867859
:param nb_set:
868860
:param recompute:
869861
:param optimization:
870-
:return:
871862
"""
872863
ce = se.get_coordination_environments(isite=isite, cn=cn, nb_set=nb_set)
873864
if ce is not None and not recompute:
@@ -961,7 +952,6 @@ def setup_test_perfect_environment(
961952
:param random_rotation:
962953
:param random_scale:
963954
:param points:
964-
:return:
965955
"""
966956
if symbol_type == "IUPAC":
967957
cg = self.allcg.get_geometry_from_IUPAC_symbol(symbol)

pymatgen/analysis/chemenv/utils/chemenv_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def setup(self):
8686
def has_materials_project_access(self):
8787
"""
8888
Whether MP access is enabled.
89-
:return:
9089
"""
9190
return self.materials_project_configuration is not None
9291

pymatgen/analysis/chemenv/utils/defs_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def check_condition(self, condition, structure: Structure, parameters):
7373
:param condition:
7474
:param structure:
7575
:param parameters:
76-
:return:
7776
"""
7877
if condition == self.NONE:
7978
return True

pymatgen/analysis/chemenv/utils/graph_utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def get_delta(node1, node2, edge_data):
1818
:param node1:
1919
:param node2:
2020
:param edge_data:
21-
:return:
2221
"""
2322
if node1.isite == edge_data["start"] and node2.isite == edge_data["end"]:
2423
return np.array(edge_data["delta"], dtype=int)
@@ -35,7 +34,6 @@ def get_all_simple_paths_edges(graph, source, target, cutoff=None, data=True):
3534
:param target:
3635
:param cutoff:
3736
:param data:
38-
:return:
3937
"""
4038
edge_paths = []
4139
if not graph.is_multigraph():
@@ -187,7 +185,6 @@ def _is_valid(self, check_strict_ordering=False):
187185
def validate(self, check_strict_ordering=False):
188186
"""
189187
:param check_strict_ordering:
190-
:return:
191188
"""
192189
is_valid, msg = self._is_valid(check_strict_ordering=check_strict_ordering)
193190
if not is_valid:
@@ -301,7 +298,6 @@ def from_dict(cls, d, validate=False):
301298
Serialize from dict.
302299
:param d:
303300
:param validate:
304-
:return:
305301
"""
306302
return cls(nodes=d["nodes"], validate=validate, ordered=d["ordered"])
307303

@@ -377,7 +373,6 @@ def _is_valid(self, check_strict_ordering=False):
377373
def validate(self, check_strict_ordering=False):
378374
"""
379375
:param check_strict_ordering:
380-
:return:
381376
"""
382377
is_valid, msg = self._is_valid(check_strict_ordering=check_strict_ordering)
383378
if not is_valid:
@@ -468,7 +463,6 @@ def __eq__(self, other: object) -> bool:
468463
def get_all_elementary_cycles(graph):
469464
"""
470465
:param graph:
471-
:return:
472466
"""
473467
if not isinstance(graph, nx.Graph):
474468
raise TypeError("graph should be a networkx Graph object.")

pymatgen/analysis/chemenv/utils/math_utils.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def _factor_generator(n):
6060
"""
6161
From a given natural integer, returns the prime factors and their multiplicity
6262
:param n: Natural integer
63-
:return:
6463
"""
6564
p = prime_factors(n)
6665
factors = {}
@@ -95,7 +94,6 @@ def get_center_of_arc(p1, p2, radius):
9594
:param p1:
9695
:param p2:
9796
:param radius:
98-
:return:
9997
"""
10098
dx = p2[0] - p1[0]
10199
dy = p2[1] - p1[1]
@@ -112,7 +110,6 @@ def get_center_of_arc(p1, p2, radius):
112110
def get_linearly_independent_vectors(vectors_list):
113111
"""
114112
:param vectors_list:
115-
:return:
116113
"""
117114
independent_vectors_list = []
118115
for vector in vectors_list:
@@ -139,7 +136,6 @@ def scale_and_clamp(xx, edge0, edge1, clamp0, clamp1):
139136
:param edge1:
140137
:param clamp0:
141138
:param clamp1:
142-
:return:
143139
"""
144140
return np.clip((xx - edge0) / (edge1 - edge0), clamp0, clamp1)
145141

@@ -150,7 +146,6 @@ def normal_cdf_step(xx, mean, scale):
150146
:param xx:
151147
:param mean:
152148
:param scale:
153-
:return:
154149
"""
155150
return 0.5 * (1.0 + erf((xx - mean) / (np.sqrt(2.0) * scale)))
156151

@@ -167,7 +162,6 @@ def smoothstep(xx, edges=None, inverse=False):
167162
:param xx:
168163
:param edges:
169164
:param inverse:
170-
:return:
171165
"""
172166
if edges is None:
173167
xx_clipped = np.clip(xx, 0.0, 1.0)
@@ -183,7 +177,6 @@ def smootherstep(xx, edges=None, inverse=False):
183177
:param xx:
184178
:param edges:
185179
:param inverse:
186-
:return:
187180
"""
188181
if edges is None:
189182
xx_clipped = np.clip(xx, 0.0, 1.0)
@@ -199,7 +192,6 @@ def cosinus_step(xx, edges=None, inverse=False):
199192
:param xx:
200193
:param edges:
201194
:param inverse:
202-
:return:
203195
"""
204196
if edges is None:
205197
xx_clipped = np.clip(xx, 0.0, 1.0)
@@ -215,7 +207,6 @@ def power3_step(xx, edges=None, inverse=False):
215207
:param xx:
216208
:param edges:
217209
:param inverse:
218-
:return:
219210
"""
220211
return smoothstep(xx, edges=edges, inverse=inverse)
221212

@@ -226,7 +217,6 @@ def powern_parts_step(xx, edges=None, inverse=False, nn=2):
226217
:param edges:
227218
:param inverse:
228219
:param nn:
229-
:return:
230220
"""
231221
if edges is None:
232222
aa = np.power(0.5, 1.0 - nn)
@@ -268,7 +258,6 @@ def powern_decreasing(xx, edges=None, nn=2):
268258
:param xx:
269259
:param edges:
270260
:param nn:
271-
:return:
272261
"""
273262
if edges is None:
274263
aa = 1.0 / np.power(-1.0, nn)
@@ -282,7 +271,6 @@ def power2_decreasing_exp(xx, edges=None, alpha=1.0):
282271
:param xx:
283272
:param edges:
284273
:param alpha:
285-
:return:
286274
"""
287275
if edges is None:
288276
aa = 1.0 / np.power(-1.0, 2)
@@ -301,7 +289,6 @@ def power2_tangent_decreasing(xx, edges=None, prefactor=None):
301289
:param xx:
302290
:param edges:
303291
:param prefactor:
304-
:return:
305292
"""
306293
if edges is None:
307294
aa = 1.0 / np.power(-1.0, 2) if prefactor is None else prefactor
@@ -316,7 +303,6 @@ def power2_inverse_decreasing(xx, edges=None, prefactor=None):
316303
:param xx:
317304
:param edges:
318305
:param prefactor:
319-
:return:
320306
"""
321307
if edges is None:
322308
aa = 1.0 / np.power(-1.0, 2) if prefactor is None else prefactor
@@ -331,7 +317,6 @@ def power2_inverse_power2_decreasing(xx, edges=None, prefactor=None):
331317
:param xx:
332318
:param edges:
333319
:param prefactor:
334-
:return:
335320
"""
336321
if edges is None:
337322
aa = 1.0 / np.power(-1.0, 2) if prefactor is None else prefactor
@@ -350,7 +335,6 @@ def power2_inverse_powern_decreasing(xx, edges=None, prefactor=None, powern=2.0)
350335
:param edges:
351336
:param prefactor:
352337
:param powern:
353-
:return:
354338
"""
355339
if edges is None:
356340
aa = 1.0 / np.power(-1.0, 2) if prefactor is None else prefactor

pymatgen/analysis/chemenv/utils/scripts_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def draw_cg(
7575
:param perfect_radius:
7676
:param show_distorted:
7777
:param faces_color_override:
78-
:return:
7978
"""
8079
if show_perfect:
8180
if csm_info is None:
@@ -160,7 +159,6 @@ def visualize(cg, zoom=None, vis=None, myfactor=1.0, view_index=True, faces_colo
160159
:param myfactor:
161160
:param view_index:
162161
:param faces_color_override:
163-
:return:
164162
"""
165163
if vis is None:
166164
vis = StructureVis(show_polyhedron=False, show_unit_cell=False)
@@ -194,7 +192,6 @@ def compute_environments(chemenv_configuration):
194192
Compute the environments.
195193
196194
:param chemenv_configuration:
197-
:return:
198195
"""
199196
string_sources = {
200197
"cif": {"string": "a Cif file", "regexp": r".*\.cif$"},

0 commit comments

Comments
 (0)