public class PrototypeSiteInformation
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Example for the double perovskite structure: This structure has 5 sites, and a stoichiometry of (AA')(BB')O6. The A and A' sites, and the B and B' are each interchangable. So, the site information file for a double perovskite would be:
1 -equiv 1
1 -equiv 0
1 -equiv 3
1 -equiv 2
6
Constructor and Description |
---|
PrototypeSiteInformation() |
Modifier and Type | Method and Description |
---|---|
void |
addSite(double NAtoms,
boolean isIncluded,
java.util.List<java.lang.Integer> equivalentSites)
Add a new crystallographic site.
|
protected java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<int[]> |
getEquivalentArragements()
Get all equivalent orders of sites.
|
java.lang.String |
getGroupLabel(int index)
Generate a label for a certain group of sites.
|
java.util.Set<java.lang.Integer> |
getSiteGroup(int group)
Get indices of sites in a particular group.
|
boolean |
groupIsIncludedInAttributes(int index)
Determine whether a group sites of should be included in attributes.
|
int |
hashCode() |
int |
NGroups()
Get the number of groups of equivalent sites.
|
double |
NOnSite(int index)
Get number of atoms on a certain site
|
int |
NSites()
Get the number of sites.
|
static PrototypeSiteInformation |
readFromFile(java.lang.String filename)
Read site information from a specially-formatted file.
|
void |
setGroupIncludedInAttribute(int index,
boolean isIncluded)
Define whether a group of sites should be included when generating attributes.
|
boolean |
siteIsIncludedInAttributes(int index) |
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static PrototypeSiteInformation readFromFile(java.lang.String filename) throws java.lang.Exception
filename
- Path to site information filejava.lang.Exception
- If file fails to parseprotected java.lang.Object clone()
clone
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int NSites()
NGroups()
public int NGroups()
NSites()
public java.util.Set<java.lang.Integer> getSiteGroup(int group)
group
- Index of grouppublic java.util.List<int[]> getEquivalentArragements()
public double NOnSite(int index)
index
- Index of desired sitepublic boolean siteIsIncludedInAttributes(int index)
index
- Index of desired sitepublic boolean groupIsIncludedInAttributes(int index)
index
- Index of desired grouppublic void setGroupIncludedInAttribute(int index, boolean isIncluded)
index
- Index of desired groupisIncluded
- Whether to include it when generating statisticspublic java.lang.String getGroupLabel(int index)
index
- Index of desired grouppublic void addSite(double NAtoms, boolean isIncluded, java.util.List<java.lang.Integer> equivalentSites)
NAtoms
- Number of atoms on this siteisIncluded
- Whether this site should be included when generating attributesequivalentSites
- List of sites that are equivalent to this one (can be empty)