Package etomica.data

Defines structures that represent, generate, process, and output data from a simulation.

See:
          Description

Interface Summary
DataLogger.DataWriter Interface for a DataSink that actually writes data to a file
DataPipe Interface for an object through which data can flow.
DataPipeForked  
DataSet.DataCasterJudge  
DataSetListener Interface for a class that performs some action in response to a change in a DataSet instance.
DataSourceAtomic Interface for a DataSource that can return a value given an arbitrary atom.
DataSourceIndependent Interface for an object that can provide X Data objects on request.
DataSourceMolecular Interface for a DataSource that can return a value given an arbitrary atom.
DataSourcePositioned Interface for a DataSource that can return a value given an arbitrary position.
DataTableListener Interface for a class that performs some action in response to a change in a DataSinkTable instance.
IData Abstract container of simulation data and information describing it.
IDataInfo  
IDataSink A recipient of Data.
IDataSource  
IEtomicaDataInfo  
IEtomicaDataInfoFactory  
IEtomicaDataSource Interface for an object that can provide Data objects on request.
 

Class Summary
AccumulatorAverage Accumulator that keeps statistics for averaging and error analysis.
AccumulatorAverage.StatType Enumerated type that can be used to indicated the statistic to be taken from the accumulator (e.g., average, error, current value, etc.).
AccumulatorAverageCollapsing AccumulatorAverage that adjusts the block size during the simulation.
AccumulatorAverageCollapsingLog AccumulatorAverage that keeps track of block averages and standard deviations corresponding to all block sizes from 1 to the n where n is the largest power of 2 less than the current number of samples.
AccumulatorAverageCovariance Class that does the work of AccumulatorAverageFixed and also calculates the covariance of the incoming data values (the covariance of each value with each other value, as well as itself (which is actually its standard deviation)) as well as the covariance of the block averages of the different data quantities.
AccumulatorAverageCovariance.StatType  
AccumulatorAverageFixed AccumulatorAverage that maintains a fixed block size.
AccumulatorAverageFixedOutputFile AccumulatorAverage that maintains a fixed block size.
AccumulatorCounter Data processor that simply counts the number of times its addData method is invoked.
AccumulatorHistogram Accumulator that keeps histogram of data.
AccumulatorHistory Accumulator that keeps history of data.
AccumulatorHistory.DataSourceCount Simple DataSource to use as a default time DataSource.
AccumulatorRatioAverage Accumulator for calculating ratio between two sums
AccumulatorRatioAverage.StatType  
DataAccumulator DataProcessor that accumulates and transforms given data and intermittently transmits processed data to other DataSink(s).
DataArrayWriter A DataWriter that writes out data as a table with optional column headings
DataDump DataPump acts both as a DataSink and a DataSource.
DataFork DataSink that takes a data stream and forwards it across multiple sinks.
DataGroupFilter Extracts one or more of the Data instances wrapped in a DataGroup.
DataGroupSplitter DataSink that takes a DataGroup object and pushes each sub-Data object from the incoming DataGroup to a different stream.
DataHistogram DataProcessor that creates a histogram from each piece of data that comes in.
DataInfo Object associated with a Data instance and which provides descriptive information about the data encapsulated in it.
DataInfoFactory Interface for a mutable DataInfo factory.
DataLogger DataSink that manages a FileWriter and also listens to non-interval integrator events and sends appropriate data to a DataWriter.
DataProcessor An object that receives Data, processes it, and pushes the result on to a DataSink.
DataProcessorChemicalPotential DataProcessor that takes as input the average density and average Boltzmann factor profiles and calculates the chemical potential profile as the sum of the ideal gas contribution (kT ln()) and the excess chemical potential, (-kT ln()).
DataProcessorForked A DataProcessor that can handle multiple sinks, passing the same Data to each.
DataProcessorFunction Applies a simple scalar function to all elements of the Data that passes through.
DataProcessorInterfacialTension Data Processor that takes the virial components as input data and returns the interfacial tension.
DataPump A DataProcessor whose action is to actively take Data from a DataSource and send it to DataSinks.
DataPumpListener  
DataSet Receives and organizes data from multiple streams.
DataSet.DataSetSink A special DataSink used by the DataSet to receive Data and DataInfo from a single stream.
DataSinkConsole Writes data to console or another print stream.
DataSinkTable Receives data from multiple streams and organizes it in the form of a table, with each stream of data forming a column of the table.
DataSinkTable.DataCasterJudgeTable  
DataSourceAcceptanceProbability Data source giving the average acceptance probability of MCMove type moves.
DataSourceAcceptanceRatio Data source giving the acceptance rate of MCMove type moves.
DataSourceAtomDistance  
DataSourceCountCollisions This is a data source to count the number of collisions processed by a hard-potential integrator.
DataSourceCountSteps Data source that fronts the Integrator's step count as a piece of Data.
DataSourceCountTime Data source that keeps track of the elapsed simulation time of an MD integrator.
DataSourceFunction Datasource formed as a wrapper around a function.
DataSourceGroup Collects one or more data sources into a single DataSource.
DataSourceIndependentSimple A simple implementation of DataSourceIndependent objects can use if they cannot act as the DataSourceIndependent themselves (if perhaps they make multiple DataFunctions)
DataSourcePoints  
DataSourcePositionedBoltzmannFactor Calculates the Boltzmann factor at a position within a box a molecule of a particular species would have if it existed at that point.
DataSourceRmsVelocity Meter for the root-mean-square velocity of a set of atoms.
DataSourceScalar Particular data source for which the data is a simple scalar of type double.
DataSourceTensorVirialHard A MeterTensor that returns the virial component of the pressure tensor for a hard potential.
DataSourceUniform A DataSource object that provides a set of uniformly spaced values between two limits.
DataSourceUniform.LimitType Typed constant that indicates the way limits of the range are interpreted.
DataSplitter DataSink that takes a Data object and pushes each numerical value from the incoming Data to a different stream.
DataStreamAction  
DataTableAverages Data table that collects the AccumulatorAverage statistics for a collection of DataSource instances.
DataTableWriter A DataWriter that writes out data as a table with optional column headings
DataTag Class whose sole purpose is to implement Serializable so that data tags are serializable
 

Package etomica.data Description

Defines structures that represent, generate, process, and output data from a simulation. The data managed by these classes is typically that which would be considered the "results" of the simulation; data needed to conduct the simulation (such as the atom positions) are not normally handled by these classes.

The abstract class Data is the generic class for encapsulation of data. Major subclasses of it are defined in <@link etomica.data.types etomica.data.types>, and include (for example) classes that encapsulate primitives and primitive arrays (such as double and double[]). In addition to the actual data values, the Data class also holds an instance of DataInfo. The DataInfo holds information about the values held by the Data instance; in particular it has a descriptive String label and an instance of Dimension that indicates the physical dimensions of the data values. DataInfo also holds a DataFactory that can be used to construct new Data instances having the same type and structure as the Data holding the DataInfo (for more information about the structure of a Data instance, see the types package). DataInfo is declared final in Data, and is itself immutable. To change the information in DataInfo, it is necessary to change it in the DataSource, which should generate a new Data instance with the updated information.

A flow model is used to process data. Data instances are generated by a DataSource. A DataPump retrieves the Data from the DataSource and passes it to a DataSink; DataPump implements Action, so it can move Data in response to a user action or (more likely) an IntegratorEvent. The DataSink will process the Data (accumulate an average, for example), and if it implements DataPipe it may itself have a DataSink to which it pushes the output Data from its processing step (the output Data might be a different instance than the input). Thus the Data moves down the line until it reaches a DataSink that doesn't pass it further.

Before a Data instance can be sent through a sequence of data processing elements, it is necessary to first send through the DataInfo for the Data. This procedure alerts each element to the type and structure of the Data it can expect to receive. Some elements need to prepare by creating "scratch" Data instances, that they use to conduct their calculations; they do this using the DataFactory held by the DataInfo. The DataPump performs this preparation automatically.

Sometimes it is necessary for a Data instance to be cast to another Data type, one that a Data processing element is configured to handle. To treat this circumstance there are Data casters defined in etomica.data.types, which are DataProcessor subclasses to perform this transformation. These caster are inserted automatically, if needed, when a DataSink is added to a DataPipe.

Most DataSources are classes that perform some measurement on a Box; a DataSource of this variety is termed a Meter, many of which are defined in the package etomica.data.meter. Some DataSources are not connected to a Box; examples includes sources that report the simulation time, or yield the acceptance probability for a Monte Carlo trial. Some such classes are defined in this package (i.e., etomica.data).

Several Data instances can be bundled and processed as a single Data instance. DataGroup is configured to hold heterogeneous Data instances (having different type or structure); DataArray can hold multiple Data instances of the same type and structure (and sharing the same DataInfo). These classes are defined in etomica.data.types. Often Data collected this way must be "unpacked" at some point downstream; this is not easily done in a general way, and the developer must insert a DataGroupExtractor or DataGroupFilter that specifies how such Data are handled.