Module to skim the PDB for similar unit cells
LatticeSearch
(lattice_db_fname, model_dir)[source]¶Bases: object
A class to do a search for PDB entries with similar unit cell dimensions
Attributes
lattice_db_fname |
The path to the lattice database |
model_dir |
The path to the model directory |
Methods
calculate_niggli_cell (unit_cell, space_group) |
Calculate the parameters of the Niggli cell |
calculate_penalty (query, reference) |
Calculate the linear cell variation between unit cells |
calculate_probability (penalty_score) |
Calculate the probability that a penalty score will give a solution |
calculate_volume_difference (query, reference) |
Calculate the difference in volume between the query unit cell and the reference unit cell |
cell_within_tolerance (query, reference, …) |
Compare two cells and determine if query is within reference cell parameter tolerance |
check_sg (sg) |
Check the space group for known anomalies |
copy_results (source, destination) |
Copy the results from a local copy of the PDB |
download_results (destination) |
Download the results directly from the PDB |
pdb_in_results (pdb_code, results) |
Check to see if a pdb_code has already been appended to the results |
search (space_group, unit_cell[, tolerance, …]) |
Search for similar Niggli cells |
summarize (csvfile) |
Summarize the search results |
calculate_niggli_cell
(unit_cell, space_group)[source]¶Calculate the parameters of the Niggli cell
Parameters: | unit_cell : list, tuple
space_group : str
|
---|---|
Returns: | list
|
calculate_penalty
(query, reference)[source]¶Calculate the linear cell variation between unit cells
Parameters: | query : list, tuple
reference : list, tuple
|
---|---|
Returns: | float
float
float
|
calculate_probability
(penalty_score)[source]¶Calculate the probability that a penalty score will give a solution
Parameters: | penalty_score : float
|
---|---|
Returns: | float
|
calculate_volume_difference
(query, reference)[source]¶Calculate the difference in volume between the query unit cell and the reference unit cell
Parameters: | query : list, tuple
reference : list, tuple
|
---|---|
Returns: | float
|
cell_within_tolerance
(query, reference, tolerance)[source]¶Compare two cells and determine if query
is within reference
cell parameter tolerance
Parameters: | query : list, tuple
reference : list, tuple
tolerance : list, tuple
|
---|---|
Returns: | bool |
copy_results
(source, destination)[source]¶Copy the results from a local copy of the PDB
Parameters: | source : str
destination : str
|
---|---|
Raises: | ValueError
ValueError
IOError
|
download_results
(destination)[source]¶Download the results directly from the PDB
Parameters: | destination : str
|
---|---|
Raises: | ValueError
ValueError
RuntimeError
|
lattice_db_fname
¶The path to the lattice database
model_dir
¶The path to the model directory
pdb_in_results
(pdb_code, results)[source]¶Check to see if a pdb_code has already been appended to the results
search
(space_group, unit_cell, tolerance=0.05, max_to_keep=50, max_penalty=12)[source]¶Search for similar Niggli cells
Parameters: | unit_cell : list, tuple
space_group : str
tolerance : int, float, optional
max_to_keep : int, optional
max_penalty : int, optional
|
---|