-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmx_example.py
68 lines (60 loc) · 1.65 KB
/
mx_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
This example shows how you can run RADDOSE-3D to simulate a macromolecular crystallography
experiment where a crystal of insulin is exposed to a Gaussian profile X-ray beam for 50
seconds with a 90 degrees rotation (example taken from the the main RADDOSE-3D repository)
"""
from os import path
from py_raddose_3d.raddose3d import RadDose3D
from py_raddose_3d.schemas.input import Beam, Crystal, Wedge
crystal = Crystal(
GoniometerAxis=90,
Type="Cuboid",
Dimensions=(20, 60, 20),
PixelsPerMicron=1.0,
AngleL=0,
AngleP=0,
# --------------------------------------
AbsCoefCalc="sequence",
SeqFile=path.join(path.dirname(__file__), "2veo.fasta"),
UnitCell=(91.539, 91.539, 299.842, 90.0, 90.0, 90.0),
NumMonomers=10,
# ---If not using sequence and experimental data----
# ---then change AbsCoefCalc to 'Average'-----------
# AbsCoefCalc="Average",
)
beam = Beam(
Type="Gaussian",
Flux=3e11,
FWHM=(10, 10),
Energy=13.0,
# EnergyFWHM=0.0025, # Slooooow
Collimation=("Circular", 10, 10),
)
wedge_1 = Wedge(
Wedge=(0, 180),
ExposureTime=10,
AngularResolution=1,
StartOffset=(0, -20, 0),
)
wedge_2 = Wedge(
Wedge=(0, 180),
ExposureTime=10,
AngularResolution=1,
StartOffset=(0, -10, 0),
RotAxBeamOffset=2.5,
TranslatePerDegree=(0, 0.15, 0),
)
rad_dose_3d = RadDose3D(
sample_id="my_sample",
crystal=crystal,
beam=beam,
wedge=[
wedge_1,
wedge_2,
],
# The output directory can be specified here or left as none.
# If specified, it needs to exist already.
output_directory=None,
)
summary = rad_dose_3d.run()
print(summary)