cssfproject
cssfproject
¶
CSSFinder uses its own project format allowing for file based customization of parameters used by gilbert algorithm.
CSSFProject
¶
Bases: CommonBaseModel
CSSFProject file specification.
Source code in cssfinder/cssfproject.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
tasks
instance-attribute
¶
List of tasks within project which can be executed.
project_directory
property
¶
Path to directory containing cssfproject.json
file.
project_output_directory
property
¶
Path to output directory for this project.
__init__
¶
__init__(
meta: Meta,
tasks: list[Task] | dict[str, Task],
project_path: str | Path,
*_: Any,
**_k: Any
) -> None
Initialize instance.
extra args and kwargs are ignored.
Source code in cssfinder/cssfproject.py
bind
¶
load_project
classmethod
¶
Load CSSFinder project in at least 1.0.0 version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_or_directory |
str | Path
|
Either project file (cssfproject.json) or directory containing project file. |
required |
Returns:
Type | Description |
---|---|
CSSFProject
|
Project information container. |
Raises:
Type | Description |
---|---|
InvalidCSSFProjectContent
|
Raised when project file content is not a dictionary. |
MalformedProjectFileError
|
When content of project file is not valid json. |
Source code in cssfinder/cssfproject.py
is_project_path
staticmethod
¶
Check if path points to CSSFinder project file or project directory.
Source code in cssfinder/cssfproject.py
select_tasks
¶
Select all tasks matching list of patterns.
Source code in cssfinder/cssfproject.py
to_python_project_template
¶
Convert contents of this project into Python project file.
Source code in cssfinder/cssfproject.py
InvalidCSSFProjectContentError
¶
IncorrectFormatOfTaskFieldError
¶
MalformedProjectFileError
¶
Bases: JSONDecodeError
Rased when project file content can't be correctly decoded.
Source code in cssfinder/cssfproject.py
__str__
¶
Convert exception to readable error explanation.
Source code in cssfinder/cssfproject.py
ProjectFileNotFoundError
¶
NotBoundToProjectError
¶
Bases: Exception
Raised when unbound object is used in context requiring it to be bound to CSSFProject instance.
Source code in cssfinder/cssfproject.py
Meta
¶
Bases: CommonBaseModel
, _ProjectFieldMixin
Project meta information.
Source code in cssfinder/cssfproject.py
SemVerStr
¶
Bases: ConstrainedStr
Semantic versioning string regex, see https://semver.org/.
Source code in cssfinder/cssfproject.py
NotBoundToTaskError
¶
Bases: NotBoundToProjectError
Raised when unbound object is used in context requiring it to be bound to Task instance.
Task
¶
Bases: CommonBaseModel
, _TaskMixin
Container representing CSSFinder task with some algorithm.
Source code in cssfinder/cssfproject.py
GilbertCfg
¶
Bases: CommonBaseModel
, _TaskFieldMixin
Gilbert algorithm configuration container class.
Source code in cssfinder/cssfproject.py
backend
class-attribute
instance-attribute
¶
Configuration of backend which will be used for execution.
When backend configuration is not specified, numpy with double precision is used.
runtime
instance-attribute
¶
Configuration of runtime limits and parameters influencing algorithm run time.
resources
class-attribute
instance-attribute
¶
Additional resources which may be used by algorithm.
get_backend
¶
get_resources
¶
bind
¶
Evaluate dynamic path expressions.
Source code in cssfinder/cssfproject.py
get_state
¶
AlgoMode
¶
Bases: CaseInsensitiveEnum
Mode of algorithm.
Source code in cssfinder/cssfproject.py
BackendCfg
¶
Bases: CommonBaseModel
Container class grouping configuration of backend used by Gilbert algorithm.
Source code in cssfinder/cssfproject.py
Precision
¶
Bases: CaseInsensitiveEnum
Precision of calculations performed.
Source code in cssfinder/cssfproject.py
State
¶
Bases: CommonBaseModel
, _TaskFieldMixin
State configuration.
Source code in cssfinder/cssfproject.py
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
|
depth
class-attribute
instance-attribute
¶
Depth of system, ie.
number of dimensions in qu(D)it. (d)
quantity
class-attribute
instance-attribute
¶
Quantity of systems.
ie. number of qu(D)its in state. (n)
bind
¶
Evaluate dynamic path expressions.
Path expands user (~) and is resolved only when correctly bound to project.
Source code in cssfinder/cssfproject.py
is_predefined_dimensions
¶
get_depth
¶
Return system depth or raise NoDimensionsError if not specified in config.
get_quantity
¶
Return system quantity or raise NoDimensionsError if not specified in config.
NoDimensionsError
¶
RuntimeCfg
¶
Bases: CommonBaseModel
Configuration of runtime limits and parameters influencing algorithm run time.
Source code in cssfinder/cssfproject.py
visibility
class-attribute
instance-attribute
¶
Visibility against white noise.
Between 0 and 1.
max_epochs
class-attribute
instance-attribute
¶
Maximal number of algorithm epochs to perform.
If other interruption condition is met before the number of epochs, algorithm wont execute the rest of epochs.
iters_per_epoch
class-attribute
instance-attribute
¶
Number of iterations per epochs.
Between iterations no checks are performed, which may speed up calculations. However intermediate state of systems are not saved anywhere.
max_corrections
instance-attribute
¶
Maximal number of corrections to collect.
Use -1 to disable this limit.
Resources
¶
Bases: CommonBaseModel
, _TaskFieldMixin
Project resources.
Source code in cssfinder/cssfproject.py
symmetries
class-attribute
instance-attribute
¶
List of paths to files containing symmetry matrices.
projection
class-attribute
instance-attribute
¶
Path to file containing projection matrix.
bind
¶
Evaluate dynamic path expressions.
Paths expands user (~) and are resolved only when correctly bound to project.
Source code in cssfinder/cssfproject.py
project_file_path
¶
Return path to project file (JSON/PY).