molutils 0.6.1__tar.gz → 0.7.1__tar.gz
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.
- {molutils-0.6.1 → molutils-0.7.1}/PKG-INFO +2 -2
- {molutils-0.6.1 → molutils-0.7.1}/molutils/__init__.py +3 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_core/count.py +8 -12
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_core/extract.py +1 -5
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_core/list_.py +3 -5
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_core/remove.py +2 -2
- molutils-0.7.1/molutils/_core/traj.py +78 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_ui/app_main.py +3 -3
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_ui/fy_help.fyh +34 -4
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_ui/fy_rules.fyr +16 -0
- molutils-0.7.1/molutils/_utils/__init__.py +0 -0
- molutils-0.7.1/molutils/_utils/mda_utils.py +31 -0
- molutils-0.7.1/molutils/_version.py +1 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/PKG-INFO +2 -2
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/SOURCES.txt +4 -1
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/requires.txt +1 -1
- {molutils-0.6.1 → molutils-0.7.1}/setup.py +1 -1
- molutils-0.6.1/molutils/_version.py +0 -1
- {molutils-0.6.1 → molutils-0.7.1}/LICENSE.md +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/README.md +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/__main__.py +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_core/__init__.py +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_ui/__init__.py +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils/_ui/app_subcommand.py +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/dependency_links.txt +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/entry_points.txt +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/molutils.egg-info/top_level.txt +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/pyproject.toml +0 -0
- {molutils-0.6.1 → molutils-0.7.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: molutils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Collection of tools for preprocessing or summarizing details from biomolecular structure files.
|
|
5
5
|
Home-page: https://github.com/diegobarmor/molutils
|
|
6
6
|
Author: DiegoBarMor
|
|
@@ -13,7 +13,7 @@ Requires-Python: >=3.10
|
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE.md
|
|
15
15
|
Requires-Dist: molsimple==0.1.2
|
|
16
|
-
Requires-Dist: freyacli==0.5.
|
|
16
|
+
Requires-Dist: freyacli==0.5.1
|
|
17
17
|
Dynamic: author
|
|
18
18
|
Dynamic: author-email
|
|
19
19
|
Dynamic: classifier
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
from ._version import __version__
|
|
2
2
|
|
|
3
|
+
from ._utils.mda_utils import MDAUtils
|
|
4
|
+
|
|
3
5
|
from ._ui.app_subcommand import AppSubcommand
|
|
4
6
|
|
|
5
7
|
from ._core.list_ import List
|
|
6
8
|
from ._core.count import Count
|
|
7
9
|
from ._core.extract import Extract
|
|
8
10
|
from ._core.remove import Remove
|
|
11
|
+
from ._core.traj import Traj
|
|
9
12
|
|
|
10
13
|
from ._ui.app_main import AppMain
|
|
@@ -46,16 +46,12 @@ class Count(mu.AppSubcommand):
|
|
|
46
46
|
def app_count_frames(self):
|
|
47
47
|
path_struct = self.main.arg_path("path_struct", assertion = fy.PathAssertion.FILE_IN)
|
|
48
48
|
path_traj = self.main.arg_path("path_traj", assertion = fy.PathAssertion.FILE_IN)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
u = mda.Universe(str(path_struct), *args_traj)
|
|
53
|
-
|
|
54
|
-
nframes_valid, _ = mu.Count.frames(u)
|
|
49
|
+
nframes_valid, _ = mu.Count.frames(
|
|
50
|
+
mu.MDAUtils.create_universe_quiet(path_struct, path_traj)
|
|
51
|
+
)
|
|
55
52
|
print(f"{nframes_valid}")
|
|
56
53
|
|
|
57
54
|
|
|
58
|
-
|
|
59
55
|
# --------------------------------------------------------------------------
|
|
60
56
|
def app_count_altlocs(self):
|
|
61
57
|
path_in = self.main.arg_path("path_in", assertion = fy.PathAssertion.FILE_IN)
|
|
@@ -64,25 +60,25 @@ class Count(mu.AppSubcommand):
|
|
|
64
60
|
|
|
65
61
|
# -------------------------------------------------------------------------- LOGIC SECTION
|
|
66
62
|
@classmethod
|
|
67
|
-
def models(cls, system: ms.System) -> int:
|
|
63
|
+
def models(cls, system: "ms.System") -> int:
|
|
68
64
|
return len(system.models)
|
|
69
65
|
|
|
70
66
|
|
|
71
67
|
# --------------------------------------------------------------------------
|
|
72
68
|
@classmethod
|
|
73
|
-
def chains(cls, system: ms.System) -> int:
|
|
69
|
+
def chains(cls, system: "ms.System") -> int:
|
|
74
70
|
return len(mu.List.chains(system, do_sort = False))
|
|
75
71
|
|
|
76
72
|
|
|
77
73
|
# --------------------------------------------------------------------------
|
|
78
74
|
@classmethod
|
|
79
|
-
def residues(cls, system: ms.System) -> int:
|
|
75
|
+
def residues(cls, system: "ms.System") -> int:
|
|
80
76
|
return len(mu.List.residues(system, do_sort = False))
|
|
81
77
|
|
|
82
78
|
|
|
83
79
|
# --------------------------------------------------------------------------
|
|
84
80
|
@classmethod
|
|
85
|
-
def particles(cls, system: ms.System) -> int:
|
|
81
|
+
def particles(cls, system: "ms.System") -> int:
|
|
86
82
|
return len(system.particles)
|
|
87
83
|
|
|
88
84
|
|
|
@@ -102,7 +98,7 @@ class Count(mu.AppSubcommand):
|
|
|
102
98
|
|
|
103
99
|
# --------------------------------------------------------------------------
|
|
104
100
|
@classmethod
|
|
105
|
-
def altlocs(cls, system: ms.System) -> int:
|
|
101
|
+
def altlocs(cls, system: "ms.System") -> int:
|
|
106
102
|
parts_with_altloc: set[tuple[str, str]] = set()
|
|
107
103
|
|
|
108
104
|
for particle in system.particles:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
-
from collections import defaultdict
|
|
3
2
|
|
|
4
3
|
import molsimple as ms
|
|
5
4
|
import freyacli as fy
|
|
@@ -70,10 +69,7 @@ class Extract(mu.AppSubcommand):
|
|
|
70
69
|
frames: list[int] = None, unpack: bool = False
|
|
71
70
|
) -> None:
|
|
72
71
|
"""Note: This method directly saves the specified frames instead of returning them."""
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
args_traj = [str(path_traj)] if path_traj is not None else []
|
|
76
|
-
u = mda.Universe(str(path_struct), *args_traj)
|
|
72
|
+
u = mu.MDAUtils.create_universe_quiet(path_struct, path_traj)
|
|
77
73
|
|
|
78
74
|
if frames is not None and len(frames) == 1:
|
|
79
75
|
unpack = True
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
1
|
import molsimple as ms
|
|
4
2
|
import freyacli as fy
|
|
5
3
|
import molutils as mu
|
|
@@ -10,7 +8,7 @@ class List(mu.AppSubcommand):
|
|
|
10
8
|
def run(self):
|
|
11
9
|
command = self.main.subcommands.pop(0)
|
|
12
10
|
|
|
13
|
-
if command == "chains": return self.app_list_chains()
|
|
11
|
+
if command == "chains" : return self.app_list_chains()
|
|
14
12
|
if command == "residues": return self.app_list_residues()
|
|
15
13
|
|
|
16
14
|
raise ValueError(f"Unknown command: {command}")
|
|
@@ -30,7 +28,7 @@ class List(mu.AppSubcommand):
|
|
|
30
28
|
|
|
31
29
|
# -------------------------------------------------------------------------- LOGIC SECTION
|
|
32
30
|
@classmethod
|
|
33
|
-
def chains(cls, system: ms.System, do_sort: bool = True) -> list[str]:
|
|
31
|
+
def chains(cls, system: "ms.System", do_sort: bool = True) -> list[str]:
|
|
34
32
|
unique_chains = set(system.particles.get_chainids())
|
|
35
33
|
if do_sort: return sorted(unique_chains)
|
|
36
34
|
return list(unique_chains)
|
|
@@ -38,7 +36,7 @@ class List(mu.AppSubcommand):
|
|
|
38
36
|
|
|
39
37
|
# --------------------------------------------------------------------------
|
|
40
38
|
@classmethod
|
|
41
|
-
def residues(cls, system: ms.System, do_sort: bool = True) -> list[str]:
|
|
39
|
+
def residues(cls, system: "ms.System", do_sort: bool = True) -> list[str]:
|
|
42
40
|
"""Returns a list of unique residue identifiers in the format "chainid.resid"."""
|
|
43
41
|
unique_residues = set(part.get_chain_resid().get_dotstr() for part in system)
|
|
44
42
|
if do_sort: return sorted(unique_residues)
|
|
@@ -10,7 +10,7 @@ class Remove(mu.AppSubcommand):
|
|
|
10
10
|
def run(self):
|
|
11
11
|
command = self.main.subcommands.pop(0)
|
|
12
12
|
|
|
13
|
-
if command == "altlocs"
|
|
13
|
+
if command == "altlocs": return self.app_remove_altlocs()
|
|
14
14
|
|
|
15
15
|
raise ValueError(f"Unknown command: {command}")
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ class Remove(mu.AppSubcommand):
|
|
|
24
24
|
|
|
25
25
|
# --------------------------------------------------------------------------
|
|
26
26
|
@classmethod
|
|
27
|
-
def altlocs(cls, path_pdb: Path) -> ms.ParticleGroup:
|
|
27
|
+
def altlocs(cls, path_pdb: Path) -> "ms.ParticleGroup":
|
|
28
28
|
pdb = ms.System.read_pdb(path_pdb)
|
|
29
29
|
|
|
30
30
|
out: list[ms.Particle] = []
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import freyacli as fy
|
|
4
|
+
import molutils as mu
|
|
5
|
+
|
|
6
|
+
# //////////////////////////////////////////////////////////////////////////////
|
|
7
|
+
class Traj(mu.AppSubcommand):
|
|
8
|
+
# -------------------------------------------------------------------------- UI SECTION
|
|
9
|
+
def run(self):
|
|
10
|
+
command = self.main.subcommands.pop(0)
|
|
11
|
+
|
|
12
|
+
if command == "align": return self.app_traj_align()
|
|
13
|
+
if command == "rmsd" : return self.app_traj_rmsd()
|
|
14
|
+
|
|
15
|
+
raise ValueError(f"Unknown command: {command}")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --------------------------------------------------------------------------
|
|
19
|
+
def app_traj_align(self):
|
|
20
|
+
path_struct = self.main.arg_path("path_struct", assertion = fy.PathAssertion.FILE_IN)
|
|
21
|
+
path_traj = self.main.arg_path("path_traj", assertion = fy.PathAssertion.FILE_IN)
|
|
22
|
+
path_ref = self.main.arg_path("path_ref",
|
|
23
|
+
default = path_struct, assertion = fy.PathAssertion.FILE_IN
|
|
24
|
+
)
|
|
25
|
+
path_out = self.main.arg_path("path_out",
|
|
26
|
+
default = path_struct.with_suffix(".align.xtc"), assertion = fy.PathAssertion.FILE_OUT
|
|
27
|
+
)
|
|
28
|
+
selection = self.main.arg_str("selection")
|
|
29
|
+
|
|
30
|
+
mu.Traj.align(path_struct, path_traj, path_ref, path_out, selection)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# --------------------------------------------------------------------------
|
|
34
|
+
def app_traj_rmsd(self):
|
|
35
|
+
path_struct = self.main.arg_path("path_struct", assertion = fy.PathAssertion.FILE_IN)
|
|
36
|
+
path_traj = self.main.arg_path("path_traj", assertion = fy.PathAssertion.FILE_IN)
|
|
37
|
+
path_ref = self.main.arg_path("path_ref",
|
|
38
|
+
default = path_struct, assertion = fy.PathAssertion.FILE_IN
|
|
39
|
+
)
|
|
40
|
+
selection = self.main.arg_str("selection")
|
|
41
|
+
|
|
42
|
+
print(*mu.Traj.rmsd(path_struct, path_traj, path_ref, selection))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# -------------------------------------------------------------------------- LOGIC SECTION
|
|
46
|
+
@classmethod
|
|
47
|
+
def align(cls,
|
|
48
|
+
path_struct: Path, path_traj: Path | None,
|
|
49
|
+
path_ref: Path, path_out: Path,
|
|
50
|
+
selection: str
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Note: This method directly saves the aligned trajectory instead of returning it."""
|
|
53
|
+
u_to_align = mu.MDAUtils.create_universe_quiet(path_struct, path_traj)
|
|
54
|
+
u_ref = mu.MDAUtils.create_universe_quiet(path_ref)
|
|
55
|
+
|
|
56
|
+
from MDAnalysis.analysis import align
|
|
57
|
+
align.AlignTraj(
|
|
58
|
+
u_to_align, u_ref, select = selection,
|
|
59
|
+
filename = str(path_out), match_atoms = False,
|
|
60
|
+
).run()
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# --------------------------------------------------------------------------
|
|
64
|
+
@classmethod
|
|
65
|
+
def rmsd(cls,
|
|
66
|
+
path_struct: Path, path_traj: Path | None,
|
|
67
|
+
path_ref: Path, selection: str
|
|
68
|
+
) -> list[float]:
|
|
69
|
+
u_for_rmsd = mu.MDAUtils.create_universe_quiet(path_struct, path_traj)
|
|
70
|
+
u_ref = mu.MDAUtils.create_universe_quiet(path_ref)
|
|
71
|
+
|
|
72
|
+
from MDAnalysis.analysis import rms
|
|
73
|
+
rmsd = rms.RMSD(u_for_rmsd, u_ref, select = selection).run() # shape (n_frames, 3)
|
|
74
|
+
idxs_frame, timesteps, arr_rmsd = rmsd.results.rmsd.T # shape (3, n_frames)
|
|
75
|
+
return [float(r) for r in arr_rmsd] # ensure it's a "normal" float e.g. json serializable
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# //////////////////////////////////////////////////////////////////////////////
|
|
@@ -27,6 +27,7 @@ class AppMain(fy.App):
|
|
|
27
27
|
if command == "count" : return mu.Count(self).run()
|
|
28
28
|
if command == "extract": return mu.Extract(self).run()
|
|
29
29
|
if command == "remove" : return mu.Remove(self).run()
|
|
30
|
+
if command == "traj" : return mu.Traj(self).run()
|
|
30
31
|
if command == "select" : return self._run_select()
|
|
31
32
|
if command == "merge" : return self._run_merge()
|
|
32
33
|
raise ValueError(f"Unknown command: {command}")
|
|
@@ -39,13 +40,12 @@ class AppMain(fy.App):
|
|
|
39
40
|
path_out = self.arg_path("path_out", assertion = fy.PathAssertion.FILE_OUT)
|
|
40
41
|
paths_traj = self.arg_path_list("paths_traj", assertion = fy.PathAssertion.FILE_OUT)
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
mda.Universe(path_in).select_atoms(query).write(path_out)
|
|
43
|
+
mu.MDAUtils.create_universe_quiet(path_in).select_atoms(query).write(path_out)
|
|
44
44
|
|
|
45
45
|
if not paths_traj: return
|
|
46
46
|
|
|
47
47
|
path_traj_in, path_traj_out = paths_traj
|
|
48
|
-
u =
|
|
48
|
+
u = mu.MDAUtils.create_universe_quiet(path_in, path_traj_in)
|
|
49
49
|
u.select_atoms(query).write(str(path_traj_out), frames = "all")
|
|
50
50
|
|
|
51
51
|
|
|
@@ -69,10 +69,9 @@
|
|
|
69
69
|
@frames
|
|
70
70
|
!fyh:_ Extract specific frames from a PDB file into separate file(s).
|
|
71
71
|
Requires MDAnalysis.
|
|
72
|
-
!
|
|
73
|
-
If the file also contains the trajectory data (e.g. XYZ file), then "path_traj" can be ommitted.
|
|
72
|
+
!use:mda_struct
|
|
74
73
|
In this case, an additional structure file (a copy of the first frame) may be exported for convenience.
|
|
75
|
-
!
|
|
74
|
+
!use:mda_traj
|
|
76
75
|
!fyh:folder_out Path of the directory where to place the unpacked structure(s).
|
|
77
76
|
If not provided, the parent directory of the input PDB file will be used.
|
|
78
77
|
!fyh:frames Frame indices to extract. If no frames are specified, all frames are extracted.
|
|
@@ -84,11 +83,35 @@
|
|
|
84
83
|
|
|
85
84
|
@remove
|
|
86
85
|
!fyh:_ Remove undesired data from a PDB file.
|
|
86
|
+
@altlocs
|
|
87
|
+
!fyh:_ Keep only the atoms without altloc tags or the first instance encountered of an altloc (usually marked as 'A').
|
|
88
|
+
!fyh:path_in Path of a PDB file.
|
|
89
|
+
!fyh:path_out Path for the output PDB file.
|
|
90
|
+
!@
|
|
91
|
+
!@
|
|
92
|
+
|
|
93
|
+
@traj
|
|
94
|
+
!fyh:_ Common operations related to analysis of trajectories.
|
|
95
|
+
@align
|
|
96
|
+
!fyh:_ Align a trajectory according to its RMSD values against some reference structure. Requires MDAnalysis.
|
|
97
|
+
!use:mda_struct
|
|
98
|
+
!use:mda_traj
|
|
99
|
+
!fyh:path_ref Path of the reference file (e.g. PDB file). Can be anything supported by MDanalysis. If not provided, the first frame of the input trajectory is considered.
|
|
100
|
+
!fyh:path_out Path for the output algined trajectory file (e.g. XTC file). Can be anything supported by MDanalysis.
|
|
101
|
+
!fyh:selection Atom selection query for performing the RMSD. Must follow MDAnalysis format.
|
|
102
|
+
!@
|
|
103
|
+
@rmsd
|
|
104
|
+
!fyh:_ Calculate the RMSD values of a trajectory against some reference structure. Requires MDAnalysis.
|
|
105
|
+
!use:mda_struct
|
|
106
|
+
!use:mda_traj
|
|
107
|
+
!fyh:path_ref Path of the reference file (e.g. PDB file). Can be anything supported by MDanalysis. If not provided, the first frame of the input trajectory is considered.
|
|
108
|
+
!fyh:selection Atom selection query for performing the RMSD. Must follow MDAnalysis format.
|
|
109
|
+
!@
|
|
87
110
|
!@
|
|
88
111
|
|
|
89
112
|
@select
|
|
90
113
|
!fyh:_ Select specific atoms with a custom query (MDAnalysis format) and save them into a file. Requires MDAnalysis.
|
|
91
|
-
!fyh:query Query for selecting the atoms of interest. Must follow MDAnalysis format
|
|
114
|
+
!fyh:query Query for selecting the atoms of interest. Must follow MDAnalysis format.
|
|
92
115
|
!fyh:path_in Path of the structure file whose atoms will be selected. Can be anything supported by MDanalysis.
|
|
93
116
|
!fyh:path_out Path for the output selected atoms. Can be anything supported by MDanalysis.
|
|
94
117
|
!fyh:paths_traj Input and output paths for an optional trajectory.
|
|
@@ -107,3 +130,10 @@
|
|
|
107
130
|
!fyh:folder_out Path of the directory where to place the unpacked structure(s).
|
|
108
131
|
If not provided, the parent directory of the input PDB file will be used.
|
|
109
132
|
!fed
|
|
133
|
+
!def mda_struct
|
|
134
|
+
!fyh:path_struct Path of the structure file (e.g. PDB file). Can be anything supported by MDanalysis.
|
|
135
|
+
If the file also contains the trajectory data (e.g. XYZ file), then "path_traj" can be ommitted.
|
|
136
|
+
!fed
|
|
137
|
+
!def mda_traj
|
|
138
|
+
!fyh:path_traj Path of the trajectory file (e.g. XTC file). Can be anything supported by MDanalysis.
|
|
139
|
+
!fed
|
|
@@ -59,6 +59,22 @@
|
|
|
59
59
|
!@
|
|
60
60
|
!@
|
|
61
61
|
|
|
62
|
+
@traj
|
|
63
|
+
@align
|
|
64
|
+
path_struct[]1.PATH
|
|
65
|
+
~path_traj[]1.PATH
|
|
66
|
+
~path_ref[r,ref]1.PATH
|
|
67
|
+
~path_out[o,out]1.PATH
|
|
68
|
+
~selection[s,sel]1.STR=all
|
|
69
|
+
!@
|
|
70
|
+
@rmsd
|
|
71
|
+
path_struct[]1.PATH
|
|
72
|
+
~path_traj[]1.PATH
|
|
73
|
+
~path_ref[r,ref]1.PATH
|
|
74
|
+
~selection[s,sel]1.STR=all
|
|
75
|
+
!@
|
|
76
|
+
!@
|
|
77
|
+
|
|
62
78
|
@select
|
|
63
79
|
query[]1.STR
|
|
64
80
|
path_in[]1.PATH
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
# //////////////////////////////////////////////////////////////////////////////
|
|
4
|
+
class MDAUtils:
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
@staticmethod
|
|
7
|
+
def create_universe_quiet(path_struct: Path, path_traj: Path|None = None):
|
|
8
|
+
import io
|
|
9
|
+
import logging
|
|
10
|
+
import warnings
|
|
11
|
+
import MDAnalysis as mda
|
|
12
|
+
from contextlib import redirect_stdout, redirect_stderr
|
|
13
|
+
|
|
14
|
+
warnings.filterwarnings("ignore", module = "MDAnalysis")
|
|
15
|
+
|
|
16
|
+
buf = io.StringIO()
|
|
17
|
+
logger = logging.getLogger("MDAnalysis")
|
|
18
|
+
old_level = logger.getEffectiveLevel()
|
|
19
|
+
try:
|
|
20
|
+
logger.setLevel(logging.ERROR)
|
|
21
|
+
with warnings.catch_warnings():
|
|
22
|
+
warnings.simplefilter("ignore")
|
|
23
|
+
with redirect_stdout(buf), redirect_stderr(buf):
|
|
24
|
+
args_traj = [str(path_traj)] if path_traj is not None else []
|
|
25
|
+
u = mda.Universe(str(path_struct), *args_traj)
|
|
26
|
+
finally:
|
|
27
|
+
logger.setLevel(old_level)
|
|
28
|
+
return u
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# //////////////////////////////////////////////////////////////////////////////
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.7.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: molutils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Collection of tools for preprocessing or summarizing details from biomolecular structure files.
|
|
5
5
|
Home-page: https://github.com/diegobarmor/molutils
|
|
6
6
|
Author: DiegoBarMor
|
|
@@ -13,7 +13,7 @@ Requires-Python: >=3.10
|
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE.md
|
|
15
15
|
Requires-Dist: molsimple==0.1.2
|
|
16
|
-
Requires-Dist: freyacli==0.5.
|
|
16
|
+
Requires-Dist: freyacli==0.5.1
|
|
17
17
|
Dynamic: author
|
|
18
18
|
Dynamic: author-email
|
|
19
19
|
Dynamic: classifier
|
|
@@ -16,8 +16,11 @@ molutils/_core/count.py
|
|
|
16
16
|
molutils/_core/extract.py
|
|
17
17
|
molutils/_core/list_.py
|
|
18
18
|
molutils/_core/remove.py
|
|
19
|
+
molutils/_core/traj.py
|
|
19
20
|
molutils/_ui/__init__.py
|
|
20
21
|
molutils/_ui/app_main.py
|
|
21
22
|
molutils/_ui/app_subcommand.py
|
|
22
23
|
molutils/_ui/fy_help.fyh
|
|
23
|
-
molutils/_ui/fy_rules.fyr
|
|
24
|
+
molutils/_ui/fy_rules.fyr
|
|
25
|
+
molutils/_utils/__init__.py
|
|
26
|
+
molutils/_utils/mda_utils.py
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
molsimple==0.1.2
|
|
2
|
-
freyacli==0.5.
|
|
2
|
+
freyacli==0.5.1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|