public class PrototypeDataset extends CompositionDataset
Information about each site must be specified with a file in the following format:
<# of atoms on Site1> [-omit] [-equiv <site #s...>]
<# of atoms on Site2> [-omit] [-equiv <site #s...>]
Here sites (aka sublattices) can be occupied by a single kind of atom, and are treated as symmetrically distinct unless otherwise specified. Information about each site is used to calculate attributes unless otherwise indicated by an "-omit" flag. It is possible to mark equivalent sites using the "-equiv" flag.
The required format of data files is very similar to that of a CompositionDataset:
Identity [<property1 Name>] [<property2 Name>] [...]
<A site Element><B site Element><...> <property1 value> [...]
{<Composition of Site A>}{<Composition of Site B} <property1 value> [...]
[and so on]
It is important that you can define the identity of an crystal by either specifying the
element present on each site, or by specifying the composition of the elements occupying that
site. The latter option allows this class to handle mixing on a certain atomic site. Note that this
does not consider the ordering (or lack there of) on that sublattice.
Usage: <Structure description filename>
Modifier and Type | Field and Description |
---|---|
protected PrototypeSiteInformation |
SiteInfo
Stores information about each site
|
DataDirectory, ElementalProperties, ElementNames, ElementPairProperties, OxidationStates, PairPropertyData, PropertyData, SortingOrder
AttributeName, Entries, Expanders, Generators
Constructor and Description |
---|
PrototypeDataset()
Create a prototype dataset with default attribute
|
PrototypeDataset(boolean useDefaultGenerators)
Create a prototype dataset.
|
Modifier and Type | Method and Description |
---|---|
PrototypeEntry |
addEntry(java.lang.String input)
A new entry by parsing an input string.
|
PrototypeDataset |
emptyClone()
Creates a new instance with the same class and attribute names, but
without any entries.
|
PrototypeEntry |
getEntry(int index)
Retrieve a single entry from the dataset
|
PrototypeSiteInformation |
getSiteInfo()
Get information about each site in this prototype structure
|
void |
importText(java.lang.String filename,
java.lang.Object[] options)
Read in an dataset from file.
|
int |
NSites() |
java.lang.String |
printUsage()
Print out required format for options.
|
void |
readStructureInformation(java.lang.String filename)
Read information about a prototype crystal structure from file.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
setSiteInfo(PrototypeSiteInformation SiteInfo)
Define information about the prototypes contained by this dataset.
|
addElementalProperty, addElementalPropertySet, addElementPairProperty, addGeneratedElementPairProperty, calculateAttributes, compositionCanFormIonic, createTemplate, getDataDirectory, getElementalProperties, getElementPairProperties, getOxidationStates, getPairPropertyLookupTable, getPropertyLookupTable, getSortingOrder, printEntryDescription, removeElementalProperty, removeElementPairProperty, runAttributeCommand, runCommand, runPairPropertyCommand, runPropertyCommand, saveCommand, setDataDirectory, useCompositionAsAttributes
addEntries, addEntries, addEntry, addProperty, addProperty, clearPropertyData, combine, definePropertyNames, getClassNames, getMeasuredPropertyArray, getMeasuredPropertyArray, getPredictedPropertyArray, getPredictedPropertyArray, getPropertyClassCount, getPropertyClasses, getPropertyClasses, getPropertyIndex, getPropertyName, getPropertyNames, getTargetPropertyIndex, getTargetPropertyName, hasProperty, importEntryProperties, importPropertyNames, NClasses, NProperties, setClassNames, setPropertyClasses, setTargetProperty, setTargetProperty, toJSON, toString, usingPropertyAsClass
about, addAttribute, addAttributeExpander, addAttributeGenerator, addAttributes, clearAttributeExpanders, clearAttributeGenerators, clearAttributes, clearData, clone, combine, combine, containsEntry, deleteMeasuredClasses, deletePredictedClasses, finalizeGeneration, generateAttributes, getAttributeArray, getAttributeExpanders, getAttributeGenerators, getAttributeIndex, getAttributeName, getAttributeNames, getCitations, getClassName, getClassProbabilityArray, getDistribution, getDistributionCount, getDuplicates, getEntries, getEntriesWriteAccess, getEntryArray, getMeasuredClassArray, getPredictedClassArray, getRandomSplit, getRandomSplit, getRandomSplit, getRandomSplit, getRandomSubset, getRandomSubset, getSingleAttributeArray, getSubset, getTrainingExamples, getUniqueEntries, loadState, matchEntries, NAttributes, NEntries, partition, partition, printAttributeDescription, printCommand, printDescription, printDistribution, printEntries, removeDuplicates, resolveDuplicates, restoreAttributes, runAttributeExpanders, runAttributeExpansionCommand, runAttributeGeneratorCommand, runAttributeGenerators, saveState, saveTemplate, setAttributeNames, setClassProbabilities, setMeasuredClasses, setPredictedClasses, splitForThreading, splitIntoFolds, splitIntoFolds, subtract, transferToWeka
protected PrototypeSiteInformation SiteInfo
public PrototypeDataset()
public PrototypeDataset(boolean useDefaultGenerators)
useDefaultGenerators
- Whetherpublic void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
setOptions
in interface Options
setOptions
in class Dataset
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
printUsage
in interface Options
printUsage
in class Dataset
public PrototypeDataset emptyClone()
Dataset
emptyClone
in class CompositionDataset
public void readStructureInformation(java.lang.String filename) throws java.lang.Exception
filename
- File containing structure information.java.lang.Exception
- If file fails to parsepublic void setSiteInfo(PrototypeSiteInformation SiteInfo)
NOTE: This will clear all existing data
SiteInfo
- Object describing the number of atoms on each site, etc.public PrototypeSiteInformation getSiteInfo()
public void importText(java.lang.String filename, java.lang.Object[] options) throws java.lang.Exception
CompositionDataset
importText
in class CompositionDataset
filename
- Path of file to be importedoptions
- Any options used to control importjava.lang.Exception
- If text import failspublic int NSites()
public PrototypeEntry getEntry(int index)
Dataset
getEntry
in class CompositionDataset
index
- Index of entrypublic PrototypeEntry addEntry(java.lang.String input) throws java.lang.Exception
Dataset
addEntry
in class CompositionDataset
input
- String describing the entryjava.lang.Exception
- If conversion fails