t1t2ne 0.0.2.dev0__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.
Files changed (31) hide show
  1. t1t2ne-0.0.2.dev0/LICENSE.txt +68 -0
  2. t1t2ne-0.0.2.dev0/PKG-INFO +25 -0
  3. t1t2ne-0.0.2.dev0/README.md +5 -0
  4. t1t2ne-0.0.2.dev0/pyproject.toml +40 -0
  5. t1t2ne-0.0.2.dev0/setup.cfg +4 -0
  6. t1t2ne-0.0.2.dev0/t1t2ne/__init__.py +17 -0
  7. t1t2ne-0.0.2.dev0/t1t2ne/cli.py +51 -0
  8. t1t2ne-0.0.2.dev0/t1t2ne/scripts/__init__.py +3 -0
  9. t1t2ne-0.0.2.dev0/t1t2ne/scripts/base.py +25 -0
  10. t1t2ne-0.0.2.dev0/t1t2ne/scripts/create_registry.py +26 -0
  11. t1t2ne-0.0.2.dev0/t1t2ne/scripts/f_ParaMeters_relax.py +480 -0
  12. t1t2ne-0.0.2.dev0/t1t2ne/scripts/f_findfs.py +133 -0
  13. t1t2ne-0.0.2.dev0/t1t2ne/scripts/f_fit.py +227 -0
  14. t1t2ne-0.0.2.dev0/t1t2ne/scripts/fun_hetrelax_models.py +373 -0
  15. t1t2ne-0.0.2.dev0/t1t2ne/scripts/hydrodynamics_utils.py +45 -0
  16. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_configure.py +95 -0
  17. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_interactive.py +288 -0
  18. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_makelists.py +198 -0
  19. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_ns.py +213 -0
  20. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_setuptract.py +92 -0
  21. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_solventpre.py +128 -0
  22. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_tract.py +648 -0
  23. t1t2ne-0.0.2.dev0/t1t2ne/scripts/t1t2ne_utils.py +742 -0
  24. t1t2ne-0.0.2.dev0/t1t2ne/scripts/textcolor.py +31 -0
  25. t1t2ne-0.0.2.dev0/t1t2ne/scripts/tract_extra.py +27 -0
  26. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/PKG-INFO +25 -0
  27. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/SOURCES.txt +29 -0
  28. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/dependency_links.txt +1 -0
  29. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/entry_points.txt +2 -0
  30. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/requires.txt +9 -0
  31. t1t2ne-0.0.2.dev0/t1t2ne.egg-info/top_level.txt +1 -0
@@ -0,0 +1,68 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ [...]
14
+
15
+ (Full standard GPL v3 text omitted for brevity.
16
+ Download the complete version from:
17
+ https://www.gnu.org/licenses/gpl-3.0.txt )
18
+
19
+ PROGRAM-SPECIFIC INFORMATION
20
+
21
+ Program name: t1t2ne
22
+ Author: Enrico Ravera, Francesco Bruno, and Letizia Fiorucci
23
+ Version: 0.0.2
24
+ Year: 2026
25
+
26
+ This program is distributed under the terms of the GNU General Public
27
+ License version 3 or (at your option) any later version.
28
+
29
+ ===============================================================================
30
+ *** IMPORTANT – LIABILITY DISCLAIMER ***
31
+ ===============================================================================
32
+
33
+ This software (t1t2ne) calculates technical parameters for the acquisition
34
+ of Nuclear Magnetic Resonance (NMR) experiments.
35
+
36
+ The use of certain parameters suggested or generated by this program may,
37
+ under some conditions, cause:
38
+
39
+ - physical damage to the NMR spectrometer
40
+ - overheating of probes or amplifiers
41
+ - destruction of expensive electronic components
42
+ - data loss or interruption of long acquisitions
43
+
44
+ The author and all contributors DISCLAIM ANY AND ALL LIABILITY
45
+ for any direct or indirect damage, economic or material, arising from
46
+ the use (correct or incorrect) of parameters generated by this software.
47
+
48
+ NO AUTOMATIC HARDWARE SAFETY CHECK is implemented in this software.
49
+ The warnings present in the program are for informational purposes only
50
+ and do not replace critical and responsible evaluation by the user.
51
+
52
+ The end user is solely responsible for the safety of the hardware and
53
+ for the scientific correctness of the parameters used.
54
+
55
+ By using this program, you expressly accept these terms and acknowledge
56
+ that you are aware of the associated risks.
57
+
58
+ ===============================================================================
59
+
60
+ The program is provided "AS IS", WITHOUT ANY WARRANTY OF ANY KIND,
61
+ express or implied, including but not limited to the implied warranties
62
+ of merchantability or fitness for a particular purpose. See the GNU GPL v3
63
+ for full details.
64
+
65
+ For the complete text of the license, refer to:
66
+ https://www.gnu.org/licenses/gpl-3.0.txt
67
+
68
+ End of license.
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: t1t2ne
3
+ Version: 0.0.2.dev0
4
+ Project-URL: Homepage, https://github.com/enricoravera/t1ttune
5
+ Project-URL: Repository, https://github.com/enricoravera/t1ttune.git
6
+ Project-URL: Documentation, https://t1ttune.readthedocs.io
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE.txt
10
+ Requires-Dist: klassez>=0.1.0
11
+ Requires-Dist: numpy
12
+ Requires-Dist: scipy
13
+ Requires-Dist: lmfit
14
+ Requires-Dist: numdifftools
15
+ Requires-Dist: seaborn
16
+ Requires-Dist: nmrglue
17
+ Requires-Dist: matplotlib>=3.8
18
+ Requires-Dist: csaps
19
+ Dynamic: license-file
20
+
21
+ # **T1-T2-ne**
22
+
23
+ This software computes the optimal delays for protein dynamics experiments.
24
+
25
+ Full documentation is available at [https://t1ttune.readthedocs.io/en/latest/](https://t1ttune.readthedocs.io/en/latest/).
@@ -0,0 +1,5 @@
1
+ # **T1-T2-ne**
2
+
3
+ This software computes the optimal delays for protein dynamics experiments.
4
+
5
+ Full documentation is available at [https://t1ttune.readthedocs.io/en/latest/](https://t1ttune.readthedocs.io/en/latest/).
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "t1t2ne"
7
+ version = "0.0.2.dev0"
8
+ description = ""
9
+ requires-python = ">=3.10"
10
+ dependencies = [
11
+ 'klassez>=0.1.0',
12
+ 'numpy',
13
+ 'scipy',
14
+ 'lmfit',
15
+ 'numdifftools',
16
+ 'seaborn',
17
+ 'nmrglue',
18
+ 'matplotlib>=3.8',
19
+ 'csaps',
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = 'https://github.com/enricoravera/t1ttune'
24
+ Repository = 'https://github.com/enricoravera/t1ttune.git'
25
+ Documentation = 'https://t1ttune.readthedocs.io'
26
+
27
+ [tool.setuptools.packages.find]
28
+ where = ['.']
29
+ include = ['t1t2ne*']
30
+
31
+ [tool.setuptools.package-data]
32
+ t1ttune = ['*.txt', '*.md', '*.yaml']
33
+
34
+ [project.readme]
35
+ file = "README.md"
36
+ content-type = "text/markdown"
37
+
38
+ [project.scripts]
39
+ t1ttune = "t1t2ne.cli:main"
40
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
1
+ #! /usr/bin/env python3
2
+
3
+ """
4
+ T1Ttune package for computing the optimal parameters for protein dynamics NMR experiments.
5
+
6
+ The package includes modules for computing:
7
+
8
+ * Relaxation rates (R1, R2, NOE) based on a spectral density function and the provided correlation times and order parameters.
9
+ * The optimal set of relaxation delays for each experiment (module `t1ttune_makelists`).
10
+ * The optimal number of scans for each experiment (module `t1ttune_ns`).
11
+ * The optimal list for setting up a TRACT experiment (module `t1ttune_setuptract`).
12
+ * The correlation times or order parameters from a TRACT experiment (module `t1ttune_tract`).
13
+
14
+ """
15
+
16
+ __version__ = "0.0.2.dev1"
17
+ __author__ = "Enrico Ravera, Francesco Bruno, Letizia Fiorucci"
@@ -0,0 +1,51 @@
1
+ #! /usr/bin/env python3
2
+
3
+ import argparse
4
+ import sys
5
+
6
+ from .scripts.__init__ import registry
7
+
8
+
9
+ def main():
10
+ # Top-level parser — mostra i sottocomandi disponibili nell'help
11
+ parser = argparse.ArgumentParser(
12
+ prog="t1ttune",
13
+ description="Main program. Select a subcommand to start.",
14
+ formatter_class=argparse.RawDescriptionHelpFormatter,
15
+ epilog=_build_commands_epilog(),
16
+ )
17
+
18
+ subparsers = parser.add_subparsers(
19
+ dest="command",
20
+ metavar="<command>",
21
+ )
22
+
23
+ # Registra dinamicamente ogni sottocomando trovato nel registry
24
+ for name, cmd in registry.items():
25
+ sub = subparsers.add_parser(
26
+ name,
27
+ help=cmd.SHORT_HELP, # mostrato in: M --help
28
+ description=cmd.DESCRIPTION, # mostrato in: M T1 --help
29
+ formatter_class=argparse.RawDescriptionHelpFormatter,
30
+ )
31
+ cmd.add_arguments(sub) # ogni comando aggiunge i propri argomenti
32
+
33
+ # Se invocato senza sottocomando → mostra help
34
+ if len(sys.argv) == 1:
35
+ parser.print_help()
36
+ sys.exit(0)
37
+
38
+ args = parser.parse_args()
39
+ registry[args.command].run(args)
40
+
41
+
42
+ def _build_commands_epilog() -> str:
43
+ """Costruisce la sezione descrittiva dei comandi per l'help globale."""
44
+ if not registry:
45
+ return ""
46
+ lines = ["Available commands:"]
47
+ for name, cmd in registry.items():
48
+ lines.append(f" {name:<12} {cmd.SHORT_HELP}")
49
+ lines.append("")
50
+ lines.append("Use 't1ttune <command> --help' for details on each command.")
51
+ return "\n".join(lines)
@@ -0,0 +1,3 @@
1
+ #! /usr/bin/env python3
2
+
3
+ from .create_registry import registry
@@ -0,0 +1,25 @@
1
+ #! /usr/bin/env python3
2
+
3
+ import argparse
4
+ from abc import ABC, abstractmethod
5
+
6
+
7
+ class BaseCommand(ABC):
8
+ # Testo breve mostrato nell'elenco di `M --help`
9
+ SHORT_HELP: str = "(nessuna descrizione)"
10
+
11
+ # Testo esteso mostrato in `M <comando> --help`
12
+ DESCRIPTION: str = ""
13
+
14
+ @staticmethod
15
+ @abstractmethod
16
+ def add_arguments(parser: argparse.ArgumentParser) -> None:
17
+ """Aggiunge gli argomenti specifici di questo comando al parser."""
18
+ ...
19
+
20
+ @staticmethod
21
+ @abstractmethod
22
+ def run(args: argparse.Namespace) -> None:
23
+ """Esegue la logica del comando."""
24
+ ...
25
+
@@ -0,0 +1,26 @@
1
+ #! /usr/bin/env python3
2
+
3
+ """
4
+ Registry dei sottocomandi.
5
+
6
+ """
7
+
8
+ from t1t2ne.scripts.t1t2ne_configure import ConfigureCmd
9
+ from t1t2ne.scripts.t1t2ne_makelists import MakeListsCmd
10
+ from t1t2ne.scripts.t1t2ne_setuptract import SetupTractCmd
11
+ from t1t2ne.scripts.t1t2ne_tract import TractCmd
12
+ from t1t2ne.scripts.t1t2ne_ns import NSCmd
13
+ from t1t2ne.scripts.t1t2ne_interactive import InteractiveCmd
14
+ from t1t2ne.scripts.t1t2ne_solventpre import SPREListsCmd
15
+
16
+ registry = {
17
+ "makelists": MakeListsCmd,
18
+ "solventpre": SPREListsCmd,
19
+ #"shuttle": ShuttleCmd,
20
+ "setuptract": SetupTractCmd,
21
+ "configure": ConfigureCmd,
22
+ "ns": NSCmd,
23
+ "tract": TractCmd,
24
+ "interactive": InteractiveCmd,
25
+ }
26
+