@@ -28,16 +28,32 @@ Try interactively
28
28
Interactive jupyter notebook examples can be found in the ` examples ` folder.
29
29
Click the * binder* badge above to launch these examples in a pre-built environment and try it in your browser!
30
30
31
- Requirements
31
+ Dependences
32
32
-----------
33
33
* [ ase] ( https://wiki.fysik.dtu.dk/ase/ ) : The atomic simulation environment
34
34
* [ castepinput] ( https://gitlab.com/bz1/castepinput ) : A light weight writer/reader for the input files of [ CASTEP] ( www.caste.org ) .
35
35
36
+ Installation
37
+ -----------
38
+
39
+ The package can be installed from pypi together with the dependencies:
40
+
41
+ ```
42
+ pip install airsspy
43
+ ```
44
+
45
+ Alternative, one can also install directly from the repository (defaults to the master branch):
46
+
47
+ ```
48
+ pip install git+https://github.com/zhubonan/airsspy
49
+ ```
50
+
36
51
Usage
37
52
-----
38
53
Assuming you are familiar with ` ase ` , python and has some basic knowledge of AIRSS.
39
54
To prepare a seed for generating a * sensible* random structure:
40
- ```
55
+
56
+ ``` python
41
57
from airsspy import SeedAtoms
42
58
seed = SeedAtoms(' C6' )
43
59
seed.buiid.varvol = 20
@@ -51,7 +67,8 @@ for i in range(0, 6, 2):
51
67
```
52
68
53
69
To write the seed file onto the disk:
54
- ```
70
+
71
+ ``` python
55
72
atoms.write_seed(' C6.cell' )
56
73
# With IPython
57
74
# Use the buildcell executable to generate the file
@@ -61,14 +78,15 @@ atoms.write_seed('C6.cell')
61
78
To generate a cell we can create a ` Buildcell ` instance,
62
79
which is helping wrapper to the ` buildcell ` program of AIRSS:
63
80
64
- ```
81
+ ``` python
65
82
from airsspy import Buildcell
66
83
buidcell = Buildcell(seed)
67
84
random_atoms = builcell.generate()
68
85
```
69
86
70
87
A shortcut is also available as an method of the ` SeedAtoms ` :
71
- ```
88
+
89
+ ``` python
72
90
random_atoms = seed.build_random_atoms()
73
91
```
74
92
0 commit comments