0
# Crystallographic Transformations
1
2
Systematic structure modifications including supercells, substitutions, defect creation, surface generation, and magnetic ordering enumeration. These transformations enable the systematic exploration of materials space and the generation of derivative structures for computational studies.
3
4
## Capabilities
5
6
### Base Transformation Framework
7
8
Abstract base class and transformation infrastructure for systematic structure modifications.
9
10
```python { .api }
11
class AbstractTransformation:
12
"""
13
Abstract base class for all structure transformations.
14
"""
15
16
def apply_transformation(self, structure):
17
"""
18
Apply transformation to a structure.
19
20
Parameters:
21
structure: Structure object to transform
22
23
Returns:
24
Structure or list: Transformed structure(s)
25
"""
26
raise NotImplementedError
27
28
def __call__(self, structure):
29
"""Allow transformation to be called as function."""
30
return self.apply_transformation(structure)
31
32
@property
33
def inverse(self):
34
"""Inverse transformation (if applicable)."""
35
return None
36
37
@property
38
def is_one_to_many(self):
39
"""Whether transformation returns multiple structures."""
40
return False
41
42
def __str__(self):
43
"""String representation of transformation."""
44
return self.__class__.__name__
45
```
46
47
### Structure-Level Transformations
48
49
Transformations that modify the overall structure, lattice, or unit cell.
50
51
```python { .api }
52
class SupercellTransformation:
53
"""
54
Create supercells using scaling matrices.
55
56
Parameters:
57
- scaling_matrix: 3x3 scaling matrix or list of 3 integers
58
"""
59
def __init__(self, scaling_matrix): ...
60
61
def apply_transformation(self, structure):
62
"""
63
Apply supercell transformation.
64
65
Parameters:
66
structure: Structure to transform
67
68
Returns:
69
Structure: Supercell structure
70
"""
71
72
@property
73
def scaling_matrix(self):
74
"""3x3 scaling matrix."""
75
76
@property
77
def inverse(self):
78
"""Returns None - supercell transformation is not generally invertible."""
79
return None
80
```
81
82
```python { .api }
83
class PrimitiveCellTransformation:
84
"""
85
Transform structure to primitive cell.
86
87
Parameters:
88
- tolerance: Tolerance for primitive cell detection
89
- use_site_props: Whether to average site properties
90
"""
91
def __init__(self, tolerance=0.5, use_site_props=False): ...
92
93
def apply_transformation(self, structure):
94
"""
95
Get primitive cell of structure.
96
97
Parameters:
98
structure: Structure to transform
99
100
Returns:
101
Structure: Primitive cell structure
102
"""
103
104
@property
105
def tolerance(self):
106
"""Tolerance for primitive cell detection."""
107
```
108
109
```python { .api }
110
class ConventionalCellTransformation:
111
"""
112
Transform structure to conventional unit cell.
113
114
Parameters:
115
- international_monoclinic: Whether to use international monoclinic setting
116
- symprec: Symmetry precision
117
- angle_tolerance: Angle tolerance for symmetry detection
118
"""
119
def __init__(self, international_monoclinic=True, symprec=0.01,
120
angle_tolerance=5): ...
121
122
def apply_transformation(self, structure):
123
"""
124
Get conventional cell of structure.
125
126
Parameters:
127
structure: Structure to transform
128
129
Returns:
130
Structure: Conventional cell structure
131
"""
132
```
133
134
```python { .api }
135
class PerturbStructureTransformation:
136
"""
137
Apply random perturbations to atomic positions.
138
139
Parameters:
140
- distance: Maximum perturbation distance in Angstroms
141
- min_distance: Minimum allowed interatomic distance
142
"""
143
def __init__(self, distance=0.1, min_distance=None): ...
144
145
def apply_transformation(self, structure):
146
"""
147
Apply random perturbations to structure.
148
149
Parameters:
150
structure: Structure to perturb
151
152
Returns:
153
Structure: Perturbed structure
154
"""
155
156
@property
157
def distance(self):
158
"""Maximum perturbation distance."""
159
160
@property
161
def min_distance(self):
162
"""Minimum allowed interatomic distance."""
163
```
164
165
```python { .api }
166
class DeformStructureTransformation:
167
"""
168
Apply deformation to structure lattice.
169
170
Parameters:
171
- deformation: 3x3 deformation matrix
172
"""
173
def __init__(self, deformation): ...
174
175
def apply_transformation(self, structure):
176
"""
177
Apply deformation to structure.
178
179
Parameters:
180
structure: Structure to deform
181
182
Returns:
183
Structure: Deformed structure
184
"""
185
186
@property
187
def deformation(self):
188
"""3x3 deformation matrix."""
189
```
190
191
```python { .api }
192
class ScaleToRelaxedTransformation:
193
"""
194
Scale structure to match relaxed structure dimensions.
195
196
Parameters:
197
- relaxed_struct: Relaxed structure to match
198
"""
199
def __init__(self, relaxed_struct): ...
200
201
def apply_transformation(self, structure):
202
"""
203
Scale structure to match relaxed dimensions.
204
205
Parameters:
206
structure: Structure to scale
207
208
Returns:
209
Structure: Scaled structure
210
"""
211
```
212
213
### Species and Substitution Transformations
214
215
Transformations that modify chemical species and perform substitutions.
216
217
```python { .api }
218
class SubstitutionTransformation:
219
"""
220
Substitute species in structure.
221
222
Parameters:
223
- species_map: Dict mapping old species to new species
224
"""
225
def __init__(self, species_map): ...
226
227
def apply_transformation(self, structure):
228
"""
229
Apply species substitution.
230
231
Parameters:
232
structure: Structure to modify
233
234
Returns:
235
Structure: Structure with substituted species
236
"""
237
238
@property
239
def species_map(self):
240
"""Species substitution mapping."""
241
242
@property
243
def inverse(self):
244
"""Inverse substitution transformation."""
245
return SubstitutionTransformation({v: k for k, v in self.species_map.items()})
246
```
247
248
```python { .api }
249
class RemoveSpeciesTransformation:
250
"""
251
Remove all sites of specified species.
252
253
Parameters:
254
- species_to_remove: List of species to remove
255
"""
256
def __init__(self, species_to_remove): ...
257
258
def apply_transformation(self, structure):
259
"""
260
Remove specified species from structure.
261
262
Parameters:
263
structure: Structure to modify
264
265
Returns:
266
Structure: Structure with species removed
267
"""
268
269
@property
270
def species_to_remove(self):
271
"""Species to remove."""
272
```
273
274
```python { .api }
275
class PartialRemoveSpecieTransformation:
276
"""
277
Partially remove species to create vacancies.
278
279
Parameters:
280
- specie_to_remove: Species to partially remove
281
- fraction_to_remove: Fraction of species to remove (0-1)
282
- algo: Algorithm for selecting sites to remove
283
"""
284
def __init__(self, specie_to_remove, fraction_to_remove, algo=0): ...
285
286
def apply_transformation(self, structure):
287
"""
288
Partially remove species from structure.
289
290
Parameters:
291
structure: Structure to modify
292
293
Returns:
294
Structure: Structure with partial species removal
295
"""
296
297
@property
298
def specie_to_remove(self):
299
"""Species to partially remove."""
300
301
@property
302
def fraction_to_remove(self):
303
"""Fraction to remove."""
304
```
305
306
```python { .api }
307
class OxidationStateDecorationTransformation:
308
"""
309
Add oxidation states to structure species.
310
311
Parameters:
312
- oxidation_states: Dict mapping elements to oxidation states
313
"""
314
def __init__(self, oxidation_states): ...
315
316
def apply_transformation(self, structure):
317
"""
318
Decorate structure with oxidation states.
319
320
Parameters:
321
structure: Structure to decorate
322
323
Returns:
324
Structure: Structure with oxidation state information
325
"""
326
327
@property
328
def oxidation_states(self):
329
"""Oxidation state mapping."""
330
```
331
332
```python { .api }
333
class AutoOxiStateDecorationTransformation:
334
"""
335
Automatically determine and add oxidation states.
336
337
Parameters:
338
- symm_tol: Symmetry tolerance for bond valence analysis
339
- max_radius: Maximum radius for neighbor detection
340
"""
341
def __init__(self, symm_tol=0.1, max_radius=4): ...
342
343
def apply_transformation(self, structure):
344
"""
345
Automatically determine oxidation states.
346
347
Parameters:
348
structure: Structure to analyze
349
350
Returns:
351
Structure: Structure with automatically determined oxidation states
352
"""
353
```
354
355
```python { .api }
356
class OxidationStateRemovalTransformation:
357
"""
358
Remove oxidation state information from species.
359
"""
360
def apply_transformation(self, structure):
361
"""
362
Remove oxidation states from structure.
363
364
Parameters:
365
structure: Structure to modify
366
367
Returns:
368
Structure: Structure without oxidation state information
369
"""
370
```
371
372
### Site-Level Transformations
373
374
Transformations that operate on individual atomic sites.
375
376
```python { .api }
377
class InsertSitesTransformation:
378
"""
379
Insert new sites into structure.
380
381
Parameters:
382
- species: List of species to insert
383
- coords: List of coordinates for new sites
384
- coords_are_cartesian: Whether coordinates are Cartesian
385
- validate_proximity: Whether to validate atomic distances
386
"""
387
def __init__(self, species, coords, coords_are_cartesian=False,
388
validate_proximity=True): ...
389
390
def apply_transformation(self, structure):
391
"""
392
Insert sites into structure.
393
394
Parameters:
395
structure: Structure to modify
396
397
Returns:
398
Structure: Structure with inserted sites
399
"""
400
401
@property
402
def species(self):
403
"""Species to insert."""
404
405
@property
406
def coords(self):
407
"""Coordinates for new sites."""
408
```
409
410
```python { .api }
411
class RemoveSitesTransformation:
412
"""
413
Remove specific sites from structure.
414
415
Parameters:
416
- indices_to_remove: List of site indices to remove
417
"""
418
def __init__(self, indices_to_remove): ...
419
420
def apply_transformation(self, structure):
421
"""
422
Remove sites from structure.
423
424
Parameters:
425
structure: Structure to modify
426
427
Returns:
428
Structure: Structure with sites removed
429
"""
430
431
@property
432
def indices_to_remove(self):
433
"""Site indices to remove."""
434
```
435
436
```python { .api }
437
class ReplaceSiteSpeciesTransformation:
438
"""
439
Replace species at specific sites.
440
441
Parameters:
442
- indices_species_map: Dict mapping site indices to new species
443
"""
444
def __init__(self, indices_species_map): ...
445
446
def apply_transformation(self, structure):
447
"""
448
Replace species at specified sites.
449
450
Parameters:
451
structure: Structure to modify
452
453
Returns:
454
Structure: Structure with replaced species
455
"""
456
457
@property
458
def indices_species_map(self):
459
"""Site index to species mapping."""
460
```
461
462
```python { .api }
463
class TranslateSitesTransformation:
464
"""
465
Translate specific sites in structure.
466
467
Parameters:
468
- indices_to_move: List of site indices to translate
469
- translation_vector: Translation vector
470
- vector_in_frac_coords: Whether vector is in fractional coordinates
471
"""
472
def __init__(self, indices_to_move, translation_vector,
473
vector_in_frac_coords=True): ...
474
475
def apply_transformation(self, structure):
476
"""
477
Translate specified sites.
478
479
Parameters:
480
structure: Structure to modify
481
482
Returns:
483
Structure: Structure with translated sites
484
"""
485
486
@property
487
def indices_to_move(self):
488
"""Site indices to translate."""
489
490
@property
491
def translation_vector(self):
492
"""Translation vector."""
493
```
494
495
```python { .api }
496
class RotationTransformation:
497
"""
498
Rotate structure or specific sites.
499
500
Parameters:
501
- axis: Rotation axis
502
- angle: Rotation angle in degrees
503
- angle_in_radians: Whether angle is in radians
504
"""
505
def __init__(self, axis, angle, angle_in_radians=False): ...
506
507
def apply_transformation(self, structure):
508
"""
509
Apply rotation to structure.
510
511
Parameters:
512
structure: Structure to rotate
513
514
Returns:
515
Structure: Rotated structure
516
"""
517
518
@property
519
def axis(self):
520
"""Rotation axis."""
521
522
@property
523
def angle(self):
524
"""Rotation angle."""
525
```
526
527
### Ordering and Enumeration Transformations
528
529
Transformations for creating ordered structures from disordered ones and enumerating possible configurations.
530
531
```python { .api }
532
class OrderDisorderedStructureTransformation:
533
"""
534
Order disordered structure using enumeration algorithms.
535
536
Parameters:
537
- algo: Algorithm for ordering (ewald, best_first, fast)
538
- symmetrized: Whether to return symmetrized structures
539
- no_oxi_states: Whether to ignore oxidation states
540
"""
541
def __init__(self, algo=0, symmetrized=False, no_oxi_states=False): ...
542
543
def apply_transformation(self, structure):
544
"""
545
Order disordered structure.
546
547
Parameters:
548
structure: Disordered structure to order
549
550
Returns:
551
list: List of ordered structures
552
"""
553
554
@property
555
def is_one_to_many(self):
556
"""Returns True - generates multiple ordered structures."""
557
return True
558
559
@property
560
def algo(self):
561
"""Ordering algorithm."""
562
```
563
564
```python { .api }
565
class EnumerateStructureTransformation:
566
"""
567
Enumerate derivative structures using substitution.
568
569
Parameters:
570
- species: Dict of species substitutions {original: [substitutes]}
571
- min_cell_size: Minimum supercell size for enumeration
572
- max_cell_size: Maximum supercell size for enumeration
573
- symm_prec: Symmetry precision
574
- refine_structure: Whether to refine input structure
575
- enum_precision_parameter: Enumeration precision parameter
576
- check_ordered_symmetry: Whether to check ordered symmetry
577
- max_disordered_sites: Maximum disordered sites
578
"""
579
def __init__(self, species, min_cell_size=1, max_cell_size=1,
580
symm_prec=0.1, refine_structure=False,
581
enum_precision_parameter=0.01, check_ordered_symmetry=True,
582
max_disordered_sites=None): ...
583
584
def apply_transformation(self, structure):
585
"""
586
Enumerate structures with substitutions.
587
588
Parameters:
589
structure: Structure to enumerate
590
591
Returns:
592
list: List of enumerated structures
593
"""
594
595
@property
596
def is_one_to_many(self):
597
"""Returns True - generates multiple structures."""
598
return True
599
```
600
601
```python { .api }
602
class SubstitutionPredictorTransformation:
603
"""
604
ML-guided species substitution based on data-driven predictions.
605
606
Parameters:
607
- threshold: Probability threshold for substitution
608
- scale_volumes: Whether to scale volumes after substitution
609
- **kwargs: Additional arguments for SubstitutionPredictor
610
"""
611
def __init__(self, threshold=1e-2, scale_volumes=True, **kwargs): ...
612
613
def apply_transformation(self, structure):
614
"""
615
Apply ML-guided substitutions.
616
617
Parameters:
618
structure: Structure to modify
619
620
Returns:
621
list: List of structures with predicted substitutions
622
"""
623
624
@property
625
def is_one_to_many(self):
626
"""Returns True - generates multiple structures."""
627
return True
628
```
629
630
### Surface and Interface Transformations
631
632
Transformations for creating surfaces, slabs, and interfaces.
633
634
```python { .api }
635
class SlabTransformation:
636
"""
637
Create surface slabs from bulk structures.
638
639
Parameters:
640
- miller_index: Miller index of surface plane
641
- min_slab_size: Minimum slab thickness in Angstroms
642
- min_vacuum_size: Minimum vacuum thickness in Angstroms
643
- lll_reduce: Whether to LLL reduce slab
644
- center_slab: Whether to center slab in cell
645
- primitive: Whether to use primitive slab
646
- max_normal_search: Maximum normal search depth
647
"""
648
def __init__(self, miller_index, min_slab_size, min_vacuum_size=10,
649
lll_reduce=False, center_slab=False, primitive=True,
650
max_normal_search=None): ...
651
652
def apply_transformation(self, structure):
653
"""
654
Generate surface slab from bulk structure.
655
656
Parameters:
657
structure: Bulk structure to cut
658
659
Returns:
660
list: List of possible slab terminations
661
"""
662
663
@property
664
def is_one_to_many(self):
665
"""Returns True - generates multiple slab terminations."""
666
return True
667
668
@property
669
def miller_index(self):
670
"""Surface Miller index."""
671
672
@property
673
def min_slab_size(self):
674
"""Minimum slab thickness."""
675
676
@property
677
def min_vacuum_size(self):
678
"""Minimum vacuum thickness."""
679
```
680
681
```python { .api }
682
class AddAdsorbateTransformation:
683
"""
684
Add adsorbate molecules to surface slabs.
685
686
Parameters:
687
- adsorbate: Molecule object for adsorbate
688
- selective_dynamics: Whether to use selective dynamics
689
- height: Height above surface for adsorbate
690
- mi_vec: Miller index vector
691
"""
692
def __init__(self, adsorbate, selective_dynamics=False, height=0.9,
693
mi_vec=None): ...
694
695
def apply_transformation(self, structure):
696
"""
697
Add adsorbate to slab structure.
698
699
Parameters:
700
structure: Slab structure
701
702
Returns:
703
list: List of structures with adsorbates at different sites
704
"""
705
706
@property
707
def is_one_to_many(self):
708
"""Returns True - generates structures with adsorbates at different sites."""
709
return True
710
711
@property
712
def adsorbate(self):
713
"""Adsorbate molecule."""
714
```
715
716
```python { .api }
717
class GrainBoundaryTransformation:
718
"""
719
Create grain boundary structures.
720
721
Parameters:
722
- rotation_axis: Rotation axis for grain boundary
723
- rotation_angle: Rotation angle in degrees
724
- expand_times: Number of times to expand interface
725
- vacuum_thickness: Vacuum thickness between grains
726
- ab_shift: Shift vector in ab plane
727
- normal: Whether rotation axis is normal to interface
728
- ratio: Ratio for interface construction
729
"""
730
def __init__(self, rotation_axis, rotation_angle, expand_times=4,
731
vacuum_thickness=0.0, ab_shift=None, normal=False,
732
ratio=None): ...
733
734
def apply_transformation(self, structure):
735
"""
736
Create grain boundary structure.
737
738
Parameters:
739
structure: Structure to create grain boundary from
740
741
Returns:
742
Structure: Grain boundary structure
743
"""
744
745
@property
746
def rotation_axis(self):
747
"""Grain boundary rotation axis."""
748
749
@property
750
def rotation_angle(self):
751
"""Grain boundary rotation angle."""
752
```
753
754
### Magnetic Ordering Transformations
755
756
Transformations for generating magnetic ordering configurations.
757
758
```python { .api }
759
class MagOrderingTransformation:
760
"""
761
Enumerate magnetic ordering configurations.
762
763
Parameters:
764
- mag_species_spin: Dict mapping magnetic species to spin values
765
- order_parameter: Magnetic order parameter constraint
766
- energy_model: Energy model for magnetic interactions
767
- **kwargs: Additional enumeration parameters
768
"""
769
def __init__(self, mag_species_spin, order_parameter=0.5,
770
energy_model=None, **kwargs): ...
771
772
def apply_transformation(self, structure):
773
"""
774
Generate magnetic ordering configurations.
775
776
Parameters:
777
structure: Structure to add magnetic ordering to
778
779
Returns:
780
list: List of magnetically ordered structures
781
"""
782
783
@property
784
def is_one_to_many(self):
785
"""Returns True - generates multiple magnetic configurations."""
786
return True
787
788
@property
789
def mag_species_spin(self):
790
"""Magnetic species and their spin values."""
791
```
792
793
### Advanced Transformations
794
795
Specialized transformations for complex structure modifications.
796
797
```python { .api }
798
class CubicSupercellTransformation:
799
"""
800
Create cubic supercell with specified minimum length.
801
802
Parameters:
803
- min_length: Minimum supercell length in Angstroms
804
- max_length: Maximum supercell length in Angstroms
805
- min_atoms: Minimum number of atoms in supercell
806
- prefer_90_degrees: Whether to prefer 90-degree angles
807
- allow_rotation: Whether to allow lattice rotations
808
"""
809
def __init__(self, min_length=10, max_length=15, min_atoms=None,
810
prefer_90_degrees=True, allow_rotation=False): ...
811
812
def apply_transformation(self, structure):
813
"""
814
Create cubic supercell.
815
816
Parameters:
817
structure: Structure to transform
818
819
Returns:
820
Structure: Cubic supercell
821
"""
822
823
@property
824
def min_length(self):
825
"""Minimum supercell length."""
826
```
827
828
```python { .api }
829
class SQSTransformation:
830
"""
831
Generate Special Quasi-random Structures (SQS).
832
833
Parameters:
834
- scaling: Supercell scaling matrix
835
- search_time: Time limit for SQS search in seconds
836
- directory: Working directory for mcsqs
837
- instances: Number of SQS instances to generate
838
- wd: Alternative working directory specification
839
- objective: Objective function for SQS optimization
840
"""
841
def __init__(self, scaling=None, search_time=60, directory=None,
842
instances=None, wd=None, objective=None): ...
843
844
def apply_transformation(self, structure):
845
"""
846
Generate SQS structures.
847
848
Parameters:
849
structure: Disordered structure to create SQS from
850
851
Returns:
852
list: List of SQS structures
853
"""
854
855
@property
856
def is_one_to_many(self):
857
"""Returns True - generates multiple SQS structures."""
858
return True
859
```
860
861
```python { .api }
862
class MonteCarloRattleTransformation:
863
"""
864
Apply Monte Carlo rattling to atomic positions.
865
866
Parameters:
867
- rattle_std: Standard deviation for rattling
868
- min_distance: Minimum allowed interatomic distance
869
- seed: Random seed for reproducibility
870
"""
871
def __init__(self, rattle_std=0.01, min_distance=1.0, seed=None): ...
872
873
def apply_transformation(self, structure):
874
"""
875
Apply Monte Carlo rattling.
876
877
Parameters:
878
structure: Structure to rattle
879
880
Returns:
881
Structure: Rattled structure
882
"""
883
884
@property
885
def rattle_std(self):
886
"""Rattling standard deviation."""
887
```
888
889
### Multi-Step Transformations
890
891
Transformations that combine multiple operations.
892
893
```python { .api }
894
class SuperTransformation:
895
"""
896
Apply multiple transformations in sequence.
897
898
Parameters:
899
- transformations: List of transformation objects to apply
900
- nprocs: Number of processes for parallel execution
901
"""
902
def __init__(self, transformations, nprocs=None): ...
903
904
def apply_transformation(self, structure):
905
"""
906
Apply multiple transformations in sequence.
907
908
Parameters:
909
structure: Structure to transform
910
911
Returns:
912
Structure or list: Final transformed structure(s)
913
"""
914
915
@property
916
def transformations(self):
917
"""List of transformations to apply."""
918
919
@property
920
def is_one_to_many(self):
921
"""Whether any transformation in sequence is one-to-many."""
922
return any(getattr(t, "is_one_to_many", False) for t in self.transformations)
923
```
924
925
```python { .api }
926
class MultipleSubstitutionTransformation:
927
"""
928
Perform multiple species substitutions.
929
930
Parameters:
931
- substitutions: List of substitution dictionaries
932
"""
933
def __init__(self, substitutions): ...
934
935
def apply_transformation(self, structure):
936
"""
937
Apply multiple substitutions.
938
939
Parameters:
940
structure: Structure to transform
941
942
Returns:
943
list: List of structures with different substitutions
944
"""
945
946
@property
947
def is_one_to_many(self):
948
"""Returns True - generates multiple substitution variants."""
949
return True
950
951
@property
952
def substitutions(self):
953
"""List of substitution mappings."""
954
```
955
956
### Utility Functions
957
958
Helper functions for transformation operations and structure manipulation.
959
960
```python { .api }
961
def standardize_transformation(transformation, structure):
962
"""
963
Standardize transformation output format.
964
965
Parameters:
966
transformation: Transformation object
967
structure: Input structure
968
969
Returns:
970
list: Standardized list of transformed structures
971
"""
972
973
def batch_write_vasp_input(transformed_structures, vasp_input_set=None,
974
output_dir=".", make_dir_if_not_present=True,
975
subfolder=None, include_cif=False, **kwargs):
976
"""
977
Batch write VASP input files for transformed structures.
978
979
Parameters:
980
transformed_structures: List of transformed structures
981
vasp_input_set: VASP input set to use
982
output_dir: Output directory
983
make_dir_if_not_present: Whether to create directories
984
subfolder: Subfolder naming scheme
985
include_cif: Whether to include CIF files
986
"""
987
988
def apply_transformation_to_structures(transformations, structures,
989
extend_collection=True):
990
"""
991
Apply transformations to multiple structures.
992
993
Parameters:
994
transformations: List of transformations
995
structures: List of input structures
996
extend_collection: Whether to extend or replace collection
997
998
Returns:
999
list: List of all transformed structures
1000
"""
1001
```