EMD File¶
This module defines functions for parsing and writing EMD map files.

class
TRNET
(n_nodes)[source]¶ Class for building topology representing networks using EM density maps. It uses the algorithm described in [TM94].
[TM94] Martinetz T, Schulten K, Topology Representing Networks. Neural Networks 1994 7(3):507552. 
run
(**kwargs)[source]¶ Parameters:  tmax (int) – multiplicative factor such that the maximum total number of iterations is tmax times the number of beads default 200
 li (float) – initial Gaussian bandwidth for determining how much each node is moved As the iterations progress, the bandwidth increases from li to lf. default 0.2
 lf (float) – final Gaussian bandwidth for determining how much each node is moved As the iterations progress, the bandwidth increases from li to lf. default 0.01
 ei (float) – initial value of the adaptive step size As the iterations progress, the step size increases from ei to ef. default 0.3
 ef (float) – final value of the adaptive step size As the iterations progress, the step size increases from ei to ef. default 0.05
 c (float) – cutoff for moving the nodes. When c=0, all nodes are moved in each iteration. When c>0, only the nearest c/#nodes nodes are moved. This parameter is used for optimization. default 0
 calcC (bool) – whether to calculate the connectivity matrix from TRN. This is False by default because the connectivity is usually built by ANM or GNM. default False
 Ti (float) – initial value of the adaptive threshold for building the connectivity. Not used if calcC is False. default 0.1
 Tf (float) – final value of the adaptive threshold for building the connectivity. Not used if calcC is False. default 2


class
EMDMAP
(stream, min_cutoff, max_cutoff)[source]¶ Class for handling EM density maps in EMD/MRC2014 format.
Parameters:  stream – a file stream containing data from an EMD/MRC file.
 min_cutoff (None, float) – minimum cutoff for thresholding
 max_cutoff (None, float) – maximum cutoff for thresholding

coordinate
(sec, row, col)[source]¶ Given a position as sec, row and col, it will return its coordinate in Angstroms.

numidx2matidx
(numidx)[source]¶ Given index of the position, it will return the numbers of section, row and column.

thresholdMap
(min_cutoff=None, max_cutoff=None)[source]¶ Thresholds a map and returns a new map like the equivalent function in TEMPy

apix
¶

filename
¶

origin
¶

parseEMDStream
(stream, **kwargs)[source]¶ Parse lines of data stream from an EMD/MRC2014 file and optionally return an
AtomGroup
containing TRN nodes based on it.Parameters: stream – Any object with the method readlines
(e.g.file
, buffer, stdin)

parseEMD
(emd, **kwargs)[source]¶ Parses an EM density map in EMD/MRC2014 format and optionally returns an
AtomGroup
containing beads built in the density using the TRN algorithm [_TM94].This function extends
parseEMDStream()
.See CryoEM Dynamics (CryoDy) for a usage example.
Parameters:  emd (str) – an EMD identifier or a file name. A 4digit EMDataBank identifier can be provided to download it via FTP.
 min_cutoff (float) – minimum density cutoff to read EMD map. The regions with lower density than this cutoff are discarded. This corresponds to the previous cutoff and take values from it.
 max_cutoff (float) – maximum density cutoff to read EMD map. The regions with higher density than this cutoff are discarded.
 n_nodes (int) – A bead based network will be constructed into the provided density map.
This parameter will set the number of beads to fit to density map.
Default is 0. Please change it to some number to run the TRN algorithm.
Other parameters are passed through as kwargs to
TRNET.run()
as described in its docs.  map (bool) – Return the density map itself. Default is False in line with previous behaviour. This value is reset to True if n_nodes is 0 or less.