RNApolis 0.8.2__py3-none-any.whl → 0.8.3__py3-none-any.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.
- rnapolis/tertiary_v2.py +34 -1
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/METADATA +1 -1
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/RECORD +7 -7
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/WHEEL +1 -1
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/entry_points.txt +0 -0
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/licenses/LICENSE +0 -0
- {rnapolis-0.8.2.dist-info → rnapolis-0.8.3.dist-info}/top_level.txt +0 -0
rnapolis/tertiary_v2.py
CHANGED
@@ -121,7 +121,9 @@ class Structure:
|
|
121
121
|
groupby_cols.append("pdbx_PDB_ins_code")
|
122
122
|
|
123
123
|
# Group atoms by residue
|
124
|
-
grouped = self.atoms.groupby(
|
124
|
+
grouped = self.atoms.groupby(
|
125
|
+
groupby_cols, dropna=False, observed=False, sort=False
|
126
|
+
)
|
125
127
|
|
126
128
|
else:
|
127
129
|
# For unknown formats, return an empty list
|
@@ -495,6 +497,37 @@ class Residue:
|
|
495
497
|
return Atom(atoms_df.iloc[0], self.format)
|
496
498
|
return None
|
497
499
|
|
500
|
+
@cached_property
|
501
|
+
def is_nucleotide(self) -> bool:
|
502
|
+
"""
|
503
|
+
Check if this residue is a nucleotide.
|
504
|
+
|
505
|
+
A nucleotide is identified by the presence of specific atoms:
|
506
|
+
- Sugar atoms: C1', C2', C3', C4', O4'
|
507
|
+
- Base atoms: N1, C2, N3, C4, C5, C6
|
508
|
+
|
509
|
+
Returns:
|
510
|
+
--------
|
511
|
+
bool
|
512
|
+
True if the residue is a nucleotide, False otherwise
|
513
|
+
"""
|
514
|
+
# Early check: if less than 11 atoms, can't be a nucleotide
|
515
|
+
if len(self.atoms) < 11:
|
516
|
+
return False
|
517
|
+
|
518
|
+
# Required sugar atoms
|
519
|
+
sugar_atoms = ["C1'", "C2'", "C3'", "C4'", "O4'"]
|
520
|
+
|
521
|
+
# Required base atoms
|
522
|
+
base_atoms = ["N1", "C2", "N3", "C4", "C5", "C6"]
|
523
|
+
|
524
|
+
# Check for all required atoms
|
525
|
+
for atom_name in sugar_atoms + base_atoms:
|
526
|
+
if self.find_atom(atom_name) is None:
|
527
|
+
return False
|
528
|
+
|
529
|
+
return True
|
530
|
+
|
498
531
|
def is_connected(self, next_residue_candidate: "Residue") -> bool:
|
499
532
|
"""
|
500
533
|
Check if this residue is connected to the next residue candidate.
|
@@ -16,13 +16,13 @@ rnapolis/parser_v2.py,sha256=qG6CO3or7zmuJu368g9Nzokiqdeip4yjD14F163uH6w,40618
|
|
16
16
|
rnapolis/rfam_folder.py,sha256=SjiiyML_T1__saruFwSMJEoQ7Y55GIU8ktS8ZUn5-fw,11111
|
17
17
|
rnapolis/splitter.py,sha256=x-Zn21mkiMgvYPptUFD9BbdNIvoaM6b8GzGf6uYXEwE,4052
|
18
18
|
rnapolis/tertiary.py,sha256=mTVpz8rz5Q9s5_QVSMdEMXSooCce0rAD5RQMh00bHm4,39200
|
19
|
-
rnapolis/tertiary_v2.py,sha256=
|
19
|
+
rnapolis/tertiary_v2.py,sha256=y7Rh43Jzt9QU6wCa1wAHIcO3BcNQY83PbbWNTmqI8zM,23424
|
20
20
|
rnapolis/transformer.py,sha256=aC0nBmHHJf5TyLvBIV57Jj3tlwpvHbPo347opfAOlQA,3844
|
21
21
|
rnapolis/unifier.py,sha256=2ge7IB9FdRgzSAiVD39U_ciwtdDJ2fGzf8mUIudbrqY,5820
|
22
22
|
rnapolis/util.py,sha256=IdquFO3PV1_KDqodjupzm0Rqvgy0CeSzxGHaGEHYXVU,543
|
23
|
-
rnapolis-0.8.
|
24
|
-
rnapolis-0.8.
|
25
|
-
rnapolis-0.8.
|
26
|
-
rnapolis-0.8.
|
27
|
-
rnapolis-0.8.
|
28
|
-
rnapolis-0.8.
|
23
|
+
rnapolis-0.8.3.dist-info/licenses/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
|
24
|
+
rnapolis-0.8.3.dist-info/METADATA,sha256=qdVlCdQ9zj6-qb8EXVVnhbCD7TJEUtF51LZN7VIx658,54537
|
25
|
+
rnapolis-0.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
26
|
+
rnapolis-0.8.3.dist-info/entry_points.txt,sha256=H00KoN54wU3dFOofAu3H_3PADmZOBTB1hXf5TUU2uzo,438
|
27
|
+
rnapolis-0.8.3.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
|
28
|
+
rnapolis-0.8.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|