crisp-ase 1.1.2__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.
- CRISP/__init__.py +99 -0
- CRISP/_version.py +1 -0
- CRISP/cli.py +41 -0
- CRISP/data_analysis/__init__.py +38 -0
- CRISP/data_analysis/clustering.py +838 -0
- CRISP/data_analysis/contact_coordination.py +915 -0
- CRISP/data_analysis/h_bond.py +772 -0
- CRISP/data_analysis/msd.py +1199 -0
- CRISP/data_analysis/prdf.py +404 -0
- CRISP/data_analysis/volumetric_atomic_density.py +527 -0
- CRISP/py.typed +1 -0
- CRISP/simulation_utility/__init__.py +31 -0
- CRISP/simulation_utility/atomic_indices.py +155 -0
- CRISP/simulation_utility/atomic_traj_linemap.py +278 -0
- CRISP/simulation_utility/error_analysis.py +254 -0
- CRISP/simulation_utility/interatomic_distances.py +200 -0
- CRISP/simulation_utility/subsampling.py +241 -0
- CRISP/tests/DataAnalysis/__init__.py +1 -0
- CRISP/tests/DataAnalysis/test_clustering_extended.py +212 -0
- CRISP/tests/DataAnalysis/test_contact_coordination.py +184 -0
- CRISP/tests/DataAnalysis/test_contact_coordination_extended.py +465 -0
- CRISP/tests/DataAnalysis/test_h_bond_complete.py +326 -0
- CRISP/tests/DataAnalysis/test_h_bond_extended.py +322 -0
- CRISP/tests/DataAnalysis/test_msd_complete.py +305 -0
- CRISP/tests/DataAnalysis/test_msd_extended.py +522 -0
- CRISP/tests/DataAnalysis/test_prdf.py +206 -0
- CRISP/tests/DataAnalysis/test_volumetric_atomic_density.py +463 -0
- CRISP/tests/SimulationUtility/__init__.py +1 -0
- CRISP/tests/SimulationUtility/test_atomic_traj_linemap.py +101 -0
- CRISP/tests/SimulationUtility/test_atomic_traj_linemap_extended.py +469 -0
- CRISP/tests/SimulationUtility/test_error_analysis_extended.py +151 -0
- CRISP/tests/SimulationUtility/test_interatomic_distances.py +223 -0
- CRISP/tests/SimulationUtility/test_subsampling.py +365 -0
- CRISP/tests/__init__.py +1 -0
- CRISP/tests/test_CRISP.py +28 -0
- CRISP/tests/test_cli.py +87 -0
- CRISP/tests/test_crisp_comprehensive.py +679 -0
- crisp_ase-1.1.2.dist-info/METADATA +141 -0
- crisp_ase-1.1.2.dist-info/RECORD +42 -0
- crisp_ase-1.1.2.dist-info/WHEEL +5 -0
- crisp_ase-1.1.2.dist-info/entry_points.txt +2 -0
- crisp_ase-1.1.2.dist-info/top_level.txt +1 -0
CRISP/__init__.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""A python package for Post-simulation analysis and visualization"""
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
"cli",
|
|
5
|
+
"data_analysis",
|
|
6
|
+
"simulation_utility",
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
from ._version import __version__
|
|
10
|
+
|
|
11
|
+
from . import cli
|
|
12
|
+
from . import data_analysis
|
|
13
|
+
from . import simulation_utility
|
|
14
|
+
|
|
15
|
+
# Re-export commonly used classes and functions for convenience
|
|
16
|
+
# This allows both import styles:
|
|
17
|
+
# Old style: from CRISP.data_analysis.prdf import Analysis
|
|
18
|
+
# New style: from CRISP import Analysis
|
|
19
|
+
|
|
20
|
+
# Data analysis imports
|
|
21
|
+
from .data_analysis.prdf import (
|
|
22
|
+
check_cell_and_r_max,
|
|
23
|
+
compute_pairwise_rdf,
|
|
24
|
+
plot_rdf,
|
|
25
|
+
animate_rdf,
|
|
26
|
+
analyze_rdf,
|
|
27
|
+
Analysis
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
from .data_analysis.clustering import (
|
|
31
|
+
analyze_frame,
|
|
32
|
+
analyze_trajectory,
|
|
33
|
+
cluster_analysis,
|
|
34
|
+
save_analysis_results,
|
|
35
|
+
plot_analysis_results,
|
|
36
|
+
cluster_analysis
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
from .data_analysis.contact_coordination import (
|
|
40
|
+
indices,
|
|
41
|
+
coordination_frame,
|
|
42
|
+
coordination,
|
|
43
|
+
contacts_frame,
|
|
44
|
+
contacts
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
from .data_analysis.h_bond import (
|
|
48
|
+
indices,
|
|
49
|
+
count_hydrogen_bonds,
|
|
50
|
+
aggregate_data,
|
|
51
|
+
hydrogen_bonds
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
from .data_analysis.msd import (
|
|
55
|
+
read_trajectory_chunk,
|
|
56
|
+
calculate_frame_msd,
|
|
57
|
+
calculate_msd,
|
|
58
|
+
calculate_save_msd,
|
|
59
|
+
msd_analysis
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
from .data_analysis.volumetric_atomic_density import (
|
|
63
|
+
create_density_map,
|
|
64
|
+
VDW_RADII,
|
|
65
|
+
ELEMENT_COLORS
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# Simulation utility imports
|
|
69
|
+
from .simulation_utility.atomic_indices import (
|
|
70
|
+
atom_indices,
|
|
71
|
+
run_atom_indices
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
from .simulation_utility.atomic_traj_linemap import (
|
|
75
|
+
plot_atomic_trajectory,
|
|
76
|
+
VDW_RADII,
|
|
77
|
+
ELEMENT_COLORS
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
from .simulation_utility.error_analysis import (
|
|
81
|
+
optimal_lag,
|
|
82
|
+
vector_acf,
|
|
83
|
+
autocorrelation_analysis,
|
|
84
|
+
block_analysis
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
from .simulation_utility.interatomic_distances import (
|
|
88
|
+
indices,
|
|
89
|
+
distance_calculation,
|
|
90
|
+
save_distance_matrices,
|
|
91
|
+
calculate_interatomic_distances
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
from .simulation_utility.subsampling import (
|
|
95
|
+
indices,
|
|
96
|
+
compute_soap,
|
|
97
|
+
create_repres,
|
|
98
|
+
subsample
|
|
99
|
+
)
|
CRISP/_version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.2"
|
CRISP/cli.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Command-line interface for CRISP."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import sys
|
|
5
|
+
from CRISP._version import __version__
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
"""Main CLI entry point."""
|
|
10
|
+
parser = argparse.ArgumentParser(
|
|
11
|
+
prog='crisp',
|
|
12
|
+
description='CRISP: Computational Research Infrastructure for Spectroscopy and Properties'
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
parser.add_argument(
|
|
16
|
+
'--version',
|
|
17
|
+
action='version',
|
|
18
|
+
version=f'CRISP {__version__}'
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
subparsers = parser.add_subparsers(dest='command', help='Available commands')
|
|
22
|
+
|
|
23
|
+
# Test command
|
|
24
|
+
test_parser = subparsers.add_parser('test', help='Run tests')
|
|
25
|
+
test_parser.add_argument('--verbose', '-v', action='store_true', help='Verbose output')
|
|
26
|
+
|
|
27
|
+
args = parser.parse_args()
|
|
28
|
+
|
|
29
|
+
if args.command == 'test':
|
|
30
|
+
run_tests(verbose=args.verbose)
|
|
31
|
+
elif args.command is None:
|
|
32
|
+
parser.print_help()
|
|
33
|
+
sys.exit(1)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def run_tests(verbose=False):
|
|
37
|
+
"""Run package tests."""
|
|
38
|
+
import pytest
|
|
39
|
+
args = ['-v'] if verbose else []
|
|
40
|
+
sys.exit(pytest.main(args))
|
|
41
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# CRISP/data_analysis/__init__.py
|
|
2
|
+
"""Data analysis module for molecular dynamics trajectory analysis."""
|
|
3
|
+
|
|
4
|
+
from .contact_coordination import *
|
|
5
|
+
from .h_bond import *
|
|
6
|
+
from .prdf import *
|
|
7
|
+
from .msd import *
|
|
8
|
+
from .clustering import *
|
|
9
|
+
from .volumetric_atomic_density import *
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
# Contact coordination functions
|
|
13
|
+
'indices',
|
|
14
|
+
'coordination_frame',
|
|
15
|
+
'coordination',
|
|
16
|
+
'contacts_frame',
|
|
17
|
+
'contacts',
|
|
18
|
+
# H-bond functions
|
|
19
|
+
'count_hydrogen_bonds',
|
|
20
|
+
'aggregate_data',
|
|
21
|
+
'hydrogen_bonds',
|
|
22
|
+
# RDF functions
|
|
23
|
+
'check_cell_and_r_max',
|
|
24
|
+
'compute_pairwise_rdf',
|
|
25
|
+
'analyze_rdf',
|
|
26
|
+
# MSD functions
|
|
27
|
+
'read_trajectory_chunk',
|
|
28
|
+
'calculate_frame_msd',
|
|
29
|
+
'calculate_msd',
|
|
30
|
+
'calculate_save_msd',
|
|
31
|
+
'msd_analysis',
|
|
32
|
+
# Clustering
|
|
33
|
+
'analyze_frame',
|
|
34
|
+
'analyze_trajectory',
|
|
35
|
+
# Volumetric density
|
|
36
|
+
'create_density_map',
|
|
37
|
+
]
|
|
38
|
+
|