biotite 1.1.0__cp313-cp313-win_amd64.whl → 1.3.0__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of biotite might be problematic. Click here for more details.

Files changed (160) hide show
  1. biotite/application/application.py +3 -3
  2. biotite/application/autodock/app.py +1 -1
  3. biotite/application/blast/webapp.py +1 -1
  4. biotite/application/clustalo/app.py +1 -1
  5. biotite/application/localapp.py +2 -2
  6. biotite/application/msaapp.py +10 -10
  7. biotite/application/muscle/app3.py +3 -3
  8. biotite/application/muscle/app5.py +3 -3
  9. biotite/application/sra/app.py +0 -5
  10. biotite/application/util.py +21 -1
  11. biotite/application/viennarna/rnaalifold.py +8 -8
  12. biotite/application/viennarna/rnaplot.py +10 -8
  13. biotite/application/viennarna/util.py +1 -1
  14. biotite/application/webapp.py +1 -1
  15. biotite/database/afdb/__init__.py +12 -0
  16. biotite/database/afdb/download.py +191 -0
  17. biotite/database/entrez/dbnames.py +10 -0
  18. biotite/database/entrez/download.py +9 -10
  19. biotite/database/entrez/key.py +1 -1
  20. biotite/database/entrez/query.py +5 -4
  21. biotite/database/pubchem/download.py +6 -6
  22. biotite/database/pubchem/error.py +10 -0
  23. biotite/database/pubchem/query.py +12 -23
  24. biotite/database/rcsb/download.py +3 -2
  25. biotite/database/rcsb/query.py +2 -3
  26. biotite/database/uniprot/check.py +2 -2
  27. biotite/database/uniprot/download.py +2 -5
  28. biotite/database/uniprot/query.py +3 -4
  29. biotite/file.py +14 -2
  30. biotite/interface/__init__.py +19 -0
  31. biotite/interface/openmm/__init__.py +20 -0
  32. biotite/interface/openmm/state.py +93 -0
  33. biotite/interface/openmm/system.py +227 -0
  34. biotite/interface/pymol/__init__.py +201 -0
  35. biotite/interface/pymol/cgo.py +346 -0
  36. biotite/interface/pymol/convert.py +185 -0
  37. biotite/interface/pymol/display.py +267 -0
  38. biotite/interface/pymol/object.py +1226 -0
  39. biotite/interface/pymol/shapes.py +178 -0
  40. biotite/interface/pymol/startup.py +169 -0
  41. biotite/interface/rdkit/__init__.py +19 -0
  42. biotite/interface/rdkit/mol.py +490 -0
  43. biotite/interface/version.py +94 -0
  44. biotite/interface/warning.py +19 -0
  45. biotite/sequence/align/__init__.py +0 -4
  46. biotite/sequence/align/alignment.py +33 -11
  47. biotite/sequence/align/banded.cp313-win_amd64.pyd +0 -0
  48. biotite/sequence/align/banded.pyx +22 -22
  49. biotite/sequence/align/cigar.py +2 -2
  50. biotite/sequence/align/kmeralphabet.cp313-win_amd64.pyd +0 -0
  51. biotite/sequence/align/kmeralphabet.pyx +2 -2
  52. biotite/sequence/align/kmersimilarity.cp313-win_amd64.pyd +0 -0
  53. biotite/sequence/align/kmertable.cp313-win_amd64.pyd +0 -0
  54. biotite/sequence/align/kmertable.pyx +6 -6
  55. biotite/sequence/align/localgapped.cp313-win_amd64.pyd +0 -0
  56. biotite/sequence/align/localgapped.pyx +47 -47
  57. biotite/sequence/align/localungapped.cp313-win_amd64.pyd +0 -0
  58. biotite/sequence/align/localungapped.pyx +10 -10
  59. biotite/sequence/align/matrix.py +12 -3
  60. biotite/sequence/align/multiple.cp313-win_amd64.pyd +0 -0
  61. biotite/sequence/align/multiple.pyx +1 -2
  62. biotite/sequence/align/pairwise.cp313-win_amd64.pyd +0 -0
  63. biotite/sequence/align/pairwise.pyx +37 -39
  64. biotite/sequence/align/permutation.cp313-win_amd64.pyd +0 -0
  65. biotite/sequence/align/selector.cp313-win_amd64.pyd +0 -0
  66. biotite/sequence/align/selector.pyx +2 -2
  67. biotite/sequence/align/statistics.py +1 -1
  68. biotite/sequence/align/tracetable.cp313-win_amd64.pyd +0 -0
  69. biotite/sequence/alphabet.py +2 -2
  70. biotite/sequence/annotation.py +19 -13
  71. biotite/sequence/codec.cp313-win_amd64.pyd +0 -0
  72. biotite/sequence/codon.py +1 -2
  73. biotite/sequence/graphics/alignment.py +25 -39
  74. biotite/sequence/graphics/dendrogram.py +4 -2
  75. biotite/sequence/graphics/features.py +2 -2
  76. biotite/sequence/graphics/logo.py +10 -12
  77. biotite/sequence/io/fasta/convert.py +1 -2
  78. biotite/sequence/io/fasta/file.py +1 -1
  79. biotite/sequence/io/fastq/file.py +3 -3
  80. biotite/sequence/io/genbank/file.py +3 -3
  81. biotite/sequence/io/genbank/sequence.py +2 -0
  82. biotite/sequence/io/gff/convert.py +1 -1
  83. biotite/sequence/io/gff/file.py +1 -2
  84. biotite/sequence/phylo/nj.cp313-win_amd64.pyd +0 -0
  85. biotite/sequence/phylo/tree.cp313-win_amd64.pyd +0 -0
  86. biotite/sequence/phylo/upgma.cp313-win_amd64.pyd +0 -0
  87. biotite/sequence/profile.py +19 -25
  88. biotite/sequence/search.py +0 -1
  89. biotite/sequence/seqtypes.py +12 -5
  90. biotite/sequence/sequence.py +1 -2
  91. biotite/structure/__init__.py +2 -0
  92. biotite/structure/alphabet/i3d.py +1 -2
  93. biotite/structure/alphabet/pb.py +1 -2
  94. biotite/structure/alphabet/unkerasify.py +8 -2
  95. biotite/structure/atoms.py +35 -27
  96. biotite/structure/basepairs.py +39 -40
  97. biotite/structure/bonds.cp313-win_amd64.pyd +0 -0
  98. biotite/structure/bonds.pyx +8 -5
  99. biotite/structure/box.py +159 -23
  100. biotite/structure/celllist.cp313-win_amd64.pyd +0 -0
  101. biotite/structure/celllist.pyx +83 -68
  102. biotite/structure/chains.py +17 -55
  103. biotite/structure/charges.cp313-win_amd64.pyd +0 -0
  104. biotite/structure/compare.py +420 -13
  105. biotite/structure/density.py +1 -1
  106. biotite/structure/dotbracket.py +31 -32
  107. biotite/structure/filter.py +8 -8
  108. biotite/structure/geometry.py +15 -15
  109. biotite/structure/graphics/rna.py +19 -16
  110. biotite/structure/hbond.py +18 -21
  111. biotite/structure/info/atoms.py +11 -2
  112. biotite/structure/info/ccd.py +0 -2
  113. biotite/structure/info/components.bcif +0 -0
  114. biotite/structure/info/groups.py +0 -3
  115. biotite/structure/info/misc.py +0 -1
  116. biotite/structure/info/radii.py +92 -22
  117. biotite/structure/info/standardize.py +1 -2
  118. biotite/structure/integrity.py +4 -6
  119. biotite/structure/io/general.py +2 -2
  120. biotite/structure/io/gro/file.py +8 -9
  121. biotite/structure/io/mol/convert.py +1 -1
  122. biotite/structure/io/mol/ctab.py +33 -28
  123. biotite/structure/io/mol/mol.py +1 -1
  124. biotite/structure/io/mol/sdf.py +39 -13
  125. biotite/structure/io/pdb/convert.py +86 -5
  126. biotite/structure/io/pdb/file.py +90 -24
  127. biotite/structure/io/pdb/hybrid36.cp313-win_amd64.pyd +0 -0
  128. biotite/structure/io/pdbqt/file.py +4 -4
  129. biotite/structure/io/pdbx/bcif.py +22 -7
  130. biotite/structure/io/pdbx/cif.py +20 -7
  131. biotite/structure/io/pdbx/component.py +6 -0
  132. biotite/structure/io/pdbx/compress.py +71 -34
  133. biotite/structure/io/pdbx/convert.py +429 -77
  134. biotite/structure/io/pdbx/encoding.cp313-win_amd64.pyd +0 -0
  135. biotite/structure/io/pdbx/encoding.pyx +39 -23
  136. biotite/structure/io/trajfile.py +9 -6
  137. biotite/structure/io/util.py +38 -0
  138. biotite/structure/mechanics.py +0 -1
  139. biotite/structure/molecules.py +0 -15
  140. biotite/structure/pseudoknots.py +13 -19
  141. biotite/structure/repair.py +2 -4
  142. biotite/structure/residues.py +20 -48
  143. biotite/structure/rings.py +335 -0
  144. biotite/structure/sasa.cp313-win_amd64.pyd +0 -0
  145. biotite/structure/sasa.pyx +30 -30
  146. biotite/structure/segments.py +123 -9
  147. biotite/structure/sequence.py +0 -1
  148. biotite/structure/spacegroups.json +1567 -0
  149. biotite/structure/spacegroups.license +26 -0
  150. biotite/structure/sse.py +0 -2
  151. biotite/structure/superimpose.py +75 -253
  152. biotite/structure/tm.py +581 -0
  153. biotite/structure/transform.py +232 -26
  154. biotite/structure/util.py +3 -3
  155. biotite/version.py +9 -4
  156. biotite/visualize.py +111 -1
  157. {biotite-1.1.0.dist-info → biotite-1.3.0.dist-info}/METADATA +8 -36
  158. {biotite-1.1.0.dist-info → biotite-1.3.0.dist-info}/RECORD +160 -138
  159. {biotite-1.1.0.dist-info → biotite-1.3.0.dist-info}/WHEEL +1 -1
  160. {biotite-1.1.0.dist-info → biotite-1.3.0.dist-info}/licenses/LICENSE.rst +0 -0
@@ -60,9 +60,9 @@ def displacement(atoms1, atoms2, box=None):
60
60
  The displacement vector(s). The shape is equal to the shape of
61
61
  the input `atoms` with the highest dimensionality.
62
62
 
63
- See also
63
+ See Also
64
64
  --------
65
- index_displacement
65
+ index_displacement : The same calculation, but using atom indices.
66
66
  """
67
67
  v1 = coord(atoms1)
68
68
  v2 = coord(atoms2)
@@ -191,7 +191,7 @@ def index_displacement(*args, **kwargs):
191
191
  copy is found for non-orthorhombic boxes; this is especially true
192
192
  for heavily skewed boxes.
193
193
 
194
- See also
194
+ See Also
195
195
  --------
196
196
  displacement
197
197
  """
@@ -224,9 +224,9 @@ def distance(atoms1, atoms2, box=None):
224
224
  The shape is equal to the shape of the input `atoms` with the
225
225
  highest dimensionality minus the last axis.
226
226
 
227
- See also
227
+ See Also
228
228
  --------
229
- index_distance
229
+ index_distance : The same calculation, but using atom indices.
230
230
  """
231
231
  diff = displacement(atoms1, atoms2, box)
232
232
  return np.sqrt(vector_dot(diff, diff))
@@ -282,7 +282,7 @@ def index_distance(*args, **kwargs):
282
282
  copy is found for non-orthorhombic boxes; this is especially true
283
283
  for heavily skewed boxes.
284
284
 
285
- See also
285
+ See Also
286
286
  --------
287
287
  distance
288
288
  """
@@ -312,9 +312,9 @@ def angle(atoms1, atoms2, atoms3, box=None):
312
312
  of the input `atoms` with the highest dimensionality minus the
313
313
  last axis.
314
314
 
315
- See also
315
+ See Also
316
316
  --------
317
- index_angle
317
+ index_angle : The same calculation, but using atom indices.
318
318
  """
319
319
  v1 = displacement(atoms1, atoms2, box)
320
320
  v2 = displacement(atoms3, atoms2, box)
@@ -371,7 +371,7 @@ def index_angle(*args, **kwargs):
371
371
  copy is found for non-orthorhombic boxes; this is especially true
372
372
  for heavily skewed boxes.
373
373
 
374
- See also
374
+ See Also
375
375
  --------
376
376
  angle
377
377
  """
@@ -404,8 +404,8 @@ def dihedral(atoms1, atoms2, atoms3, atoms4, box=None):
404
404
 
405
405
  See Also
406
406
  --------
407
- index_dihedral
408
- dihedral_backbone
407
+ index_dihedral : The same calculation, but using atom indices.
408
+ dihedral_backbone : Calculate the dihedral angle along a peptide backbone.
409
409
  """
410
410
  v1 = displacement(atoms1, atoms2, box)
411
411
  v2 = displacement(atoms2, atoms3, box)
@@ -472,7 +472,7 @@ def index_dihedral(*args, **kwargs):
472
472
  copy is found for non-orthorhombic boxes; this is especially true
473
473
  for heavily skewed boxes.
474
474
 
475
- See also
475
+ See Also
476
476
  --------
477
477
  dihedral
478
478
  dihedral_backbone
@@ -486,7 +486,7 @@ def dihedral_backbone(atom_array):
486
486
 
487
487
  Parameters
488
488
  ----------
489
- atoms: AtomArray or AtomArrayStack
489
+ atom_array : AtomArray or AtomArrayStack
490
490
  The protein structure to measure the dihedral angles for.
491
491
  For missing backbone atoms the corresponding angles are `NaN`.
492
492
 
@@ -568,7 +568,7 @@ def centroid(atoms):
568
568
 
569
569
  Parameters
570
570
  ----------
571
- atoms: ndarray or AtomArray or AtomArrayStack
571
+ atoms : ndarray or AtomArray or AtomArrayStack
572
572
  The structures to determine the centroid from.
573
573
  Alternatively an ndarray containing the coordinates can be
574
574
  provided.
@@ -603,7 +603,7 @@ def _call_non_index_function(
603
603
  box = atoms.box
604
604
  else:
605
605
  raise ValueError(
606
- "If `atoms` are coordinates, " "the box must be set explicitly"
606
+ "If `atoms` are coordinates, the box must be set explicitly"
607
607
  )
608
608
  else:
609
609
  box = None
@@ -57,59 +57,62 @@ def plot_nucleotide_secondary_structure(
57
57
  sequence. The positions are counted from zero.
58
58
  length : int
59
59
  The number of bases in the sequence.
60
- layout_type : RNAplotApp.Layout, optional (default: RNAplotApp.Layout.NAVIEW)
60
+ layout_type : RNAplotApp.Layout, optional
61
61
  The layout type according to the *RNAplot* documentation.
62
- draw_pseudoknots : bool, optional (default: True)
62
+ draw_pseudoknots : bool, optional
63
63
  Whether pseudoknotted bonds should be drawn.
64
- pseudoknot_order : iterable, optional (default: None)
64
+ pseudoknot_order : iterable, optional
65
65
  The pseudoknot order of each pair in the input `base_pairs`.
66
66
  If no pseudoknot order is given, a solution determined by
67
67
  :func:`biotite.structure.pseudoknots` is picked at random.
68
- angle : int or float, optional (default: 0)
68
+ angle : int or float, optional
69
69
  The angle the plot should be rotated.
70
- bond_linewidth : float or int or iterable, optional (default: 1)
70
+ bond_linewidth : float or int or iterable, optional
71
71
  The linewidth of each bond. Provide a single value to set the
72
72
  linewidth for all bonds or an iterable to set the linewidth for
73
73
  each individual bond.
74
- bond_linestyle : str or iterable, optional (default: None)
74
+ bond_linestyle : str or iterable, optional
75
75
  The *Matplotlib* compatible linestyle of each bond. Provide a
76
76
  single value to set the linewidth for all bonds or an iterable
77
77
  to set the linewidth for each individual bond. By default, solid
78
78
  lines are used for non-pseudoknotted bonds and dashed lines are
79
79
  used for pseudoknotted bonds.
80
- bond_color : str or ndarray, shape(n,) or shape(n,3) or shape(n,4), optional (default: 'black')
80
+ bond_color : str or ndarray, shape(n,) or shape(n,3) or shape(n,4), optional
81
81
  The *Matplotlib* compatible color of each bond. Provide a single
82
82
  string to set the color for all bonds or an array to set the
83
83
  color for each individual bond.
84
- backbone_linewidth : float, optional (default: 1)
84
+ backbone_linewidth : float, optional
85
85
  The linewidth of the backbone.
86
- backbone_linestyle : str, optional (default: 'solid')
86
+ backbone_linestyle : str, optional
87
87
  The *Matplotlib* compatible linestyle of the backbone.
88
- backbone_color : str or ndarray, shape=(3,) or shape=(4,), dtype=float, optional (default: 'grey')
88
+ backbone_color : str or ndarray, shape=(3,) or shape=(4,), dtype=float, optional
89
89
  The *Matplotlib* compatible color of the backbone.
90
- base_text : dict or iterable, optional (default: {'size': 'small'})
90
+ base_text : dict or iterable, optional
91
91
  The keyword parameters for the *Matplotlib* ``Text`` objects
92
92
  denoting the type of each base. Provide a single value to set
93
93
  the parameters for all labels or an iterable to set the
94
94
  parameters for each individual label.
95
- base_box : dict or iterable, optional (default: {'pad'=0, 'color'='white'})
95
+ The default is ``{'size': 'small'}``.
96
+ base_box : dict or iterable, optional)
96
97
  The *Matplotlib* compatible properties of the ``FancyBboxPatch``
97
98
  surrounding the base labels. Provide a single dictionary to
98
99
  set the properties of all base lables or an iterable to set the
99
100
  properties for each individual label.
100
- annotation_positions : iterable, optional (default: None)
101
+ The default is ``{'pad'=0, 'color'='white'}``.
102
+ annotation_positions : iterable, optional
101
103
  The positions of the bases to be numbered. By default every
102
104
  second base is annotated. Please note that while the positions
103
105
  in the sequence are counted from zero, they are displayed on the
104
106
  graph counted from one.
105
- annotation_offset : int or float, optional (default: 8.5)
107
+ annotation_offset : int or float, optional
106
108
  The offset of the annotations from the base labels.
107
- annotation_text : dict or iterable, optional (default: {'size': 'small'})
109
+ annotation_text : dict or iterable, optional
108
110
  The keyword parameters for the *Matplotlib* ``Text`` objects
109
111
  annotating the sequence. Provide a single value to set the
110
112
  parameters for all annotations or an iterable to set the
111
113
  parameters for each individual annotation.
112
- border : float, optional (default: 0.03)
114
+ The default is ``{'size': 'small'}``.
115
+ border : float, optional
113
116
  The percentage of the coordinate range to be left as whitespace
114
117
  to create a border around the plot.
115
118
  bin_path : str, optional
@@ -43,30 +43,27 @@ def hbond(
43
43
  ----------
44
44
  atoms : AtomArray or AtomArrayStack
45
45
  The atoms to find hydrogen bonds in.
46
- selection1, selection2: ndarray or None
46
+ selection1, selection2 : ndarray, optional
47
47
  Boolean mask for atoms to limit the hydrogen bond search to
48
48
  specific sections of the model. The shape must match the
49
49
  shape of the `atoms` argument. If None is given, the whole atoms
50
- stack is used instead. (Default: None)
51
- selection1_type: {'acceptor', 'donor', 'both'}, optional (default: 'both')
50
+ stack is used instead.
51
+ selection1_type : {'acceptor', 'donor', 'both'}, optional
52
52
  Determines the type of `selection1`.
53
53
  The type of `selection2` is chosen accordingly
54
54
  ('both' or the opposite).
55
- (Default: 'both')
56
55
  cutoff_dist : float, optional
57
56
  The maximal distance between the hydrogen and acceptor to be
58
- considered a hydrogen bond. (Default: 2.5)
57
+ considered a hydrogen bond.
59
58
  cutoff_angle : float, optional
60
59
  The angle cutoff in degree between Donor-H..Acceptor to be
61
- considered a hydrogen bond (default: 120).
62
- donor_elements, acceptor_elements: tuple of str
63
- Elements to be considered as possible donors or acceptors
64
- (Default: O, N, S).
60
+ considered a hydrogen bond.
61
+ donor_elements, acceptor_elements : tuple of str
62
+ Elements to be considered as possible donors or acceptors.
65
63
  periodic : bool, optional
66
64
  If true, hydrogen bonds can also be detected in periodic
67
65
  boundary conditions.
68
66
  The `box` attribute of `atoms` is required in this case.
69
- (Default: False).
70
67
 
71
68
  Returns
72
69
  -------
@@ -82,6 +79,10 @@ def hbond(
82
79
  `triplets` is present in the model *m* of the input `atoms`.
83
80
  Only returned if `atoms` is an :class:`AtomArrayStack`.
84
81
 
82
+ See Also
83
+ --------
84
+ hbond_frequency : Compute the frequency of each bond over the models.
85
+
85
86
  Notes
86
87
  -----
87
88
  The result of this function may include false positives:
@@ -92,6 +93,11 @@ def hbond(
92
93
  considered as acceptor atom by this method, although this does
93
94
  make sense from a chemical perspective.
94
95
 
96
+ References
97
+ ----------
98
+
99
+ .. footbibliography::
100
+
95
101
  Examples
96
102
  --------
97
103
  Calculate the total number of hydrogen bonds found in each model:
@@ -122,15 +128,6 @@ def hbond(
122
128
  A 15 GLY N N 8.320 -3.632 -0.318
123
129
  A 16 ARG N N 8.043 -1.206 -1.866
124
130
  A 6 TRP NE1 N 3.420 0.332 -0.121
125
-
126
- See Also
127
- --------
128
- hbond_frequency
129
-
130
- References
131
- ----------
132
-
133
- .. footbibliography::
134
131
  """
135
132
  if not (atoms.element == "H").any():
136
133
  warnings.warn(
@@ -400,7 +397,7 @@ def hbond_frequency(mask):
400
397
 
401
398
  Parameters
402
399
  ----------
403
- mask: ndarray, dtype=bool, shape=(m,n)
400
+ mask : ndarray, dtype=bool, shape=(m,n)
404
401
  Input mask obtained from `hbond` function.
405
402
 
406
403
  Returns
@@ -412,7 +409,7 @@ def hbond_frequency(mask):
412
409
 
413
410
  See Also
414
411
  --------
415
- hbond
412
+ hbond : Returns the mask that can be input into this function.
416
413
 
417
414
  Examples
418
415
  --------
@@ -18,7 +18,7 @@ NON_HETERO_RESIDUES = set([
18
18
  # fmt: on
19
19
 
20
20
 
21
- def residue(res_name):
21
+ def residue(res_name, allow_missing_coord=False):
22
22
  """
23
23
  Get an atom array, representing the residue with the given name.
24
24
 
@@ -30,6 +30,11 @@ def residue(res_name):
30
30
  ----------
31
31
  res_name : str
32
32
  The up to 3-letter name of the residue.
33
+ allow_missing_coord : bool, optional
34
+ Whether to allow missing coordinate values in the residue.
35
+ If ``True``, these will be represented as ``nan`` values.
36
+ If ``False``, a ``ValueError`` is raised when missing coordinates
37
+ are encountered.
33
38
 
34
39
  Returns
35
40
  -------
@@ -74,7 +79,11 @@ def residue(res_name):
74
79
  from biotite.structure.io.pdbx import get_component
75
80
 
76
81
  try:
77
- component = get_component(get_ccd(), res_name=res_name)
82
+ component = get_component(
83
+ get_ccd(),
84
+ res_name=res_name,
85
+ allow_missing_coord=allow_missing_coord,
86
+ )
78
87
  except KeyError:
79
88
  raise KeyError(f"No atom information found for residue '{res_name}' in CCD")
80
89
  component.hetero[:] = res_name not in NON_HETERO_RESIDUES
@@ -44,7 +44,6 @@ def get_ccd():
44
44
  ----------
45
45
 
46
46
  .. footbibliography::
47
-
48
47
  """
49
48
  # Avoid circular import
50
49
  from biotite.structure.io.pdbx.bcif import BinaryCIFFile
@@ -123,7 +122,6 @@ def get_from_ccd(category_name, comp_id, column_name=None):
123
122
  ----------
124
123
 
125
124
  .. footbibliography::
126
-
127
125
  """
128
126
  try:
129
127
  start, stop = _residue_index(category_name)[comp_id]
Binary file
@@ -61,7 +61,6 @@ def amino_acid_names():
61
61
  ----------
62
62
 
63
63
  .. footbibliography::
64
-
65
64
  """
66
65
  return _get_group_members(_AMINO_ACID_TYPES)
67
66
 
@@ -83,7 +82,6 @@ def nucleotide_names():
83
82
  ----------
84
83
 
85
84
  .. footbibliography::
86
-
87
85
  """
88
86
  return _get_group_members(_NUCLEOTIDE_TYPES)
89
87
 
@@ -105,7 +103,6 @@ def carbohydrate_names():
105
103
  ----------
106
104
 
107
105
  .. footbibliography::
108
-
109
106
  """
110
107
  return _get_group_members(_CARBOHYDRATE_TYPES)
111
108
 
@@ -127,7 +127,6 @@ def one_letter_code(res_name):
127
127
  alpha-D-mannopyranose
128
128
  >>> print(one_letter_code("MAN"))
129
129
  None
130
-
131
130
  """
132
131
  column = get_from_ccd("chem_comp", res_name.upper(), "one_letter_code")
133
132
  if column is None:
@@ -26,37 +26,106 @@ _PROTOR_RADII = {
26
26
  ("S", 1, 0) : 1.77,
27
27
  ("S", 2, 0) : 1.77, # Not official, added for completeness (MET)
28
28
  ("S", 2, 1) : 1.77,
29
- ("F", 1, 0) : 1.47, # Taken from _SINGLE_RADII
30
- ("CL", 1, 0) : 1.75, # Taken from _SINGLE_RADII
31
- ("BR", 1, 0) : 1.85, # Taken from _SINGLE_RADII
29
+ ("F", 1, 0) : 1.47, # Taken from _SINGLE_ATOM_VDW_RADII
30
+ ("CL", 1, 0) : 1.75, # Taken from _SINGLE_ATOM_VDW_RADII
31
+ ("BR", 1, 0) : 1.85, # Taken from _SINGLE_ATOM_VDW_RADII
32
32
  ("I", 1, 0) : 1.98, # Taken from _SINGLE_RADII
33
33
  }
34
34
 
35
- _SINGLE_RADII = {
36
- "H": 1.20,
35
+ _SINGLE_ATOM_VDW_RADII = {
36
+ # Main group
37
+ # Row 1 (Period 1)
38
+ "H": 1.10,
37
39
  "HE": 1.40,
38
40
 
41
+ # Row 2 (Period 2)
42
+ "LI": 1.81,
43
+ "BE": 1.53,
44
+ "B": 1.92,
39
45
  "C": 1.70,
40
46
  "N": 1.55,
41
47
  "O": 1.52,
42
48
  "F": 1.47,
43
49
  "NE": 1.54,
44
50
 
51
+ # Row 3 (Period 3)
52
+ "NA": 2.27,
53
+ "MG": 1.73,
54
+ "AL": 1.84,
45
55
  "SI": 2.10,
46
56
  "P": 1.80,
47
57
  "S": 1.80,
48
58
  "CL": 1.75,
49
59
  "AR": 1.88,
50
60
 
61
+ # Row 4 (Period 4)
62
+ "K": 2.75,
63
+ "CA": 2.31,
64
+ "GA": 1.87,
65
+ "GE": 2.11,
51
66
  "AS": 1.85,
52
67
  "SE": 1.90,
53
- "BR": 1.85,
68
+ "BR": 1.83,
54
69
  "KR": 2.02,
55
70
 
71
+ # Row 5 (Period 5)
72
+ "RB": 3.03,
73
+ "SR": 2.49,
74
+ "IN": 1.93,
75
+ "SN": 2.17,
76
+ "SB": 2.06,
56
77
  "TE": 2.06,
57
78
  "I": 1.98,
58
79
  "XE": 2.16,
80
+
81
+ # Row 6 (Period 6)
82
+ "CS": 3.43,
83
+ "BA": 2.68,
84
+ "TL": 1.96,
85
+ "PB": 2.02,
86
+ "BI": 2.07,
87
+ "PO": 1.97,
88
+ "AT": 2.02,
89
+ "RN": 2.20,
90
+
91
+ # Row 7 (Period 7)
92
+ "FR": 3.48,
93
+ "RA": 2.83,
94
+
95
+ # Transition metals (relevant ones only)
96
+ # Row 1
97
+ "FE": 2.05,
98
+ "CU": 2.00,
99
+ "ZN": 2.10,
100
+ "MN": 2.05,
101
+ "CO": 2.00,
102
+ "NI": 2.00,
103
+
104
+ # Row 2
105
+ 'MO': 2.10,
106
+ 'RU': 2.05,
107
+
108
+ # Row 3
109
+ 'W': 2.10,
110
+ 'PT': 2.05,
111
+ 'AU': 2.10,
59
112
  }
113
+ """
114
+ Van der Waals radii for main group and transition elements.
115
+
116
+ Main group:
117
+ Source: https://pubs.acs.org/doi/10.1021/jp8111556, Table 12 (Mantina et al. 2009)
118
+
119
+ Transition metals:
120
+ Source: RDKit, 2024.9.4 Release
121
+ https://github.com/rdkit/rdkit/blob/af6347963f25cfe8fe4db0638410b2f3a8e8bd89/Code/GraphMol/atomic_data.cpp#L51
122
+
123
+ Where available, these values were cross-checked vs the CRC Handbook of
124
+ Chemistry and Physics (105th edition) and verified that they are closely
125
+ in line (barring very minor discrepancies, usually < 0.05 Å).
126
+ We cannot use the CRC values directly as they are not permissively licensed.
127
+ """
128
+
60
129
  # fmt: on
61
130
 
62
131
  # A dictionary that caches radii for each residue
@@ -65,16 +134,15 @@ _protor_radii = {}
65
134
 
66
135
  def vdw_radius_protor(res_name, atom_name):
67
136
  """
68
- Estimate the Van-der-Waals radius of an non-hydrogen atom,
137
+ Estimate the Van-der-Waals radius of a heavy atom,
69
138
  that includes the radius added by potential bonded hydrogen atoms.
70
139
  The respective radii are taken from the ProtOr dataset.
71
140
  :footcite:`Tsai1999`
72
141
 
73
142
  This is especially useful for macromolecular structures where no
74
143
  hydrogen atoms are resolved, e.g. crystal structures.
75
- The valency of the non-hydrogen atom and the amount of normally
76
- bonded hydrogen atoms is taken from the chemical compound dictionary
77
- dataset.
144
+ The valency of the heavy atom and the amount of normally
145
+ bonded hydrogen atoms is taken from the *Chemical Component Dictionary*.
78
146
 
79
147
  Parameters
80
148
  ----------
@@ -86,12 +154,13 @@ def vdw_radius_protor(res_name, atom_name):
86
154
 
87
155
  Returns
88
156
  -------
89
- The Van-der-Waals radius of the given atom.
90
- If the radius cannot be estimated for the atom, `None` is returned.
157
+ radius : float
158
+ The Van-der-Waals radius of the given atom.
159
+ If the radius cannot be estimated for the atom, `None` is returned.
91
160
 
92
- See also
161
+ See Also
93
162
  --------
94
- vdw_radius_single
163
+ vdw_radius_single : *Van-der-Waals* radii for structures with annotated hydrogen atoms.
95
164
 
96
165
  References
97
166
  ----------
@@ -114,7 +183,7 @@ def vdw_radius_protor(res_name, atom_name):
114
183
  # Use cached radii for the residue, if already calculated
115
184
  if atom_name not in _protor_radii[res_name]:
116
185
  raise KeyError(
117
- f"Residue '{res_name}' does not contain an atom named " f"'{atom_name}'"
186
+ f"Residue '{res_name}' does not contain an atom named '{atom_name}'"
118
187
  )
119
188
  return _protor_radii[res_name].get(atom_name)
120
189
  else:
@@ -166,8 +235,8 @@ def _calculate_protor_radii(res_name):
166
235
 
167
236
  def vdw_radius_single(element):
168
237
  """
169
- Get the Van-der-Waals radius of an atom from the given element.
170
- :footcite:`Bondi1964`
238
+ Get the *Van-der-Waals* radius of an atom from the given element.
239
+ :footcite:`Mantina2009`
171
240
 
172
241
  Parameters
173
242
  ----------
@@ -176,12 +245,13 @@ def vdw_radius_single(element):
176
245
 
177
246
  Returns
178
247
  -------
179
- The Van-der-Waals radius of the atom.
180
- If the radius is unknown for the element, `None` is returned.
248
+ radius : float
249
+ The Van-der-Waals radius of the atom.
250
+ If the radius is unknown for the element, `None` is returned.
181
251
 
182
- See also
252
+ See Also
183
253
  --------
184
- vdw_radius_protor
254
+ vdw_radius_protor : *Van-der-Waals* radii for structures without annotated hydrogen atoms.
185
255
 
186
256
  References
187
257
  ----------
@@ -194,4 +264,4 @@ def vdw_radius_single(element):
194
264
  >>> print(vdw_radius_single("C"))
195
265
  1.7
196
266
  """
197
- return _SINGLE_RADII.get(element.upper())
267
+ return _SINGLE_ATOM_VDW_RADII.get(element.upper())
@@ -125,8 +125,7 @@ def standardize_order(atoms):
125
125
  if chem_comp_atom is None:
126
126
  # If the residue is not in the CCD, keep the current order
127
127
  warnings.warn(
128
- f"Residue '{res_name}' is not in the CCD, "
129
- f"keeping current atom order"
128
+ f"Residue '{res_name}' is not in the CCD, keeping current atom order"
130
129
  )
131
130
  reordered_indices[start:stop] = np.arange(start, stop)
132
131
  continue
@@ -47,7 +47,7 @@ def check_atom_id_continuity(array):
47
47
  Returns
48
48
  -------
49
49
  discontinuity : ndarray, dtype=int
50
- Contains the indices of atoms after a discontinuity
50
+ Contains the indices of atoms after a discontinuity.
51
51
  """
52
52
  ids = array.atom_id
53
53
  return _check_continuity(ids)
@@ -69,7 +69,7 @@ def check_res_id_continuity(array):
69
69
  Returns
70
70
  -------
71
71
  discontinuity : ndarray, dtype=int
72
- Contains the indices of atoms after a discontinuity
72
+ Contains the indices of atoms after a discontinuity.
73
73
  """
74
74
  ids = array.res_id
75
75
  return _check_continuity(ids)
@@ -96,10 +96,8 @@ def check_linear_continuity(array, min_len=1.2, max_len=1.8):
96
96
 
97
97
  See Also
98
98
  --------
99
- biotite.structure.filter.filter_linear_bond_continuity :
100
- A function to filter for atoms preserving the continuity (used here).
101
- biotite.structure.bonds.BondList :
102
- A class that doesn't depend on the atoms' order to identify bonds.
99
+ filter_linear_bond_continuity : A function to filter for atoms preserving the continuity (used here).
100
+ BondList : A class that doesn't depend on the atoms' order to identify bonds.
103
101
  """
104
102
  con_mask = filter_linear_bond_continuity(array, min_len, max_len)
105
103
  # The continuity mask `con_mask` points to atoms for which the next atom is continuous.
@@ -34,7 +34,7 @@ def load_structure(file_path, template=None, **kwargs):
34
34
  The path to structure file.
35
35
  template : AtomArray or AtomArrayStack or file-like object or str, optional
36
36
  Only required when reading a trajectory file.
37
- kwargs
37
+ **kwargs
38
38
  Additional parameters will be passed to either the
39
39
  :func:`get_structure()` or :func:`read()` method of the file
40
40
  object.
@@ -146,7 +146,7 @@ def save_structure(file_path, array, **kwargs):
146
146
  The path to structure file.
147
147
  array : AtomArray or AtomArrayStack
148
148
  The structure to be saved.
149
- kwargs
149
+ **kwargs
150
150
  Additional parameters will be passed to the respective `set_structure`
151
151
  method.
152
152