Classes and functions for creating crystals by unit cell.
Copyright Schrodinger, LLC. All rights reserved.
bool
|
is_infinite(astructure)
Return a boolean indicating whether the given structure is infinitely
bonded, meaning that it has bonds that cross the periodic boundary
which can not be eliminated by means of molecule contraction. |
|
|
|
store_chorus_box_props(struct,
ax,
ay=0.0,
az=0.0,
bx=0.0,
by=None,
bz=0.0,
cx=0.0,
cy=0.0,
cz=None)
Add properties to the structure that define the periodic boundary
condition in the way Desmond wants it defined. |
|
|
|
|
dict
|
|
list
|
|
numpy.array, numpy.array, numpy.array
|
get_lattice_vectors(a_param,
b_param,
c_param,
alpha_param,
beta_param,
gamma_param)
Get the lattice vectors of the specified parallelepiped. |
|
|
dict
|
delete_duplicate_atoms(astructure,
atoms_to_check=None,
duplicate_thresh=0.25,
transform=None,
fract_offset=0.0001)
Delete duplicate atoms that are within the defined threshold. |
|
|
float
|
max_connect_distance(cov_rad_a,
cov_rad_b,
cov_factor=1.0,
cov_offset=0.45)
Return the maximum bonding distance for the given covalent radii and
distance equation parameters. |
|
|
list, dict, dict
|
connect_atoms(astructure,
atoms_to_connect=None,
cov_min=0.4,
cov_offset=0.45,
cov_factor=1.0,
delete_existing=True,
organic_structure=None,
cov_radii_props=True,
pbc_bonding=True,
only_pbc_bonds=False,
check_also_reg_bond=False)
Connect the atoms in a structure. |
|
|
bool
|
before_lower_edge(coord,
lower_bound)
Return True if this fractional coordinate value is before the lower
edge of the cell. |
|
|
bool
|
on_lower_edge(coord,
lower_bound,
fract_offset=0.0001)
Return True if this fractional coordinate value is on the lower edge
of the cell. |
|
|
bool
|
inside_cell(coord,
lower_bound,
upper_bound,
fract_offset=0.0001)
Return True if this fractional coordinate value is inside the cell. |
|
|
bool
|
on_upper_edge(coord,
lower_bound,
fract_offset=0.0001)
Return True if this fractional coordinate value is on the upper edge
of the cell. |
|
|
bool
|
after_upper_edge(coord,
lower_bound,
fract_offset=0.0001)
Return True if this fractional coordinate value is after the upper
edge of the cell. |
|
|
|
translate_to_cell(astructure,
fract_offset=0.0001,
origin=[ 0.0, 0.0, 0.0] ,
transform=None,
extents=None)
Translate the fractional coordinate definitions of the atoms of the
given structure so that they are all in the cell defined with the
given origin and given extents and optionally also actually transform
the Cartesian coordinates of the atoms using the specified
fractional-to-Cartesian transform. |
|
|
|
trans_atoms_fract_to_cart(astructure,
transform)
Transform the atoms in a structure from the fractional basis to the
Cartesian basis. |
|
|
|
trans_atoms_cart_to_fract(astructure,
transform)
Transform the atoms in a structure from the Cartesian basis to the
fractional basis. |
|
|
int
|
get_gcd_list_ints(list_of_ints)
Return the greatest common divisor (GCD) of a list of integers. |
|
|
bool
|
is_organic_structure(astructure,
percent_metal_threshold=25.0)
Return True if the structure contains more than one type of element
and no more than the given percentage of metal elements. |
|
|
bool
|
|
bool
|
has_organic_molecule(astructure,
percent_metal_threshold=25.0)
Return True if the provided structure contains at least one organic
molecule. |
|
|
bool
|
has_closed_shell_organic_molecule(astructure,
percent_metal_threshold=25.0)
Return True if the provided structure contains at least one
closed-shell organic molecule. |
|
|
bool
|
|
list
|
|
three numpy.array
|
|
int
|
get_collapsed_index(abc,
alimit,
blimit,
climit)
Given a three dimensional grid of integers defined on [1, limit] for
the given a, b, and c limits and a traversal path of c then b then a
return the number of integers traversed in order to reach the given
abc integer index triple. |
|
|
int
|
modified_sawtooth(n,
x)
Given a positive integer variable x in [0, n+1] return a signal from
a modified sawtooth function. |
|
|
schrodinger.Structure.structure
|
assign_bond_orders(astructure,
logger=None)
Return a copy of the input structure that has bond orders assigned. |
|
|
|
|
schrodinger.Structure.structure
|
|
tuple
|
get_chorus_properties(astructure)
Return a tuple containing the nine chorus properties of the given
structure. |
|
|
list
|
get_params_from_chorus(chorus_properties)
Return the a, b, c, alpha, beta, and gamma lattice properties from
the nine chorus properties. |
|
|
list
|
|
float
|
|
float
|
|
set
|
get_cell_pairs(astructure,
cell_distance,
pbc_bonding=True,
atom_indices=None,
chorus_properties=None)
Using a distance cell that optionally honors a PBC return a list of
tuples of atom index pairs that are within the specified distance. |
|
|
|
add_labeled_pbc_bond(astructure,
atom1,
atom2,
order,
is_pbc_bond=False,
also_reg_bond=False,
color=4)
Add the specified bond to the provided structure and label it
depending on if it is a PBC bond. |
|
|
int
|
get_natom_btw_two_cells(cell1,
cell2,
extents,
size)
Using a traversal path of c then b then a, return the number of atoms
between two cells, of the given size, in a super cell with the given
extents. |
|
|
|
|
tuple
|
is_pbc_bond(astructure,
atom1,
atom2,
check_also_reg_bond=False,
unit_lattice_vectors=None)
Return a (is_pbc_bond, also_reg_bond, bond_distance) tuple that
indicates (1) whether the specified bond is a PBC bond, (2) if
checked whether that PBC bond is also a regular bond, and (3) the
bond length. |
|
|
tuple
|
|
dict
|
|
int
|
|
str
|
|
numpy.array
|
trans_cart_to_fract(cart_vec,
a_param,
b_param,
c_param,
alpha_param,
beta_param,
gamma_param)
Transform the given vector in the Cartesian basis to the fractional
basis. |
|
|
numpy.array
|
trans_fract_to_cart(fract_vec,
a_param,
b_param,
c_param,
alpha_param,
beta_param,
gamma_param)
Transform the given vector in the fractional basis to the Cartesian
basis. |
|
|
numpy array
|
trans_cart_to_frac_from_vecs(coords,
a_vec,
b_vec,
c_vec,
rec=False)
Transform coordinates from (reciprocal) Cartesian to (reciprocal)
fractional using lattice vectors. |
|
|
numpy array
|
trans_frac_to_cart_from_vecs(coords,
a_vec,
b_vec,
c_vec,
rec=False)
Transform coordinates from (reciprocal) fractional to (reciprocal)
Cartesian using lattice vectors. |
|
|
schrodinger.structure.Structure
|
get_cell(asu,
space_group=None,
lattice_params=None,
extents=None,
xtal_kwargs=None)
Build and return a crystalline cell using the given asymmetric unit,
space group, lattice parameters, and extents. |
|
|
list
|
|
tuple of matrices
|
get_conv_from_vecs(a_vec,
b_vec,
c_vec)
Generate matrices to convert from fractional to Cartesian and back. |
|
|
|
create_new_box(struct)
Create a new box that is large enough to encompass the X, Y and Z
lengths of the system |
|
|
|
|
schrodinger.structure.Structure
|
make_p1(astructure,
logger=None)
Make a P1 cell. |
|
|
structure.Structure or bool
|
sync_pbc(st,
create_pbc=False)
Return the given structure with a synchronized PBC, if create_pbc is
True and the structure lacks a PBC then one will be created,
otherwise this function will return False if there is no PBC. |
|
|
dict
|
|
|
|
|
set_pbc_properties(astructure,
chorus_properties)
Set the chorus and PDB properties on the given structure using the
given chorus properties. |
|
|
|
transform_pbc(struct_in,
supercell_matrix,
scale_only=False,
cell_only=False,
origin_shift=None)
Create a new structure based on the transformation matrix. |
|
|
list of three ints
|
get_simple_supercell_matrix(supercell_matrix)
Get minimal diagonal elements of a simple supercell matrix starting
from (non)-diagonal supercell matrix. |
|
|
structure.Structure
|
|
3 x 3 float list
|
|
|
set_physical_properties(struct)
Set cell formula, volume and density to struct. |
|
|
structure.Structure
|
move_atoms_into_cell(struct,
frac_coords=None,
overlap_tresh=0.25,
fract_offset=0.0001)
Get structure with all the atoms moved into the first cell. |
|
|
list of tuples
|
|
|
|
|
label_pbc_bond(abond,
also_reg_bond=False,
color=4)
Label this PBC bond. |
|
|
SpaceGroup, namedtuple or None, namedtuple
|
get_spg_from_spglib(space_groups,
spg_type_in,
spg_symm,
double_named_groups=set([ ' Bbcb ' , ' Bbeb ' , ' Pcna ' , ' Pmnm ' , ' Pncb ' , ' Pnmm ' ]) )
Get space group from mmspg given space group type obtained from
spglib. |
|
|
bool
|
|
str or None
|
assign_space_group(struct_in,
symprec=0.01,
space_groups=None,
update_title=False)
Set space group and space group id to the input structure. |
|
|
bool, matrix 3 x 3 of integers
|
get_normal_surf_from_HKL(hkl,
vecs,
max_normal_search=10,
normal_c=True)
Calculate transformation matrix with c-axis most normal to a-b plane
from HKL plane indices and lattice vectors. |
|
|
int
|
lcm(numbers)
Get the lowest common multiple of a sequence of numbers. |
|
|
list of integers
|
reduce_vector(vector)
Get reduced vector of a transformation matrix. |
|
|
list of symmetry operators
|
|
schrodinger.structure.Structure
|
|
|
__doc__ = ...
|
|
_version = ' $Revision 0.0 $ '
|
|
PRESERVE_BONDING_KEY = ' b_matsci_Preserve_Bonding '
|
|
P1_SPACE_GROUP_SYMBOL = ' P 1 '
|
|
P1_SPACE_GROUP_ID = 1
|
|
COV_RADIUS_KEY = ' r_matsci_COV_radius/Ang. '
|
|
FRACT_OFFSET = 0.0001
|
|
PERCENT_METAL_THRESHOLD = 25.0
|
|
OVERLAP_ATOM_THRESHOLD = 0.25
|
|
METAL_ASL = ' metals '
|
|
PROTEIN_ASL = ' protein '
|
|
MMPDB_MAX_ELEMENTS = 103
|
|
AHEAD_BASE_TRIPLES = [ ( 1, 0, 0) , ( 0, 1, 0) , ( 0, 0, 1) ]
|
|
AHEAD_TRIPLES = [ ( 1, 0, 0) , ( 0, 1, 0) , ( 0, 0, 1) , ( 0, 1, 1) , ( ...
|
|
LATTICE_PARAMS_KEYS = [ ' a_param ' , ' b_param ' , ' c_param ' , ' alpha ...
|
|
EXTENTS_KEYS = [ ' ncella ' , ' ncellb ' , ' ncellc ' ]
|
|
ATOM_TO_BOND_REPR_DICT = { 0: 1, 1: 1, 2: 2, 3: 3}
|
|
PBC_POSITION_KEY = ' s_mae_pbc_position '
|
|
CENTER_PBC_POSITION = ' center_structure '
|
|
ANCHOR_PREFIX = ' anchor_ '
|
|
ANCHOR_PBC_POSITION = ' anchor_%s_%s_%s '
|
|
SPGLIB_DOUBLY_NAMED_SHORT = set([ ' Bbcb ' , ' Bbeb ' , ' Pcna ' , ' Pmnm ...
|
|
ASSIGN_SPG_SYMPREC = 0.01
|
|
NORMAL_SURF_HKL_THR = 1e-08
|
|
SPG_TO_HALL_NUMBER = [ 1, 2, 3, 6, 9, 18, 21, 30, 39, 57, 60, 6...
|
|
SYMMOP_ROUND = 2
|
|
LAST_ELEMENTS = ( ' H ' , ' C ' , ' N ' , ' O ' , ' F ' , ' P ' , ' S ' , ' Cl ' , ' Se ' ...
|
|
MMPDB_COV_RADII = { 1: 0.32, 2: 0.93, 3: 1.23, 4: 0.9, 5: 0.82, ...
|
|
MAX_MMPDB_COV_RADIUS = 2.6
|
|
__package__ = ' schrodinger.application.matsci.nano '
|