Skip to content

Commit

Permalink
ajc: rename ajcs to ajc
Browse files Browse the repository at this point in the history
  • Loading branch information
axsk committed Feb 23, 2021
1 parent 61c2f6a commit 4589d52
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 27 deletions.
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
current
====
* New augmented jump chain module
* ajc.py: New augmented jump chain module
* Sparse implementation for the computation of the transition kernel, koopman operators and space-time-committors
* schur.py
* allow sensivity and iteration adjustment for the KrylovSchur solver
* change tolerance to absolute value
* pcca.py
* fix memory allocation for sparse systems

0.2.1
=====
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This Python library implements a suite of tools used and/or developed in the [Co

## Contents
* `pcca`: An implementation of (generalized) PCCA⁺ using the Schur decomposition
* `ajcs`: A sparse implementation of the augmented jump chain
* `ajc`: A sparse implementation of the augmented jump chain
* `diffusionmaps`: Diffusionmaps with sparse support and out of sample extensions
* `galerkin`: Trajectory based estimation of the transfer operator using a Galerkin projection onto Gaussian RBFs
* `gillespie`: Trajectory simulation from a generator
Expand Down
2 changes: 1 addition & 1 deletion examples/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"metadata": {},
"outputs": [],
"source": [
"ajc = cmdtools.estimation.ajcs.AJCS(qs, dts) # construct the augmented jump chain"
"ajc = cmdtools.estimation.ajc.AJC(qs, dts) # construct the augmented jump chain"
]
},
{
Expand Down
78 changes: 60 additions & 18 deletions examples/papermsnd.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cmdtools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .analysis import pcca, schur, optimization
from .estimation import diffusionmaps, galerkin, gillespie, newton_generator, picking_algorithm, sqra, voronoi, ajcs
from .estimation import diffusionmaps, galerkin, gillespie, newton_generator, picking_algorithm, sqra, voronoi, ajc
from .systems import diffusion
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from scipy.optimize import minimize


class AJCS():
class AJC():
""" sparse implementation of the Galerkin discretization to the AJC as in the preprint
uses the """

Expand Down
8 changes: 4 additions & 4 deletions tests/test_ajc.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from cmdtools.systems import diffusion
from cmdtools.estimation import ajcs
from cmdtools.estimation import ajc
import numpy as np
from scipy.linalg import expm


def test_ajc(n=20, tol=1e-2):
Q = diffusion.DoubleWell().Q
ts = np.repeat(1/n, n)
a = ajcs.AJCS(np.repeat(Q, n), ts)
a = ajc.AJC(np.repeat(Q, n), ts)

assert np.isclose(expm(Q).todense(), a.koopman(), atol=tol).all()

Expand All @@ -19,7 +19,7 @@ def test_ajc(n=20, tol=1e-2):

def test_limit(tol=1e-5):
Q = diffusion.DoubleWell().Q
a0 = ajcs.AJCS([Q, Q, Q], [0,1,0])
a1 = ajcs.AJCS([Q, Q, Q], [1e-10, 1, 1e-10])
a0 = ajc.AJC([Q, Q, Q], [0,1,0])
a1 = ajc.AJC([Q, Q, Q], [1e-10, 1, 1e-10])

assert np.isclose(a1.koopman(), a0.koopman(), atol=tol).all()

0 comments on commit 4589d52

Please sign in to comment.