public class CrystalStructureDataset extends CompositionDataset
How to Import Files:
Rather than importing data from a single file with the importText(java.lang.String, java.lang.Object[]) operation, this class imports all the files in a given directory. These files must be VASP 5 POSCAR files. Any files that are not in this format will be ignored.
In order to provide properties about these structures, add a "properties.txt" file to the POSCAR-containing directory. This file should be in the following format
filename <property #1 name> <...>
<name of POSCAR> <property #1 of that structure> <...>
This file follows similar rules to that of CompositionDataset
Implemented Save Formats
poscar - Save dataset as a directory full of POSCARs.
Usage: *No options*
Properties of each entry will be saved in a file in that
directory named "properties.txt"
DataDirectory, ElementalProperties, ElementNames, ElementPairProperties, OxidationStates, PairPropertyData, PropertyData, SortingOrderAttributeName, Entries, Expanders, Generators| Constructor and Description |
|---|
CrystalStructureDataset()
Create a instance with the default attribute generators
|
CrystalStructureDataset(boolean useDefaultGenerators)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
CrystalStructureEntry |
addEntry(java.lang.String input)
A new entry by parsing an input string.
|
CrystalStructureDataset |
clone()
Creates a new instance of this dataset, and clones of each entry.
|
CrystalStructureDataset |
emptyClone()
Creates a new instance with the same class and attribute names, but
without any entries.
|
CrystalStructureEntry |
getEntry(int index)
Retrieve a single entry from the dataset
|
void |
importText(java.lang.String directory,
java.lang.Object[] options)
Import all structure files in a directory.
|
void |
runAttributeGenerators()
Expand the list of attributes using the currently-set list of attribute
generators.
|
java.lang.String |
saveCommand(java.lang.String Basename,
java.lang.String Format)
Handles complicated saving commands.
|
void |
writePOSCARs(java.lang.String directory)
Save dataset as a directory full of POSCARs.
|
addElementalProperty, addElementalPropertySet, addElementPairProperty, addGeneratedElementPairProperty, calculateAttributes, compositionCanFormIonic, createTemplate, getDataDirectory, getElementalProperties, getElementPairProperties, getOxidationStates, getPairPropertyLookupTable, getPropertyLookupTable, getSortingOrder, printEntryDescription, removeElementalProperty, removeElementPairProperty, runAttributeCommand, runCommand, runPairPropertyCommand, runPropertyCommand, setDataDirectory, useCompositionAsAttributesaddEntries, 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, usingPropertyAsClassabout, addAttribute, addAttributeExpander, addAttributeGenerator, addAttributes, clearAttributeExpanders, clearAttributeGenerators, clearAttributes, clearData, 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, printUsage, removeDuplicates, resolveDuplicates, restoreAttributes, runAttributeExpanders, runAttributeExpansionCommand, runAttributeGeneratorCommand, saveState, saveTemplate, setAttributeNames, setClassProbabilities, setMeasuredClasses, setOptions, setPredictedClasses, splitForThreading, splitIntoFolds, splitIntoFolds, subtract, transferToWekapublic CrystalStructureDataset()
CrystalStructureDataset(boolean)public CrystalStructureDataset(boolean useDefaultGenerators)
Default attribute generators are:
useDefaultGenerators - Whether to use the default attribute generatorspublic CrystalStructureDataset clone()
Datasetpublic CrystalStructureDataset emptyClone()
DatasetemptyClone in class CompositionDatasetpublic void importText(java.lang.String directory,
java.lang.Object[] options)
throws java.lang.Exception
importText in class CompositionDatasetdirectory - Directory containing VASP5-formatted filesoptions - No optionsjava.lang.Exception - If parsing failspublic CrystalStructureEntry getEntry(int index)
DatasetgetEntry in class CompositionDatasetindex - Index of entrypublic CrystalStructureEntry addEntry(java.lang.String input) throws java.lang.Exception
DatasetaddEntry in class CompositionDatasetinput - String describing the entryjava.lang.Exception - If conversion failspublic void runAttributeGenerators()
throws java.lang.Exception
DatasetrunAttributeGenerators in class Datasetjava.lang.ExceptionDataset.getAttributeGenerators()public java.lang.String saveCommand(java.lang.String Basename,
java.lang.String Format)
throws java.lang.Exception
SavableDev Note: Make sure to add save format to Javadoc. See Dataset as an example. Required format:
<save><p><b>format<b> - Description
<br>Optional room to talk more about format </save>
saveCommand in interface SavablesaveCommand in class CompositionDatasetBasename - Name of file without extensionFormat - Command specifying format in which to printjava.lang.Exception - If command not understoodpublic void writePOSCARs(java.lang.String directory)
throws java.lang.Exception
directory - Path to output directoryjava.lang.Exception - if writing fails