The metrics and methods in the encore module are from ([TPB+15]). Please cite them when using the MDAnalysis.analysis.encore module in published work.

[1]:

importMDAnalysisasmdafromMDAnalysis.tests.datafilesimport(PSF,DCD,DCD2,GRO,XTC,PSF_NAMD_GBIS,DCD_NAMD_GBIS)fromMDAnalysis.analysisimportencorefromMDAnalysis.analysis.encore.dimensionality_reductionimportDimensionalityReductionMethodasdrmimportnumpyasnpimportmatplotlib.pyplotasplt# This import registers a 3D projection, but is otherwise unused.frommpl_toolkits.mplot3dimportAxes3D%matplotlib inline

The similarity of each probability density function is compared using the Jensen-Shannon divergence. This divergence has an upper bound of \(\ln{(2)}\) and a lower bound of 0.0. Normally, \(\ln{(2)}\) represents no similarity between the ensembles, and 0.0 represents identical conformational ensembles. However, due to the stochastic nature of the dimension reduction, two identical symbols will not necessarily result in an exact divergence of 0.0. In addition, calculating the similarity
with dres() twice will result in similar but not identical numbers.

You do not need to align your trajectories, as the function will align it for you (along your selection atoms, which are selection='nameCA' by default).

[4]:

dres0,details0=encore.dres([u1,u2,u3])

encore.dres returns two outputs. dres0 is the similarity matrix for the ensemble of trajectories.

Dimension reduction methods should be subclasses of analysis.encore.dimensionality_reduction.DimensionalityReductionMethod, initialised with your chosen parameters.

Below, we set up stochastic proximity embedding scheme, which maps data to lower dimensions by iteratively adjusting the distance between a pair of points on the lower-dimensional map to match their full-dimensional proximity. The learning rate controls the magnitude of these adjustments, and decreases over the mapping from max_lam (default: 2.0) to min_lam (default: 0.1) to avoid numerical oscillation. The learning rate is updated every cycle for ncycles, over which nstep
adjustments are performed.

The number of dimensions to map to is controlled by the keyword dimension (default: 2).