iotbx.shelx

API documentation

iotbx.shelx.cctbx_xray_structure_from(cls, file=None, filename=None, set_grad_flags=True, min_distance_sym_equiv=0.5, strictly_shelxl=True)
iotbx.shelx.smtbx_refinement_model_from(cls, ins_or_res=None, hkl=None, fo_sq=None)
iotbx.shelx.crystal_symmetry_from_ins.extract_from(file_name=None, file=None, max_characters=100000)
iotbx.shelx.hklf.miller_array_export_as_shelx_hklf(miller_array, file_object=None, normalise_if_format_overflow=False)

If the maximum data value does not fit into the f8.2/f8.0 format: normalise_if_format_overflow=False: RuntimeError is thrown normalise_if_format_overflow=True: data is normalised to the largest number to fit f8.2/f8.0 format

class iotbx.shelx.hklf.reader(file_object=None, file_name=None)

Methods

alphas()
as_miller_arrays([crystal_symmetry, ...])
batch_numbers()
data(( (hklf_reader)arg1) -> double :) C++ signature :
indices(( (hklf_reader)arg1) -> miller_index :) C++ signature :
sigmas(( (hklf_reader)arg1) -> double :) C++ signature :
wavelengths()
alphas()
as_miller_arrays(crystal_symmetry=None, force_symmetry=False, merge_equivalents=True, base_array_info=None)
batch_numbers()
wavelengths()
class iotbx.shelx.tokens.atomname_token(name, symmetry=None, residue_number=None, plus_minus=None)

An atomname token that can be passed to a SHELXL instruction

name
plus_minus
residue_number
symmetry
class iotbx.shelx.tokens.element_token(element, residue_number=None, plus_minus=None)

An element name may also be passed to a SHELXL instruction in place of an atom name

element
plus_minus
residue_number
class iotbx.shelx.tokens.residue_token(class_=None, number=None)
class_
number

Parsing of ins/res files

class iotbx.shelx.lexer.command_stream(file=None, filename=None)

An ins/res file parsed as a stream of commands

cmd = 'ZERR'
commands_allowing_atom_names = {'EXYZ': 1, 'CHIV': 1, 'CONF': 1, 'DFIX': 1, 'ANIS': 1, 'CONN': 1, 'HFIX': 1, 'HTAB': 1, 'OMIT': 1, 'MPLA': 1, 'BOND': 1, 'FLAT': 1, 'SIMU': 1, 'SADI': 1, 'FREE': 1, 'ISOR': 1, 'DELU': 1, 'EADP': 1, 'NCSY': 1, 'BIND': 1, 'SAME': 1, 'RTAB': 1, 'BLOC': 1, 'DANG': 1}
shelx_commands = {'DISP': 1, 'FRAG': 1, 'MOLE': 1, 'EXYZ': 1, 'MOVE': 1, 'CHIV': 1, 'AFIX': 1, 'SUMP': 1, 'PART': 1, 'FREE': 1, 'CONF': 1, 'REM': 1, 'DFIX': 1, 'ANIS': 1, 'HKLF': 1, 'CONN': 1, 'MERG': 1, 'FMAP': 1, 'CGLS': 1, 'TEMP': 1, 'TITL': 1, 'DAMP': 1, 'OMIT': 1, 'LAUE': 1, 'CELL': 1, 'SWAT': 1, 'SFAC': 1, 'EADP': 1, 'WPDB': 1, 'WGHT': 1, 'MUST': 1, 'STIR': 1, 'EXTI': 1, 'BOND': 1, 'DEFS': 1, 'FLAT': 1, 'END': 1, 'SIMU': 1, 'LATT': 1, 'BUMP': 1, 'SADI': 1, 'SHEL': 1, 'L.S.': 1, 'SYMM': 1, 'ZERR': 1, 'BASF': 1, 'HTAB': 1, 'TWIN': 1, 'RESI': 1, 'GRID': 1, 'PLAN': 1, 'HFIX': 1, 'UNIT': 1, 'SIZE': 1, 'FEND': 1, 'DELU': 1, 'NCSY': 1, 'RTAB': 1, 'BIND': 1, 'EQIV': 1, 'LIST': 1, 'SAME': 1, 'FVAR': 1, 'ISOR': 1, 'BLOC': 1, 'MPLA': 1, 'TIME': 1, 'DANG': 1, 'ACTA': 1, 'SPEC': 1, 'HOPE': 1, 'MORE': 1}
symm_space = <_sre.SRE_Pattern object at 0x40a75b0>

Lexing of ins/res files

class iotbx.shelx.parsers.afix_parser(command_stream, builder=None)

It must be before an atom parser

Methods

filtered_commands()
parse()
constraints = {16: ('terminal_linear_ch_site', -1), 1: ('tertiary_xh_site', -1), 2: ('secondary_xh2_sites', -1), 3: ('staggered_terminal_tetrahedral_xh3_sites', -1), 4: ('secondary_planar_xh_site', -1), 8: ('staggered_terminal_tetrahedral_xh_site', -1), 9: ('terminal_planar_xh2_sites', -1), 13: ('terminal_tetrahedral_xh3_sites', -1), 14: ('terminal_tetrahedral_xh_site', -1), 15: ('polyhedral_bh_site', -1)}
filtered_commands()
class iotbx.shelx.parsers.atom_parser(command_stream, builder=None, strictly_shelxl=True)

A parser pulling out the scatterer info from a command stream.

Since the SHELX format intertwine parameter values with some of the constrained on them, this parser does also handle those constraints, specifically constrained occupancies and u_iso bound to the u_eq of another scatterer. The parser tests whether the builder passed at construction time handles those constraints, and if it does not so, they get ignored.

Methods

decode_one_variable(coded_variable[, u_iso_idx])
decode_variables(coded_variables[, u_iso_idx])
filtered_commands()
lex_scatterer(args, scatterer_index)
parse()
process_occupancies_depending_on_free_variable()
process_possible_constrained_occupancy(...)
process_possible_u_iso_constraints(...)
filtered_commands()
lex_scatterer(args, scatterer_index)
process_occupancies_depending_on_free_variable()
process_possible_constrained_occupancy(scatterer_index, scatterer, occupancy_behaviour)
process_possible_u_iso_constraints(u_iso_scatterer_idx, u_iso_behaviour)
class iotbx.shelx.parsers.crystal_symmetry_parser(command_stream, builder=None)

A parser pulling out the crystal symmetry info from a command stream

Methods

filtered_commands() Yields those command in self.command_stream that this parser is not concerned with.
parse()
filtered_commands()

Yields those command in self.command_stream that this parser is not concerned with. On the contrary, LATT, SYMM are swallowed (CELL is yielded because it carries the wavelength too).

parse()
iotbx.shelx.parsers.decode_variables(free_variable, coded_variables, u_iso_idx=None, line=None, strictly_shelxl=True, variable_decoder=None)
class iotbx.shelx.parsers.instruction_parser(command_stream, builder=None)

A parser for extracting from the command stream miscellaneous shelxl commands that do not concern other parsers.

If this parser is constructed with a real builder, the wt and m arguments to HKLF are not supported.

This parser is unusual in that it does not rely entirely on its builder: it builds a dictionary containing the parsed information.

Methods

filtered_commands()
issue_merohedral_twinning()
parse()
filtered_commands()
issue_merohedral_twinning()
class iotbx.shelx.parsers.parser(command_stream, builder=None)

Methods

parse()
parse()
class iotbx.shelx.parsers.restraint_parser(command_stream, builder=None)

It must be after an atom parser

Methods

cache_restraint(cmd, cmd_residue, line, args)
filtered_commands()
i_seqs_from_atoms(atoms, residue_number)
parse()
parse_restraints()
cache_restraint(cmd, cmd_residue, line, args)
filtered_commands()
i_seqs_from_atoms(atoms, residue_number)
parse_restraints()
restraint_types = {'FLAT': 'planarity', 'ISOR': 'isotropic_adp', 'DELU': 'rigid_bond', 'SIMU': 'adp_similarity', 'SADI': 'bond_similarity', 'DANG': 'bond', 'DFIX': 'bond', 'CHIV': 'chirality'}
class iotbx.shelx.parsers.variable_decoder

Methods

decode_one_variable(coded_variable[, u_iso_idx])
decode_variables(coded_variables[, u_iso_idx])
decode_one_variable(coded_variable, u_iso_idx=None)
decode_variables(coded_variables, u_iso_idx=None)
class iotbx.shelx.parsers.wavelength_parser(command_stream, builder=None)

A parser pulling out the wavelength info from a command stream

Methods

filtered_commands()
parse()
filtered_commands()
iotbx.shelx.writer.generator(xray_structure, data_are_intensities=True, title=None, wavelength=None, temperature=None, full_matrix_least_squares_cycles=None, conjugate_gradient_least_squares_cycles=None, overall_scale_factor=None, weighting_scheme_params=None, sort_scatterers=True)
iotbx.shelx.write_ins.LATT_SYMM(s, space_group, decimal=False)
iotbx.shelx.write_ins.shelxd(s, title, crystal_symmetry, n_sites, scattering_type, d_min, mind_mdis=-3.5, mind_mdeq=None)

Table Of Contents

This Page