Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename b_iso to adp_iso and expand adp_type to four values
  • Loading branch information
AndrewSazonov committed Apr 11, 2026
commit 44ffc1458fab7308b3da03bf2c18f7b8ac68aa83
6 changes: 3 additions & 3 deletions docs/architecture/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ data live in separate collections on `Structure`. Every atom always has
an entry in both collections; when `adp_type` is isotropic, the aniso
parameters hold `0.0` and are ignored by calculators.

**Type-neutral names.** `atom_site.adp_iso` replaces the former
`atom_site.b_iso`. Its physical meaning (B or U) is determined by
**Type-neutral names.** `atom_site.adp_iso` is the type-neutral
isotropic ADP parameter. Its physical meaning (B or U) is determined by
`atom_site.adp_type`. Similarly, `atom_site_aniso.adp_11`…`adp_23` are
type-neutral tensor components.

Expand Down Expand Up @@ -868,7 +868,7 @@ project.structures['lbco'].atom_sites.create(
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.5,
adp_iso=0.5,
occupancy=0.5,
)

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorials/ed-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
# define aliases and then use them to create a constraint.
project.analysis.aliases.create(
label='biso_La',
param=project.structures['lbco'].atom_sites['La'].b_iso,
param=project.structures['lbco'].atom_sites['La'].adp_iso,
)
project.analysis.aliases.create(
label='biso_Ba',
param=project.structures['lbco'].atom_sites['Ba'].b_iso,
param=project.structures['lbco'].atom_sites['Ba'].adp_iso,
)
project.analysis.constraints.create(expression='biso_Ba = biso_La')

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorials/ed-10.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
fract_y=0.0,
fract_z=0.0,
wyckoff_letter='a',
b_iso=0.5,
adp_iso=0.5,
)

# %% [markdown]
Expand Down Expand Up @@ -70,7 +70,7 @@

# %%
project.structures['ni'].cell.length_a.free = True
project.structures['ni'].atom_sites['Ni'].b_iso.free = True
project.structures['ni'].atom_sites['Ni'].adp_iso.free = True

# %%
project.experiments['pdf'].linked_phases['ni'].scale.free = True
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorials/ed-11.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.5,
adp_iso=0.5,
)

# %% [markdown]
Expand Down Expand Up @@ -81,7 +81,7 @@

# %%
project.structures['si'].cell.length_a.free = True
project.structures['si'].atom_sites['Si'].b_iso.free = True
project.structures['si'].atom_sites['Si'].adp_iso.free = True
experiment.linked_phases['si'].scale.free = True

# %%
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/tutorials/ed-12.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=1.0,
adp_iso=1.0,
)
project.structures['nacl'].atom_sites.create(
label='Cl',
Expand All @@ -59,7 +59,7 @@
fract_y=0.5,
fract_z=0.5,
wyckoff_letter='b',
b_iso=1.0,
adp_iso=1.0,
)

# %% [markdown]
Expand Down Expand Up @@ -103,8 +103,8 @@

# %%
project.structures['nacl'].cell.length_a.free = True
project.structures['nacl'].atom_sites['Na'].b_iso.free = True
project.structures['nacl'].atom_sites['Cl'].b_iso.free = True
project.structures['nacl'].atom_sites['Na'].adp_iso.free = True
project.structures['nacl'].atom_sites['Cl'].adp_iso.free = True

# %%
project.experiments['xray_pdf'].linked_phases['nacl'].scale.free = True
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/tutorials/ed-13.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.89,
adp_iso=0.89,
)

# %% [markdown]
Expand Down Expand Up @@ -1013,7 +1013,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.95,
adp_iso=0.95,
occupancy=0.5,
)
project_2.structures['lbco'].atom_sites.create(
Expand All @@ -1023,7 +1023,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.95,
adp_iso=0.95,
occupancy=0.5,
)
project_2.structures['lbco'].atom_sites.create(
Expand All @@ -1033,7 +1033,7 @@
fract_y=0.5,
fract_z=0.5,
wyckoff_letter='b',
b_iso=0.80,
adp_iso=0.80,
)
project_2.structures['lbco'].atom_sites.create(
label='O',
Expand All @@ -1042,7 +1042,7 @@
fract_y=0.5,
fract_z=0.5,
wyckoff_letter='c',
b_iso=1.66,
adp_iso=1.66,
)

# %% [markdown]
Expand Down Expand Up @@ -1385,7 +1385,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.89,
adp_iso=0.89,
)

# Assign Structure to Experiment
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/tutorials/ed-14.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
structure = project.structures['tbti']

# %%
structure.atom_sites['Tb'].b_iso = 0.0
structure.atom_sites['Ti'].b_iso = 0.0
structure.atom_sites['O1'].b_iso = 0.0
structure.atom_sites['O2'].b_iso = 0.0
structure.atom_sites['Tb'].adp_iso = 0.0
structure.atom_sites['Ti'].adp_iso = 0.0
structure.atom_sites['O1'].adp_iso = 0.0
structure.atom_sites['O2'].adp_iso = 0.0

# %%
structure.show_as_cif()
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorials/ed-16.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.2,
adp_iso=0.2,
)

# %% [markdown]
Expand Down Expand Up @@ -209,7 +209,7 @@

# %%
structure.cell.length_a.free = True
structure.atom_sites['Si'].b_iso.free = True
structure.atom_sites['Si'].adp_iso.free = True

# %% [markdown]
# Bragg experiment parameters.
Expand Down
38 changes: 19 additions & 19 deletions docs/docs/tutorials/ed-17.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.3,
adp_iso=0.3,
)
structure.atom_sites.create(
label='Co2',
Expand All @@ -75,7 +75,7 @@
fract_y=0.25,
fract_z=0.985,
wyckoff_letter='c',
b_iso=0.3,
adp_iso=0.3,
)
structure.atom_sites.create(
label='Si',
Expand All @@ -84,7 +84,7 @@
fract_y=0.25,
fract_z=0.429,
wyckoff_letter='c',
b_iso=0.34,
adp_iso=0.34,
)
structure.atom_sites.create(
label='O1',
Expand All @@ -93,7 +93,7 @@
fract_y=0.25,
fract_z=0.771,
wyckoff_letter='c',
b_iso=0.63,
adp_iso=0.63,
)
structure.atom_sites.create(
label='O2',
Expand All @@ -102,7 +102,7 @@
fract_y=0.25,
fract_z=0.217,
wyckoff_letter='c',
b_iso=0.59,
adp_iso=0.59,
)
structure.atom_sites.create(
label='O3',
Expand All @@ -111,7 +111,7 @@
fract_y=0.032,
fract_z=0.28,
wyckoff_letter='d',
b_iso=0.83,
adp_iso=0.83,
)

# %% [markdown]
Expand Down Expand Up @@ -218,12 +218,12 @@
structure.atom_sites['O3'].fract_y.free = True
structure.atom_sites['O3'].fract_z.free = True

structure.atom_sites['Co1'].b_iso.free = True
structure.atom_sites['Co2'].b_iso.free = True
structure.atom_sites['Si'].b_iso.free = True
structure.atom_sites['O1'].b_iso.free = True
structure.atom_sites['O2'].b_iso.free = True
structure.atom_sites['O3'].b_iso.free = True
structure.atom_sites['Co1'].adp_iso.free = True
structure.atom_sites['Co2'].adp_iso.free = True
structure.atom_sites['Si'].adp_iso.free = True
structure.atom_sites['O1'].adp_iso.free = True
structure.atom_sites['O2'].adp_iso.free = True
structure.atom_sites['O3'].adp_iso.free = True

# %%
expt.linked_phases['cosio'].scale.free = True
Expand All @@ -246,11 +246,11 @@
# %%
project.analysis.aliases.create(
label='biso_Co1',
param=structure.atom_sites['Co1'].b_iso,
param=structure.atom_sites['Co1'].adp_iso,
)
project.analysis.aliases.create(
label='biso_Co2',
param=structure.atom_sites['Co2'].b_iso,
param=structure.atom_sites['Co2'].adp_iso,
)

# %% [markdown]
Expand Down Expand Up @@ -353,11 +353,11 @@ def extract_diffrn(file_path):
# Plot isotropic displacement parameters vs. temperature.

# %%
project.plotter.plot_param_series(structure.atom_sites['Co1'].b_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['Si'].b_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O1'].b_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O2'].b_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O3'].b_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['Co1'].adp_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['Si'].adp_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O1'].adp_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O2'].adp_iso, versus=temperature)
project.plotter.plot_param_series(structure.atom_sites['O3'].adp_iso, versus=temperature)

# %% [markdown]
# Plot selected fractional coordinates vs. temperature.
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/tutorials/ed-2.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.5,
adp_iso=0.5,
occupancy=0.5,
)
structure.atom_sites.create(
Expand All @@ -66,7 +66,7 @@
fract_y=0,
fract_z=0,
wyckoff_letter='a',
b_iso=0.5,
adp_iso=0.5,
occupancy=0.5,
)
structure.atom_sites.create(
Expand All @@ -76,7 +76,7 @@
fract_y=0.5,
fract_z=0.5,
wyckoff_letter='b',
b_iso=0.5,
adp_iso=0.5,
)
structure.atom_sites.create(
label='O',
Expand All @@ -85,7 +85,7 @@
fract_y=0.5,
fract_z=0.5,
wyckoff_letter='c',
b_iso=0.5,
adp_iso=0.5,
)

# %% [markdown]
Expand Down Expand Up @@ -136,10 +136,10 @@
# %%
structure.cell.length_a.free = True

structure.atom_sites['La'].b_iso.free = True
structure.atom_sites['Ba'].b_iso.free = True
structure.atom_sites['Co'].b_iso.free = True
structure.atom_sites['O'].b_iso.free = True
structure.atom_sites['La'].adp_iso.free = True
structure.atom_sites['Ba'].adp_iso.free = True
structure.atom_sites['Co'].adp_iso.free = True
structure.atom_sites['O'].adp_iso.free = True

# %%
experiment.instrument.calib_twotheta_offset.free = True
Expand Down
Loading