airsspy.seed#
Classes for preparing AIRSS seed
Module Contents#
Classes#
Subclass of ase.atoms.Atoms object. Template for generating random cells |
|
Descriptor for tag-like properties (boolean flags) |
|
Descriptor for generic properties (any value type) |
|
Descriptor for range properties (number or tuple of two numbers) |
|
Descriptor for nested range properties (tuple/list of two elements) |
|
Container for the tags |
|
A class for storing parameters for the Buldcell program |
|
Tags for a single atom |
|
Element atoms in a AIRSS seed |
Functions#
Return the string for a given value. If the value is a tuple make it a range. |
|
Get the CellInput holder for a given seed |
|
Write the seed to a file handle |
API#
- class airsspy.seed.SeedAtoms(*args: Any, **kwargs: Any)[source]#
Bases:
ase.AtomsSubclass of ase.atoms.Atoms object. Template for generating random cells
Initialization
Initialise an SeedAtoms for buildcell. Same arguments signature as ase.Atoms object
Special attribute: gentags : BuildcellParam instance for storing parameter of buildcell
You can set the global buildcell tags by setting attributes of the gentags instance.
Per-atom generation tags are saved in an array called ‘atom_gentags’. They can be retrieved using
get_atom_tagor set withset_atom_tag. Theatom_tagsattribute also provide a convient way of accessing.- set_atom_tag(tag: airsspy.seed.SeedAtomTag, index: int) None[source]#
Set buildcell tags for individual atom if the SeedAtomTag object has no tagname, set automatically
- get_atom_tag(index: int) Any[source]#
Return the buildcell tag for the atom of the index. Can be used for in-place change
- property atom_tags: numpy.ndarray#
Array of tags, each for one Atom
- build_random_atoms(timeout: int = 10, also_buildcell: bool = False, fail_ok: bool = True) Optional[Union[ase.atoms.Atoms, Tuple[ase.atoms.Atoms, Any]]][source]#
Returns the randomize Atoms built using
buildcellprogram
- __getitem__(i: Union[int, Sequence[int], slice]) Union[airsspy.seed.SeedAtom, airsspy.seed.SeedAtoms][source]#
Return a subset of the atoms.
i – scalar integer, list of integers, or slice object describing which atoms to return.
If i is a scalar, return an Atom object. If i is a list or a slice, return an Atoms object with the same cell, pbc, and other associated info as the original Atoms object. The indices of the constraints will be shuffled so that they match the indexing in the subset returned.
- class airsspy.seed.BoolTag(doc: str = '', storage_name: Optional[str] = None)[source]#
Descriptor for tag-like properties (boolean flags)
Initialization
- __set__(instance: airsspy.seed.TagHolder, value: bool) None[source]#
- __delete__(instance: airsspy.seed.TagHolder) None[source]#
- class airsspy.seed.GenericTag(doc: str = '', storage_name: Optional[str] = None)[source]#
Descriptor for generic properties (any value type)
Initialization
- __set__(instance: airsspy.seed.TagHolder, value: Any) None[source]#
- __delete__(instance: airsspy.seed.TagHolder) None[source]#
- class airsspy.seed.RangeTag(doc: str = '', storage_name: Optional[str] = None)[source]#
Descriptor for range properties (number or tuple of two numbers)
Initialization
- __set__(instance: airsspy.seed.TagHolder, value: Union[numbers.Number, Tuple[numbers.Number, numbers.Number], List[numbers.Number], Dict[str, List[int]]]) None[source]#
- __delete__(instance: airsspy.seed.TagHolder) None[source]#
- class airsspy.seed.NestedRangeTag(doc: str = '', storage_name: Optional[str] = None)[source]#
Descriptor for nested range properties (tuple/list of two elements)
Initialization
- __delete__(instance: airsspy.seed.TagHolder) None[source]#
- class airsspy.seed.TagHolder(*args: Any, **kwargs: Any)[source]#
Container for the tags
Initialization
A container for tags of a single SeedAtom
- class airsspy.seed.BuildcellParam(*args: Any, **kwargs: Any)[source]#
Bases:
airsspy.seed.TagHolderA class for storing parameters for the Buldcell program
Initialization
A container for tags of a single SeedAtom
- populate_defaults() airsspy.seed.BuildcellParam[source]#
Apply the active cell-level defaults used by AIRSS
gencell.
- fix#
‘BoolTag(…)’
- abfix#
‘BoolTag(…)’
- adjgen#
‘GenericTag(…)’
- autoslack#
‘BoolTag(…)’
- breakamp#
‘GenericTag(…)’
- celladapt#
‘BoolTag(…)’
- cellamp#
‘GenericTag(…)’
- cellcon#
‘GenericTag(…)’
- coord#
‘RangeTag(…)’
- cylinder#
‘GenericTag(…)’
- flip#
‘BoolTag(…)’
- maxbangle#
‘GenericTag(…)’
- maxtime#
‘GenericTag(…)’
- minbangle#
‘GenericTag(…)’
- focus#
‘GenericTag(…)’
- molecules#
‘GenericTag(…)’
- nocompact#
‘GenericTag(…)’
- nopush#
‘GenericTag(…)’
- octet#
‘GenericTag(…)’
- permfrac#
‘GenericTag(…)’
- permute#
‘GenericTag(…)’
- rad#
‘GenericTag(…)’
- rash#
‘GenericTag(…)’
- rash_angamp#
‘GenericTag(…)’
- rash_posamp#
‘GenericTag(…)’
- remove#
‘GenericTag(…)’
- slab#
‘GenericTag(…)’
- species#
‘GenericTag(…)’
- sphere#
‘GenericTag(…)’
- spin#
‘GenericTag(…)’
- supercell#
‘GenericTag(…)’
- surface#
‘BoolTag(…)’
- symm#
‘GenericTag(…)’
- symmno#
‘GenericTag(…)’
- symmorphic#
‘BoolTag(…)’
- system#
‘GenericTag(…)’
- targvol#
‘RangeTag(…)’
- three#
‘GenericTag(…)’
- tight#
‘BoolTag(…)’
- vacancies#
‘GenericTag(…)’
- vacuum#
‘GenericTag(…)’
- width#
‘GenericTag(…)’
- cfix#
‘BoolTag(…)’
- cluster#
‘BoolTag(…)’
- nform#
‘RangeTag(…)’
- minsep#
‘NestedRangeTag(…)’
- posamp#
‘NestedRangeTag(…)’
- symmops#
‘RangeTag(…)’
- minamp#
‘RangeTag(…)’
- zamp#
‘RangeTag(…)’
- xamp#
‘RangeTag(…)’
- yamp#
‘RangeTag(…)’
- angamp#
‘RangeTag(…)’
- sgrank#
‘RangeTag(…)’
- varvol#
‘GenericTag(…)’
- slack#
‘RangeTag(…)’
- overlap#
‘RangeTag(…)’
- compact#
‘BoolTag(…)’
- cons#
‘GenericTag(…)’
- natom#
‘RangeTag(…)’
- formula#
‘GenericTag(…)’
- seed#
‘GenericTag(…)’
- vol#
‘RangeTag(…)’
- nfails#
‘GenericTag(…)’
- hole#
‘GenericTag(…)’
- holepos#
‘GenericTag(…)’
- shift#
‘GenericTag(…)’
- class airsspy.seed.SeedAtomTag(*args: Any, **kwargs: Any)[source]#
Bases:
airsspy.seed.TagHolderTags for a single atom
Initialization
A container for tags of a single SeedAtom
- tagname#
‘GenericTag(…)’
- posamp#
‘RangeTag(…)’
- minamp#
‘RangeTag(…)’
- zamp#
‘RangeTag(…)’
- xamp#
‘RangeTag(…)’
- yamp#
‘RangeTag(…)’
- num#
‘RangeTag(…)’
- adatom#
‘BoolTag(…)’
- fix#
‘BoolTag(…)’
- nomove#
‘BoolTag(…)’
- rad#
‘GenericTag(…)’
- occ#
‘GenericTag(…)’
- perm#
‘BoolTag(…)’
- athole#
‘BoolTag(…)’
- coord#
‘RangeTag(…)’
- angamp#
‘RangeTag(…)’
- vol#
‘GenericTag(…)’
- mult#
‘GenericTag(…)’
- spin#
‘GenericTag(…)’
- class airsspy.seed.SeedAtom(*args: Any, **kwargs: Any)[source]#
Bases:
ase.Atom,airsspy.seed.SeedAtomTagElement atoms in a AIRSS seed
Initialization
A container for tags of a single SeedAtom
- airsspy.seed.tuple2range(value: Union[numbers.Number, List[numbers.Number], Tuple[numbers.Number, ...]]) str[source]#
Return the string for a given value. If the value is a tuple make it a range.
- airsspy.seed.get_cell_inp(atoms: airsspy.seed.SeedAtoms) castepinput.CellInput[source]#
Get the CellInput holder for a given seed
- airsspy.seed.get_cell_inp_lines(atoms: airsspy.seed.SeedAtoms) List[str][source]#
Write the seed to a file handle