diff --git a/docs/.buildinfo b/docs/.buildinfo index 3fbb62b..8ca18ff 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a0485ab5aa21ddde156875505b9df3e6 +config: 30541112c5c64755b831f359f99dc274 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/Makefile b/docs/Makefile index b08a3da..98726b7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,9 +3,9 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = python -msphinx +SPHINXBUILD = sphinx-build SPHINXPROJ = pywindow -SOURCEDIR = source +SOURCEDIR = ./source/ BUILDDIR = .. # Put it first so that "make" without argument is like "make help". diff --git a/docs/_modules/index.html b/docs/_modules/index.html index 3ec21e5..737011e 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -153,7 +153,7 @@

All modules for which code is available

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -186,7 +186,6 @@

All modules for which code is available

- diff --git a/docs/_modules/pywindow/io_tools.html b/docs/_modules/pywindow/io_tools.html index 79cd46e..dbcd629 100644 --- a/docs/_modules/pywindow/io_tools.html +++ b/docs/_modules/pywindow/io_tools.html @@ -173,7 +173,7 @@

Source code for pywindow.io_tools

         self.message = message
 
 
-
[docs]class Input(object): +
[docs]class Input(object): """Class used to load and process input files.""" def __init__(self): @@ -183,7 +183,7 @@

Source code for pywindow.io_tools

             '.mol': self._read_mol,
         }
 
-
[docs] def load_file(self, filepath): +
[docs] def load_file(self, filepath): """ This function opens any type of a readable file and decompose the file object into a list, for each line, of lists containing @@ -213,7 +213,7 @@

Source code for pywindow.io_tools

 
         return (self._load_funcs[self.file_type]())
-
[docs] def load_rdkit_mol(self, mol): +
[docs] def load_rdkit_mol(self, mol): """ Return molecular data from :class:`rdkit.Chem.rdchem.Mol` object. @@ -321,7 +321,7 @@

Source code for pywindow.io_tools

         return self.system
-
[docs]class Output(object): +
[docs]class Output(object): """Class used to process and save output files.""" def __init__(self): @@ -331,7 +331,7 @@

Source code for pywindow.io_tools

             'pdb': self._save_pdb,
         }
 
-
[docs] def dump2json(self, obj, filepath, override=False, **kwargs): +
[docs] def dump2json(self, obj, filepath, override=False, **kwargs): """ Dump a dictionary into a JSON dictionary. @@ -371,7 +371,7 @@

Source code for pywindow.io_tools

         with open(filepath, 'w+') as json_file:
             json.dump(obj, json_file, **kwargs)
-
[docs] def dump2file(self, obj, filepath, override=False, **kwargs): +
[docs] def dump2file(self, obj, filepath, override=False, **kwargs): """ Dump a dictionary into a file. (Extensions: XYZ or PDB) @@ -545,7 +545,7 @@

Source code for pywindow.io_tools

 
   

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -578,7 +578,6 @@

Source code for pywindow.io_tools

       
       
       
-      
 
   
 
diff --git a/docs/_modules/pywindow/molecular.html b/docs/_modules/pywindow/molecular.html
index 1a35d8e..797dbc7 100644
--- a/docs/_modules/pywindow/molecular.html
+++ b/docs/_modules/pywindow/molecular.html
@@ -380,7 +380,7 @@ 

Source code for pywindow.molecular

         return self.convexhull
 
 
-
[docs]class Molecule(_Shape): +
[docs]class Molecule(_Shape): """ Container for a single molecule. @@ -475,7 +475,7 @@

Source code for pywindow.molecular

         """
         return cls(Input().load_rdkit_mol(mol), system_name, mol_id)
 
-
[docs] def full_analysis(self, ncpus=1, **kwargs): +
[docs] def full_analysis(self, ncpus=1, **kwargs): """ Perform a full structural analysis of a molecule. @@ -555,7 +555,7 @@

Source code for pywindow.molecular

         else:
             return None
 
-
[docs] def calculate_centre_of_mass(self): +
[docs] def calculate_centre_of_mass(self): """ Return the xyz coordinates of the centre of mass of a molecule. @@ -569,7 +569,7 @@

Source code for pywindow.molecular

         self.properties['centre_of_mass'] = self.centre_of_mass
         return self.centre_of_mass
-
[docs] def calculate_maximum_diameter(self): +
[docs] def calculate_maximum_diameter(self): """ Return the maximum diamension of a molecule. @@ -588,7 +588,7 @@

Source code for pywindow.molecular

         }
         return self.maximum_diameter
-
[docs] def calculate_average_diameter(self, **kwargs): +
[docs] def calculate_average_diameter(self, **kwargs): """ Return the average diamension of a molecule. @@ -602,7 +602,7 @@

Source code for pywindow.molecular

             self.elements, self.coordinates, **kwargs)
         return self.average_diameter
-
[docs] def calculate_pore_diameter(self): +
[docs] def calculate_pore_diameter(self): """ Return the intrinsic pore diameter. @@ -620,7 +620,7 @@

Source code for pywindow.molecular

         }
         return self.pore_diameter
-
[docs] def calculate_pore_volume(self): +
[docs] def calculate_pore_volume(self): """ Return the intrinsic pore volume. @@ -634,7 +634,7 @@

Source code for pywindow.molecular

         self.properties['pore_volume'] = self.pore_volume
         return self.pore_volume
-
[docs] def calculate_pore_diameter_opt(self, **kwargs): +
[docs] def calculate_pore_diameter_opt(self, **kwargs): """ Return the intrinsic pore diameter (for the optimised pore centre). @@ -658,7 +658,7 @@

Source code for pywindow.molecular

         }
         return self.pore_diameter_opt
-
[docs] def calculate_pore_volume_opt(self, **kwargs): +
[docs] def calculate_pore_volume_opt(self, **kwargs): """ Return the intrinsic pore volume (for the optimised pore centre). @@ -683,7 +683,7 @@

Source code for pywindow.molecular

         Output()._save_xyz(shape_obj, filepath)
         return 1
 
-
[docs] def calculate_windows(self, **kwargs): +
[docs] def calculate_windows(self, **kwargs): """ Return the diameters of all windows in a molecule. @@ -715,7 +715,7 @@

Source code for pywindow.molecular

             )
         return None
-
[docs] def shift_to_origin(self, **kwargs): +
[docs] def shift_to_origin(self, **kwargs): """ Shift a molecule to Origin. @@ -731,7 +731,7 @@

Source code for pywindow.molecular

         self.coordinates = shift_com(self.elements, self.coordinates, **kwargs)
         self._update()
-
[docs] def molecular_weight(self): +
[docs] def molecular_weight(self): """ Return the molecular weight of a molecule. @@ -744,7 +744,7 @@

Source code for pywindow.molecular

         self.MW = molecular_weight(self.elements)
         return self.MW
-
[docs] def dump_properties_json(self, filepath=None, molecular=False, **kwargs): +
[docs] def dump_properties_json(self, filepath=None, molecular=False, **kwargs): """ Dump content of :attr:`Molecule.properties` to a JSON dictionary. @@ -778,7 +778,7 @@

Source code for pywindow.molecular

         # Dump the dictionary to json file.
         self._Output.dump2json(dict_obj, filepath, default=to_list, **kwargs)
-
[docs] def dump_molecule(self, filepath=None, include_coms=False, **kwargs): +
[docs] def dump_molecule(self, filepath=None, include_coms=False, **kwargs): """ Dump a :class:`Molecule` to a file (PDB or XYZ). @@ -895,7 +895,7 @@

Source code for pywindow.molecular

         return windows
-
[docs]class MolecularSystem: +
[docs]class MolecularSystem: """ Container for the molecular system. @@ -943,7 +943,7 @@

Source code for pywindow.molecular

         self._Output = Output()
         self.system_id = 0
 
-
[docs] @classmethod +
[docs] @classmethod def load_file(cls, filepath): """ Create a :class:`MolecularSystem` from an input file. @@ -968,7 +968,7 @@

Source code for pywindow.molecular

         obj.name, ext = os.path.splitext(obj.filename)
         return obj
-
[docs] @classmethod +
[docs] @classmethod def load_rdkit_mol(cls, mol): """ Create a :class:`MolecularSystem` from :class:`rdkit.Chem.rdchem.Mol`. @@ -988,7 +988,7 @@

Source code for pywindow.molecular

         obj.system = obj._Input.load_rdkit_mol(mol)
         return obj
-
[docs] @classmethod +
[docs] @classmethod def load_system(cls, dict_, system_id='system'): """ Create a :class:`MolecularSystem` from a python :class:`dict`. @@ -1018,7 +1018,7 @@

Source code for pywindow.molecular

         obj.system_id = system_id
         return obj
-
[docs] def rebuild_system(self, override=False, **kwargs): +
[docs] def rebuild_system(self, override=False, **kwargs): """ Rebuild molecules in molecular system. @@ -1060,7 +1060,7 @@

Source code for pywindow.molecular

         else:
             return self.load_system(rebuild_system)
-
[docs] def swap_atom_keys(self, swap_dict, dict_key='atom_ids'): +
[docs] def swap_atom_keys(self, swap_dict, dict_key='atom_ids'): """ Swap a force field atom id for another user-defined value. @@ -1101,7 +1101,7 @@

Source code for pywindow.molecular

                 if self.system[dict_key][atom_key] == key:
                     self.system[dict_key][atom_key] = swap_dict[key]
-
[docs] def decipher_atom_keys(self, forcefield='DLF', dict_key='atom_ids'): +
[docs] def decipher_atom_keys(self, forcefield='DLF', dict_key='atom_ids'): """ Decipher force field atom ids. @@ -1149,7 +1149,7 @@

Source code for pywindow.molecular

                     temp[element], forcefield=forcefield))
         self.system['elements'] = temp
-
[docs] def make_modular(self, rebuild=False): +
[docs] def make_modular(self, rebuild=False): """ Find and return all :class:`Molecule` s in :class:`MolecularSystem`. @@ -1176,7 +1176,7 @@

Source code for pywindow.molecular

         for i in range(len(dis)):
             self.molecules[i] = Molecule(dis[i], self.system_id, i)
-
[docs] def system_to_molecule(self): +
[docs] def system_to_molecule(self): """ Return :class:`MolecularSystem` as a :class:`Molecule` directly. @@ -1201,7 +1201,7 @@

Source code for pywindow.molecular

                     com=point))
         return pores
 
-
[docs] def dump_system(self, filepath=None, modular=False, **kwargs): +
[docs] def dump_system(self, filepath=None, modular=False, **kwargs): """ Dump a :class:`MolecularSystem` to a file (PDB or XYZ). @@ -1254,7 +1254,7 @@

Source code for pywindow.molecular

         self._Output.dump2file(
             system_dict, filepath, atom_ids=atom_ids, **kwargs)
-
[docs] def dump_system_json(self, filepath=None, modular=False, **kwargs): +
[docs] def dump_system_json(self, filepath=None, modular=False, **kwargs): """ Dump a :class:`MolecularSystem` to a JSON dictionary. @@ -1314,7 +1314,7 @@

Source code for pywindow.molecular

 
   

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -1347,7 +1347,6 @@

Source code for pywindow.molecular

       
       
       
-      
 
   
 
diff --git a/docs/_modules/pywindow/trajectory.html b/docs/_modules/pywindow/trajectory.html
index 6d7384e..4c0f22f 100644
--- a/docs/_modules/pywindow/trajectory.html
+++ b/docs/_modules/pywindow/trajectory.html
@@ -174,13 +174,13 @@ 

Source code for pywindow.trajectory

         self.message = message
 
 
-
[docs]def make_supercell(system, matrix, supercell=[1, 1, 1]): +
[docs]def make_supercell(system, matrix, supercell=[1, 1, 1]): user_supercell = [[1, supercell[0]], [1, supercell[1]], [1, supercell[1]]] system = create_supercell(system, matrix, supercell=user_supercell) return MolecularSystem.load_system(system)
-
[docs]class DLPOLY(object): +
[docs]class DLPOLY(object): def __init__(self, filepath): # Image conventions - periodic boundary key. self._imcon = { @@ -270,7 +270,7 @@

Source code for pywindow.trajectory

         self.no_of_atoms = header[2]
         return header
 
-
[docs] def get_frames(self, frames, override=False, **kwargs): +
[docs] def get_frames(self, frames, override=False, **kwargs): if override is True: self.frames = {} if isinstance(frames, int): @@ -379,7 +379,7 @@

Source code for pywindow.trajectory

             frame_data['forces'] = np.array(forces, dtype=float)
         return frame_data
 
-
[docs] def analysis( +
[docs] def analysis( self, frames='all', ncpus=1, _ncpus=1, override=False, **kwargs ): """ """ @@ -616,7 +616,7 @@

Source code for pywindow.trajectory

                         )
                         raise _TrajectoryError(error)
 
-
[docs] def save_analysis(self, filepath=None, **kwargs): +
[docs] def save_analysis(self, filepath=None, **kwargs): # We pass a copy of the analysis attribute dictionary. dict_obj = deepcopy(self.analysis_output) # If no filepath is provided we create one. @@ -629,7 +629,7 @@

Source code for pywindow.trajectory

         Output().dump2json(dict_obj, filepath, default=to_list, **kwargs)
         return
-
[docs] def save_frames(self, frames, filepath=None, filetype='pdb', **kwargs): +
[docs] def save_frames(self, frames, filepath=None, filetype='pdb', **kwargs): settings = { "pdb": Output()._save_pdb, "xyz": Output()._save_xyz, @@ -681,7 +681,7 @@

Source code for pywindow.trajectory

                                        kwargs)
-
[docs]class XYZ(object): +
[docs]class XYZ(object): def __init__(self, filepath): self.filepath = filepath self.filename = os.path.basename(filepath) @@ -726,7 +726,7 @@

Source code for pywindow.trajectory

                     progress = progress + len(bline)
             self.no_of_frames = frame + 1
 
-
[docs] def get_frames(self, frames, override=False, **kwargs): +
[docs] def get_frames(self, frames, override=False, **kwargs): if override is True: self.frames = {} if isinstance(frames, int): @@ -799,7 +799,7 @@

Source code for pywindow.trajectory

         frame_data['coordinates'] = np.array(coordinates, dtype=float)
         return frame_data
 
-
[docs] def analysis(self, frames='all', ncpus=1, override=False, **kwargs): +
[docs] def analysis(self, frames='all', ncpus=1, override=False, **kwargs): if override is True: self.analysis_output = {} if isinstance(frames, int): @@ -931,7 +931,7 @@

Source code for pywindow.trajectory

             pool.terminate()
             raise _ParallelAnalysisError("Parallel analysis failed.")
 
-
[docs] def save_analysis(self, filepath=None, **kwargs): +
[docs] def save_analysis(self, filepath=None, **kwargs): # We pass a copy of the analysis attribute dictionary. dict_obj = deepcopy(self.analysis_output) # If no filepath is provided we create one. @@ -945,7 +945,7 @@

Source code for pywindow.trajectory

         return
-
[docs]class PDB(object): +
[docs]class PDB(object): def __init__(self, filepath): self.filepath = filepath self.filename = os.path.basename(filepath) @@ -992,7 +992,7 @@

Source code for pywindow.trajectory

                     progress = progress + len(bline)
             self.no_of_frames = frame
 
-
[docs] def get_frames(self, frames, override=False, **kwargs): +
[docs] def get_frames(self, frames, override=False, **kwargs): if override is True: self.frames = {} if isinstance(frames, int): @@ -1072,7 +1072,7 @@

Source code for pywindow.trajectory

         frame_data['coordinates'] = np.array(coordinates, dtype=float)
         return frame_data
 
-
[docs] def analysis(self, frames='all', ncpus=1, override=False, **kwargs): +
[docs] def analysis(self, frames='all', ncpus=1, override=False, **kwargs): if override is True: self.analysis_output = {} if isinstance(frames, int): @@ -1204,7 +1204,7 @@

Source code for pywindow.trajectory

             pool.terminate()
             raise _ParallelAnalysisError("Parallel analysis failed.")
 
-
[docs] def save_analysis(self, filepath=None, **kwargs): +
[docs] def save_analysis(self, filepath=None, **kwargs): # We pass a copy of the analysis attribute dictionary. dict_obj = deepcopy(self.analysis_output) # If no filepath is provided we create one. @@ -1228,7 +1228,7 @@

Source code for pywindow.trajectory

 
   

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -1261,7 +1261,6 @@

Source code for pywindow.trajectory

       
       
       
-      
 
   
 
diff --git a/docs/_modules/pywindow/utilities.html b/docs/_modules/pywindow/utilities.html
index 44ee636..a402963 100644
--- a/docs/_modules/pywindow/utilities.html
+++ b/docs/_modules/pywindow/utilities.html
@@ -209,7 +209,7 @@ 

Source code for pywindow.utilities

         self.message = message
 
 
-
[docs]def is_number(number): +
[docs]def is_number(number): """ Return True if an object is a number - can be converted into a float. @@ -230,7 +230,7 @@

Source code for pywindow.utilities

         return False
-
[docs]def unique(input_list): +
[docs]def unique(input_list): """ Return a list of unique items (similar to set functionality). @@ -252,14 +252,14 @@

Source code for pywindow.utilities

     return output
-
[docs]def to_list(obj): +
[docs]def to_list(obj): """ """ if isinstance(obj, np.ndarray): return obj.tolist() raise TypeError('Not serializable')
-
[docs]def distance(a, b): +
[docs]def distance(a, b): """ Return the distance between two vectors (points) a and b. @@ -279,7 +279,7 @@

Source code for pywindow.utilities

     return (np.sum((a - b)**2))**0.5
-
[docs]def molecular_weight(elements): +
[docs]def molecular_weight(elements): """ Return molecular weight of a molecule. @@ -297,7 +297,7 @@

Source code for pywindow.utilities

     return (np.array([atomic_mass[i.upper()] for i in elements]).sum())
-
[docs]def center_of_coor(coordinates): +
[docs]def center_of_coor(coordinates): """ Return the centre of coordinates. @@ -316,7 +316,7 @@

Source code for pywindow.utilities

     return (np.sum(coordinates, axis=0) / coordinates.shape[0])
-
[docs]def center_of_mass(elements, coordinates): +
[docs]def center_of_mass(elements, coordinates): """ Return the centre of mass (COM). @@ -341,7 +341,7 @@

Source code for pywindow.utilities

     return (np.sum(mass_coordinates, axis=0) / np.array([mass, mass, mass]))
-
[docs]def compose_atom_list(*args): +
[docs]def compose_atom_list(*args): """ Return an `atom list` from elements and/or atom ids and coordinates. @@ -407,7 +407,7 @@

Source code for pywindow.utilities

     return atom_list
-
[docs]def decompose_atom_list(atom_list): +
[docs]def decompose_atom_list(atom_list): """ Return elements and/or atom ids and coordinates from an `atom list`. @@ -454,7 +454,7 @@

Source code for pywindow.utilities

             " with only 4 or 5 items per sublist.")
-
[docs]def dlf_notation(atom_key): +
[docs]def dlf_notation(atom_key): """Return element for atom key using DL_F notation.""" split = list(atom_key) element = '' @@ -476,7 +476,7 @@

Source code for pywindow.utilities

     return element
-
[docs]def opls_notation(atom_key): +
[docs]def opls_notation(atom_key): """Return element for OPLS forcefield atom key.""" # warning for Ne, He, Na types overlap conflicts = ['ne', 'he', 'na'] @@ -495,7 +495,7 @@

Source code for pywindow.utilities

             atom_key))
-
[docs]def decipher_atom_key(atom_key, forcefield): +
[docs]def decipher_atom_key(atom_key, forcefield): """ Return element for deciphered atom key. @@ -535,7 +535,7 @@

Source code for pywindow.utilities

              ).format(forcefield))
-
[docs]def shift_com(elements, coordinates, com_adjust=np.zeros(3)): +
[docs]def shift_com(elements, coordinates, com_adjust=np.zeros(3)): """ Return coordinates translated by some vector. @@ -560,7 +560,7 @@

Source code for pywindow.utilities

     return coordinates - com
-
[docs]def max_dim(elements, coordinates): +
[docs]def max_dim(elements, coordinates): """ Return the maximum diameter of a molecule. @@ -589,7 +589,7 @@

Source code for pywindow.utilities

     return i1, i2, maxdim
-
[docs]def pore_diameter(elements, coordinates, com=None): +
[docs]def pore_diameter(elements, coordinates, com=None): """Return pore diameter of a molecule.""" if com is None: com = center_of_mass(elements, coordinates) @@ -601,13 +601,13 @@

Source code for pywindow.utilities

     return (pored, index)
-
[docs]def correct_pore_diameter(com, *params): +
[docs]def correct_pore_diameter(com, *params): """Return negative of a pore diameter. (optimisation function).""" elements, coordinates = params return (-pore_diameter(elements, coordinates, com)[0])
-
[docs]def opt_pore_diameter(elements, coordinates, bounds=None, com=None, **kwargs): +
[docs]def opt_pore_diameter(elements, coordinates, bounds=None, com=None, **kwargs): """Return optimised pore diameter and it's COM.""" args = elements, coordinates if com is not None: @@ -627,32 +627,32 @@

Source code for pywindow.utilities

     return (pored[0], pored[1], minimisation.x)
-
[docs]def sphere_volume(sphere_radius): +
[docs]def sphere_volume(sphere_radius): """Return volume of a sphere.""" return (4 / 3 * np.pi * sphere_radius**3)
-
[docs]def asphericity(S): +
[docs]def asphericity(S): return (S[0] - (S[1] + S[2]) / 2)
-
[docs]def acylidricity(S): +
[docs]def acylidricity(S): return (S[1] - S[2])
-
[docs]def relative_shape_anisotropy(S): +
[docs]def relative_shape_anisotropy(S): return (1 - 3 * ( (S[0] * S[1] + S[0] * S[2] + S[1] * S[2]) / (np.sum(S))**2))
-
[docs]def get_tensor_eigenvalues(T, sort=False): +
[docs]def get_tensor_eigenvalues(T, sort=False): if sort: return (sorted(np.linalg.eigvals(T), reverse=True)) else: return (np.linalg.eigvals(T))
-
[docs]def get_gyration_tensor(elements, coordinates): +
[docs]def get_gyration_tensor(elements, coordinates): """ Return the gyration tensor of a molecule. @@ -689,7 +689,7 @@

Source code for pywindow.utilities

     return (S)
-
[docs]def get_inertia_tensor(elements, coordinates): +
[docs]def get_inertia_tensor(elements, coordinates): """ Return the tensor of inertia a molecule. @@ -724,11 +724,11 @@

Source code for pywindow.utilities

     return (inertia_tensor)
-
[docs]def principal_axes(elements, coordinates): +
[docs]def principal_axes(elements, coordinates): return (np.linalg.eig(get_inertia_tensor(elements, coordinates))[1].T)
-
[docs]def normalize_vector(vector): +
[docs]def normalize_vector(vector): """ Normalize a vector. @@ -749,7 +749,7 @@

Source code for pywindow.utilities

     return np.round(v, decimals=4)
-
[docs]def rotation_matrix_arbitrary_axis(angle, axis): +
[docs]def rotation_matrix_arbitrary_axis(angle, axis): """ Return a rotation matrix of `angle` radians about `axis`. @@ -788,7 +788,7 @@

Source code for pywindow.utilities

     return np.array([[e11, e12, e13], [e21, e22, e23], [e31, e32, e33]])
-
[docs]def align_principal_ax(elements, coordinates): +
[docs]def align_principal_ax(elements, coordinates): """ """ coor = deepcopy(coordinates) new_coor = [] @@ -813,25 +813,25 @@

Source code for pywindow.utilities

     return (coor, rot)
-
[docs]def calc_asphericity(elements, coordinates): +
[docs]def calc_asphericity(elements, coordinates): inertia_tensor = get_inertia_tensor(elements, coordinates) tensor_eigenvalues = get_tensor_eigenvalues(inertia_tensor, sort=True) return asphericity(tensor_eigenvalues)
-
[docs]def calc_acylidricity(elements, coordinates): +
[docs]def calc_acylidricity(elements, coordinates): inertia_tensor = get_inertia_tensor(elements, coordinates) tensor_eigenvalues = get_tensor_eigenvalues(inertia_tensor, sort=True) return acylidricity(tensor_eigenvalues)
-
[docs]def calc_relative_shape_anisotropy(elements, coordinates): +
[docs]def calc_relative_shape_anisotropy(elements, coordinates): inertia_tensor = get_inertia_tensor(elements, coordinates) tensor_eigenvalues = get_tensor_eigenvalues(inertia_tensor, sort=True) return relative_shape_anisotropy(tensor_eigenvalues)
-
[docs]def unit_cell_to_lattice_array(cryst): +
[docs]def unit_cell_to_lattice_array(cryst): """Return parallelpiped unit cell lattice matrix.""" a_, b_, c_, alpha, beta, gamma = cryst # Convert angles from degrees to radians. @@ -858,7 +858,7 @@

Source code for pywindow.utilities

     return lattice_array
-
[docs]def lattice_array_to_unit_cell(lattice_array): +
[docs]def lattice_array_to_unit_cell(lattice_array): """Return crystallographic param. from unit cell lattice matrix.""" cell_lengths = np.sqrt(np.sum(lattice_array**2, axis=0)) gamma_r = np.arccos(lattice_array[0][1] / cell_lengths[1]) @@ -873,31 +873,31 @@

Source code for pywindow.utilities

     return np.append(cell_lengths, cell_angles)
-
[docs]def volume_from_lattice_array(lattice_array): +
[docs]def volume_from_lattice_array(lattice_array): """Return unit cell's volume from lattice matrix.""" return np.linalg.det(lattice_array)
-
[docs]def volume_from_cell_parameters(cryst): +
[docs]def volume_from_cell_parameters(cryst): """Return unit cell's volume from crystallographic parameters.""" return volume_from_lattice_array(unit_cell_to_lattice_array(cryst))
-
[docs]def fractional_from_cartesian(coordinate, lattice_array): +
[docs]def fractional_from_cartesian(coordinate, lattice_array): """Return a fractional coordinate from a cartesian one.""" deorthogonalisation_M = np.matrix(np.linalg.inv(lattice_array)) fractional = deorthogonalisation_M * coordinate.reshape(-1, 1) return np.array(fractional.reshape(1, -1))
-
[docs]def cartisian_from_fractional(coordinate, lattice_array): +
[docs]def cartisian_from_fractional(coordinate, lattice_array): """Return cartesian coordinate from a fractional one.""" orthogonalisation_M = np.matrix(lattice_array) orthogonal = orthogonalisation_M * coordinate.reshape(-1, 1) return np.array(orthogonal.reshape(1, -1))
-
[docs]def cart2frac_all(coordinates, lattice_array): +
[docs]def cart2frac_all(coordinates, lattice_array): """Convert all cartesian coordinates to fractional.""" frac_coordinates = deepcopy(coordinates) for coord in range(frac_coordinates.shape[0]): @@ -906,7 +906,7 @@

Source code for pywindow.utilities

     return frac_coordinates
-
[docs]def frac2cart_all(frac_coordinates, lattice_array): +
[docs]def frac2cart_all(frac_coordinates, lattice_array): """Convert all fractional coordinates to cartesian.""" coordinates = deepcopy(frac_coordinates) for coord in range(coordinates.shape[0]): @@ -915,7 +915,7 @@

Source code for pywindow.utilities

     return coordinates
-
[docs]def create_supercell(system, supercell=[[-1, 1], [-1, 1], [-1, 1]]): +
[docs]def create_supercell(system, supercell=[[-1, 1], [-1, 1], [-1, 1]]): """Create a supercell.""" if 'lattice' not in system.keys(): matrix = unit_cell_to_lattice_array(system['unit_cell']) @@ -955,7 +955,7 @@

Source code for pywindow.utilities

     return supercell_system
-
[docs]def is_inside_polyhedron(point, polyhedron): +
[docs]def is_inside_polyhedron(point, polyhedron): if polyhedron.shape == (1, 6): matrix = unit_cell_to_lattice_array(polyhedron) if polyhedron.shape == (3, 3): @@ -970,12 +970,12 @@

Source code for pywindow.utilities

         return False
-
[docs]def normal_vector(origin, vectors): +
[docs]def normal_vector(origin, vectors): """Return normal vector for two vectors with same origin.""" return np.cross(vectors[0] - origin, vectors[1] - origin)
-
[docs]def discrete_molecules(system, rebuild=None, tol=0.4): +
[docs]def discrete_molecules(system, rebuild=None, tol=0.4): """ Decompose molecular system into individual discreet molecules. @@ -1224,7 +1224,7 @@

Source code for pywindow.utilities

     return molecules
-
[docs]def angle_between_vectors(x, y): +
[docs]def angle_between_vectors(x, y): """Calculate the angle between two vectors x and y.""" first_step = abs(x[0] * y[0] + x[1] * y[1] + x[2] * y[2]) / ( np.sqrt(x[0]**2 + x[1]**2 + x[2]**2) * @@ -1233,7 +1233,7 @@

Source code for pywindow.utilities

     return (second_step)
-
[docs]def vector_analysis(vector, coordinates, elements_vdw, increment=1.0): +
[docs]def vector_analysis(vector, coordinates, elements_vdw, increment=1.0): """Analyse a sampling vector's path for window analysis purpose.""" # Calculate number of chunks if vector length is divided by increment. chunks = int(np.linalg.norm(vector) // increment) @@ -1254,7 +1254,7 @@

Source code for pywindow.utilities

             [dist, analysed_vector[pos] * 2, *chunk * pos, *vector])
-
[docs]def vector_preanalysis(vector, coordinates, elements_vdw, increment=1.0): +
[docs]def vector_preanalysis(vector, coordinates, elements_vdw, increment=1.0): norm_vec = vector/np.linalg.norm(vector) intersections = [] origin = center_of_coor(coordinates) @@ -1280,21 +1280,21 @@

Source code for pywindow.utilities

         return vector_analysis(vector, coordinates, elements_vdw, increment)
-
[docs]def optimise_xy(xy, *args): +
[docs]def optimise_xy(xy, *args): """Return negative pore diameter for x and y coordinates optimisation.""" z, elements, coordinates = args window_com = np.array([xy[0], xy[1], z]) return -pore_diameter(elements, coordinates, com=window_com)[0]
-
[docs]def optimise_z(z, *args): +
[docs]def optimise_z(z, *args): """Return pore diameter for coordinates optimisation in z direction.""" x, y, elements, coordinates = args window_com = np.array([x, y, z]) return pore_diameter(elements, coordinates, com=window_com)[0]
-
[docs]def window_analysis(window, +
[docs]def window_analysis(window, elements, coordinates, elements_vdw, @@ -1444,7 +1444,7 @@

Source code for pywindow.utilities

     return (window_diameter, window_com)
-
[docs]def find_windows(elements, +
[docs]def find_windows(elements, coordinates, processes=None, mol_size=None, @@ -1613,7 +1613,7 @@

Source code for pywindow.utilities

     return (windows, windows_coms)
-
[docs]def window_shape(window, +
[docs]def window_shape(window, elements, coordinates, increment2=0.1, @@ -1771,7 +1771,7 @@

Source code for pywindow.utilities

     return XY_plane
-
[docs]def find_windows_new(elements, +
[docs]def find_windows_new(elements, coordinates, processes=None, mol_size=None, @@ -1892,7 +1892,7 @@

Source code for pywindow.utilities

         return clustered_results, elements, coordinates, initial_com
-
[docs]def calculate_window_diameter(window, elements, coordinates, **kwargs): +
[docs]def calculate_window_diameter(window, elements, coordinates, **kwargs): elements_vdw = np.array( [[atomic_vdw_radius[x.upper()]] for x in elements] ) @@ -1907,7 +1907,7 @@

Source code for pywindow.utilities

         return None
-
[docs]def get_window_com(window, elements, coordinates, initial_com, **kwargs): +
[docs]def get_window_com(window, elements, coordinates, initial_com, **kwargs): elements_vdw = np.array( [[atomic_vdw_radius[x.upper()]] for x in elements] ) @@ -1923,7 +1923,7 @@

Source code for pywindow.utilities

         return None
-
[docs]def vector_analysis_reversed(vector, coordinates, elements_vdw): +
[docs]def vector_analysis_reversed(vector, coordinates, elements_vdw): norm_vec = vector/np.linalg.norm(vector) intersections = [] origin = center_of_coor(coordinates) @@ -1948,7 +1948,7 @@

Source code for pywindow.utilities

         return [dist_origin, intersection]
-
[docs]def find_average_diameter(elements, coordinates, adjust=1, increment=0.1, +
[docs]def find_average_diameter(elements, coordinates, adjust=1, increment=0.1, processes=None, **kwargs): """Return average diameter for a molecule.""" # Copy the coordinates as will perform many opertaions on them @@ -2009,7 +2009,7 @@

Source code for pywindow.utilities

     return np.mean(results_cleaned)*2
-
[docs]def vector_analysis_pore_shape(vector, coordinates, elements_vdw): +
[docs]def vector_analysis_pore_shape(vector, coordinates, elements_vdw): norm_vec = vector/np.linalg.norm(vector) intersections = [] origin = center_of_coor(coordinates) @@ -2033,7 +2033,7 @@

Source code for pywindow.utilities

         return sorted(intersections)[0][1]
-
[docs]def calculate_pore_shape(elements, coordinates, adjust=1, increment=0.1, +
[docs]def calculate_pore_shape(elements, coordinates, adjust=1, increment=0.1, **kwargs): """Return average diameter for a molecule.""" # Copy the coordinates as will perform many opertaions on them @@ -2097,7 +2097,7 @@

Source code for pywindow.utilities

     return coor
-
[docs]def circumcircle_window(coordinates, atom_set): +
[docs]def circumcircle_window(coordinates, atom_set): # Calculating circumcircle A = np.array(coordinates[int(atom_set[0])]) B = np.array(coordinates[int(atom_set[1])]) @@ -2120,7 +2120,7 @@

Source code for pywindow.utilities

     return R, COM
-
[docs]def circumcircle(coordinates, atom_sets): +
[docs]def circumcircle(coordinates, atom_sets): pld_diameter_list = [] pld_com_list = [] iter_ = 0 @@ -2142,7 +2142,7 @@

Source code for pywindow.utilities

 
   

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -2175,7 +2175,6 @@

Source code for pywindow.utilities

       
       
       
-      
 
   
 
diff --git a/docs/_sources/pywindow.io_tools.rst.txt b/docs/_sources/pywindow.io_tools.rst.txt
deleted file mode 100644
index f5b6346..0000000
--- a/docs/_sources/pywindow.io_tools.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-pywindow\.io\_tools module
-==========================
-
-.. automodule:: pywindow.io_tools
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/docs/_sources/pywindow.molecular.rst.txt b/docs/_sources/pywindow.molecular.rst.txt
deleted file mode 100644
index c34545c..0000000
--- a/docs/_sources/pywindow.molecular.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-pywindow\.molecular module
-==========================
-
-.. automodule:: pywindow.molecular
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/docs/_sources/pywindow.rst.txt b/docs/_sources/pywindow.rst.txt
index 60121a5..880d1d5 100644
--- a/docs/_sources/pywindow.rst.txt
+++ b/docs/_sources/pywindow.rst.txt
@@ -4,13 +4,46 @@ pywindow package
 Submodules
 ----------
 
-.. toctree::
+pywindow.io\_tools module
+-------------------------
+
+.. automodule:: pywindow.io_tools
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+pywindow.molecular module
+-------------------------
+
+.. automodule:: pywindow.molecular
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+pywindow.tables module
+----------------------
+
+.. automodule:: pywindow.tables
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+pywindow.trajectory module
+--------------------------
+
+.. automodule:: pywindow.trajectory
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+pywindow.utilities module
+-------------------------
+
+.. automodule:: pywindow.utilities
+    :members:
+    :undoc-members:
+    :show-inheritance:
 
-   pywindow.io_tools
-   pywindow.molecular
-   pywindow.tables
-   pywindow.trajectory
-   pywindow.utilities
 
 Module contents
 ---------------
diff --git a/docs/_sources/pywindow.tables.rst.txt b/docs/_sources/pywindow.tables.rst.txt
deleted file mode 100644
index ad01f51..0000000
--- a/docs/_sources/pywindow.tables.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-pywindow\.tables module
-=======================
-
-.. automodule:: pywindow.tables
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/docs/_sources/pywindow.trajectory.rst.txt b/docs/_sources/pywindow.trajectory.rst.txt
deleted file mode 100644
index e0271aa..0000000
--- a/docs/_sources/pywindow.trajectory.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-pywindow\.trajectory module
-===========================
-
-.. automodule:: pywindow.trajectory
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/docs/_sources/pywindow.utilities.rst.txt b/docs/_sources/pywindow.utilities.rst.txt
deleted file mode 100644
index 83d8324..0000000
--- a/docs/_sources/pywindow.utilities.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-pywindow\.utilities module
-==========================
-
-.. automodule:: pywindow.utilities
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/docs/_static/fonts/Inconsolata-Bold.ttf b/docs/_static/fonts/Inconsolata-Bold.ttf
deleted file mode 100644
index 58c9fef..0000000
Binary files a/docs/_static/fonts/Inconsolata-Bold.ttf and /dev/null differ
diff --git a/docs/_static/fonts/Inconsolata-Regular.ttf b/docs/_static/fonts/Inconsolata-Regular.ttf
deleted file mode 100644
index a87ffba..0000000
Binary files a/docs/_static/fonts/Inconsolata-Regular.ttf and /dev/null differ
diff --git a/docs/_static/fonts/Lato-Bold.ttf b/docs/_static/fonts/Lato-Bold.ttf
deleted file mode 100644
index 7434369..0000000
Binary files a/docs/_static/fonts/Lato-Bold.ttf and /dev/null differ
diff --git a/docs/_static/fonts/Lato-Regular.ttf b/docs/_static/fonts/Lato-Regular.ttf
deleted file mode 100644
index 04ea8ef..0000000
Binary files a/docs/_static/fonts/Lato-Regular.ttf and /dev/null differ
diff --git a/docs/_static/fonts/RobotoSlab-Bold.ttf b/docs/_static/fonts/RobotoSlab-Bold.ttf
deleted file mode 100644
index df5d1df..0000000
Binary files a/docs/_static/fonts/RobotoSlab-Bold.ttf and /dev/null differ
diff --git a/docs/_static/fonts/RobotoSlab-Regular.ttf b/docs/_static/fonts/RobotoSlab-Regular.ttf
deleted file mode 100644
index eb52a79..0000000
Binary files a/docs/_static/fonts/RobotoSlab-Regular.ttf and /dev/null differ
diff --git a/docs/_static/jquery-3.1.0.js b/docs/_static/jquery-3.1.0.js
deleted file mode 100644
index f2fc274..0000000
--- a/docs/_static/jquery-3.1.0.js
+++ /dev/null
@@ -1,10074 +0,0 @@
-/*eslint-disable no-unused-vars*/
-/*!
- * jQuery JavaScript Library v3.1.0
- * https://jquery.com/
- *
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * https://jquery.org/license
- *
- * Date: 2016-07-07T21:44Z
- */
-( function( global, factory ) {
-
-	"use strict";
-
-	if ( typeof module === "object" && typeof module.exports === "object" ) {
-
-		// For CommonJS and CommonJS-like environments where a proper `window`
-		// is present, execute the factory and get jQuery.
-		// For environments that do not have a `window` with a `document`
-		// (such as Node.js), expose a factory as module.exports.
-		// This accentuates the need for the creation of a real `window`.
-		// e.g. var jQuery = require("jquery")(window);
-		// See ticket #14549 for more info.
-		module.exports = global.document ?
-			factory( global, true ) :
-			function( w ) {
-				if ( !w.document ) {
-					throw new Error( "jQuery requires a window with a document" );
-				}
-				return factory( w );
-			};
-	} else {
-		factory( global );
-	}
-
-// Pass this if window is not defined yet
-} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
-// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
-// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
-// enough that all such attempts are guarded in a try block.
-"use strict";
-
-var arr = [];
-
-var document = window.document;
-
-var getProto = Object.getPrototypeOf;
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var fnToString = hasOwn.toString;
-
-var ObjectFunctionString = fnToString.call( Object );
-
-var support = {};
-
-
-
-	function DOMEval( code, doc ) {
-		doc = doc || document;
-
-		var script = doc.createElement( "script" );
-
-		script.text = code;
-		doc.head.appendChild( script ).parentNode.removeChild( script );
-	}
-/* global Symbol */
-// Defining this global in .eslintrc would create a danger of using the global
-// unguarded in another place, it seems safer to define global only for this module
-
-
-
-var
-	version = "3.1.0",
-
-	// Define a local copy of jQuery
-	jQuery = function( selector, context ) {
-
-		// The jQuery object is actually just the init constructor 'enhanced'
-		// Need init if jQuery is called (just allow error to be thrown if not included)
-		return new jQuery.fn.init( selector, context );
-	},
-
-	// Support: Android <=4.0 only
-	// Make sure we trim BOM and NBSP
-	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
-	// Matches dashed string for camelizing
-	rmsPrefix = /^-ms-/,
-	rdashAlpha = /-([a-z])/g,
-
-	// Used by jQuery.camelCase as callback to replace()
-	fcamelCase = function( all, letter ) {
-		return letter.toUpperCase();
-	};
-
-jQuery.fn = jQuery.prototype = {
-
-	// The current version of jQuery being used
-	jquery: version,
-
-	constructor: jQuery,
-
-	// The default length of a jQuery object is 0
-	length: 0,
-
-	toArray: function() {
-		return slice.call( this );
-	},
-
-	// Get the Nth element in the matched element set OR
-	// Get the whole matched element set as a clean array
-	get: function( num ) {
-		return num != null ?
-
-			// Return just the one element from the set
-			( num < 0 ? this[ num + this.length ] : this[ num ] ) :
-
-			// Return all the elements in a clean array
-			slice.call( this );
-	},
-
-	// Take an array of elements and push it onto the stack
-	// (returning the new matched element set)
-	pushStack: function( elems ) {
-
-		// Build a new jQuery matched element set
-		var ret = jQuery.merge( this.constructor(), elems );
-
-		// Add the old object onto the stack (as a reference)
-		ret.prevObject = this;
-
-		// Return the newly-formed element set
-		return ret;
-	},
-
-	// Execute a callback for every element in the matched set.
-	each: function( callback ) {
-		return jQuery.each( this, callback );
-	},
-
-	map: function( callback ) {
-		return this.pushStack( jQuery.map( this, function( elem, i ) {
-			return callback.call( elem, i, elem );
-		} ) );
-	},
-
-	slice: function() {
-		return this.pushStack( slice.apply( this, arguments ) );
-	},
-
-	first: function() {
-		return this.eq( 0 );
-	},
-
-	last: function() {
-		return this.eq( -1 );
-	},
-
-	eq: function( i ) {
-		var len = this.length,
-			j = +i + ( i < 0 ? len : 0 );
-		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
-	},
-
-	end: function() {
-		return this.prevObject || this.constructor();
-	},
-
-	// For internal use only.
-	// Behaves like an Array's method, not like a jQuery method.
-	push: push,
-	sort: arr.sort,
-	splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
-	var options, name, src, copy, copyIsArray, clone,
-		target = arguments[ 0 ] || {},
-		i = 1,
-		length = arguments.length,
-		deep = false;
-
-	// Handle a deep copy situation
-	if ( typeof target === "boolean" ) {
-		deep = target;
-
-		// Skip the boolean and the target
-		target = arguments[ i ] || {};
-		i++;
-	}
-
-	// Handle case when target is a string or something (possible in deep copy)
-	if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
-		target = {};
-	}
-
-	// Extend jQuery itself if only one argument is passed
-	if ( i === length ) {
-		target = this;
-		i--;
-	}
-
-	for ( ; i < length; i++ ) {
-
-		// Only deal with non-null/undefined values
-		if ( ( options = arguments[ i ] ) != null ) {
-
-			// Extend the base object
-			for ( name in options ) {
-				src = target[ name ];
-				copy = options[ name ];
-
-				// Prevent never-ending loop
-				if ( target === copy ) {
-					continue;
-				}
-
-				// Recurse if we're merging plain objects or arrays
-				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
-					( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
-					if ( copyIsArray ) {
-						copyIsArray = false;
-						clone = src && jQuery.isArray( src ) ? src : [];
-
-					} else {
-						clone = src && jQuery.isPlainObject( src ) ? src : {};
-					}
-
-					// Never move original objects, clone them
-					target[ name ] = jQuery.extend( deep, clone, copy );
-
-				// Don't bring in undefined values
-				} else if ( copy !== undefined ) {
-					target[ name ] = copy;
-				}
-			}
-		}
-	}
-
-	// Return the modified object
-	return target;
-};
-
-jQuery.extend( {
-
-	// Unique for each copy of jQuery on the page
-	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
-	// Assume jQuery is ready without the ready module
-	isReady: true,
-
-	error: function( msg ) {
-		throw new Error( msg );
-	},
-
-	noop: function() {},
-
-	isFunction: function( obj ) {
-		return jQuery.type( obj ) === "function";
-	},
-
-	isArray: Array.isArray,
-
-	isWindow: function( obj ) {
-		return obj != null && obj === obj.window;
-	},
-
-	isNumeric: function( obj ) {
-
-		// As of jQuery 3.0, isNumeric is limited to
-		// strings and numbers (primitives or objects)
-		// that can be coerced to finite numbers (gh-2662)
-		var type = jQuery.type( obj );
-		return ( type === "number" || type === "string" ) &&
-
-			// parseFloat NaNs numeric-cast false positives ("")
-			// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
-			// subtraction forces infinities to NaN
-			!isNaN( obj - parseFloat( obj ) );
-	},
-
-	isPlainObject: function( obj ) {
-		var proto, Ctor;
-
-		// Detect obvious negatives
-		// Use toString instead of jQuery.type to catch host objects
-		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
-			return false;
-		}
-
-		proto = getProto( obj );
-
-		// Objects with no prototype (e.g., `Object.create( null )`) are plain
-		if ( !proto ) {
-			return true;
-		}
-
-		// Objects with prototype are plain iff they were constructed by a global Object function
-		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
-		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
-	},
-
-	isEmptyObject: function( obj ) {
-
-		/* eslint-disable no-unused-vars */
-		// See https://github.com/eslint/eslint/issues/6125
-		var name;
-
-		for ( name in obj ) {
-			return false;
-		}
-		return true;
-	},
-
-	type: function( obj ) {
-		if ( obj == null ) {
-			return obj + "";
-		}
-
-		// Support: Android <=2.3 only (functionish RegExp)
-		return typeof obj === "object" || typeof obj === "function" ?
-			class2type[ toString.call( obj ) ] || "object" :
-			typeof obj;
-	},
-
-	// Evaluates a script in a global context
-	globalEval: function( code ) {
-		DOMEval( code );
-	},
-
-	// Convert dashed to camelCase; used by the css and data modules
-	// Support: IE <=9 - 11, Edge 12 - 13
-	// Microsoft forgot to hump their vendor prefix (#9572)
-	camelCase: function( string ) {
-		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
-	},
-
-	nodeName: function( elem, name ) {
-		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
-	},
-
-	each: function( obj, callback ) {
-		var length, i = 0;
-
-		if ( isArrayLike( obj ) ) {
-			length = obj.length;
-			for ( ; i < length; i++ ) {
-				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
-					break;
-				}
-			}
-		} else {
-			for ( i in obj ) {
-				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
-					break;
-				}
-			}
-		}
-
-		return obj;
-	},
-
-	// Support: Android <=4.0 only
-	trim: function( text ) {
-		return text == null ?
-			"" :
-			( text + "" ).replace( rtrim, "" );
-	},
-
-	// results is for internal usage only
-	makeArray: function( arr, results ) {
-		var ret = results || [];
-
-		if ( arr != null ) {
-			if ( isArrayLike( Object( arr ) ) ) {
-				jQuery.merge( ret,
-					typeof arr === "string" ?
-					[ arr ] : arr
-				);
-			} else {
-				push.call( ret, arr );
-			}
-		}
-
-		return ret;
-	},
-
-	inArray: function( elem, arr, i ) {
-		return arr == null ? -1 : indexOf.call( arr, elem, i );
-	},
-
-	// Support: Android <=4.0 only, PhantomJS 1 only
-	// push.apply(_, arraylike) throws on ancient WebKit
-	merge: function( first, second ) {
-		var len = +second.length,
-			j = 0,
-			i = first.length;
-
-		for ( ; j < len; j++ ) {
-			first[ i++ ] = second[ j ];
-		}
-
-		first.length = i;
-
-		return first;
-	},
-
-	grep: function( elems, callback, invert ) {
-		var callbackInverse,
-			matches = [],
-			i = 0,
-			length = elems.length,
-			callbackExpect = !invert;
-
-		// Go through the array, only saving the items
-		// that pass the validator function
-		for ( ; i < length; i++ ) {
-			callbackInverse = !callback( elems[ i ], i );
-			if ( callbackInverse !== callbackExpect ) {
-				matches.push( elems[ i ] );
-			}
-		}
-
-		return matches;
-	},
-
-	// arg is for internal usage only
-	map: function( elems, callback, arg ) {
-		var length, value,
-			i = 0,
-			ret = [];
-
-		// Go through the array, translating each of the items to their new values
-		if ( isArrayLike( elems ) ) {
-			length = elems.length;
-			for ( ; i < length; i++ ) {
-				value = callback( elems[ i ], i, arg );
-
-				if ( value != null ) {
-					ret.push( value );
-				}
-			}
-
-		// Go through every key on the object,
-		} else {
-			for ( i in elems ) {
-				value = callback( elems[ i ], i, arg );
-
-				if ( value != null ) {
-					ret.push( value );
-				}
-			}
-		}
-
-		// Flatten any nested arrays
-		return concat.apply( [], ret );
-	},
-
-	// A global GUID counter for objects
-	guid: 1,
-
-	// Bind a function to a context, optionally partially applying any
-	// arguments.
-	proxy: function( fn, context ) {
-		var tmp, args, proxy;
-
-		if ( typeof context === "string" ) {
-			tmp = fn[ context ];
-			context = fn;
-			fn = tmp;
-		}
-
-		// Quick check to determine if target is callable, in the spec
-		// this throws a TypeError, but we will just return undefined.
-		if ( !jQuery.isFunction( fn ) ) {
-			return undefined;
-		}
-
-		// Simulated bind
-		args = slice.call( arguments, 2 );
-		proxy = function() {
-			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
-		};
-
-		// Set the guid of unique handler to the same of original handler, so it can be removed
-		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
-		return proxy;
-	},
-
-	now: Date.now,
-
-	// jQuery.support is not used in Core but other projects attach their
-	// properties to it so it needs to exist.
-	support: support
-} );
-
-if ( typeof Symbol === "function" ) {
-	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
-	class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
-	// Support: real iOS 8.2 only (not reproducible in simulator)
-	// `in` check used to prevent JIT error (gh-2145)
-	// hasOwn isn't used here due to false negatives
-	// regarding Nodelist length in IE
-	var length = !!obj && "length" in obj && obj.length,
-		type = jQuery.type( obj );
-
-	if ( type === "function" || jQuery.isWindow( obj ) ) {
-		return false;
-	}
-
-	return type === "array" || length === 0 ||
-		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.3.0
- * https://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2016-01-04
- */
-(function( window ) {
-
-var i,
-	support,
-	Expr,
-	getText,
-	isXML,
-	tokenize,
-	compile,
-	select,
-	outermostContext,
-	sortInput,
-	hasDuplicate,
-
-	// Local document vars
-	setDocument,
-	document,
-	docElem,
-	documentIsHTML,
-	rbuggyQSA,
-	rbuggyMatches,
-	matches,
-	contains,
-
-	// Instance-specific data
-	expando = "sizzle" + 1 * new Date(),
-	preferredDoc = window.document,
-	dirruns = 0,
-	done = 0,
-	classCache = createCache(),
-	tokenCache = createCache(),
-	compilerCache = createCache(),
-	sortOrder = function( a, b ) {
-		if ( a === b ) {
-			hasDuplicate = true;
-		}
-		return 0;
-	},
-
-	// Instance methods
-	hasOwn = ({}).hasOwnProperty,
-	arr = [],
-	pop = arr.pop,
-	push_native = arr.push,
-	push = arr.push,
-	slice = arr.slice,
-	// Use a stripped-down indexOf as it's faster than native
-	// https://jsperf.com/thor-indexof-vs-for/5
-	indexOf = function( list, elem ) {
-		var i = 0,
-			len = list.length;
-		for ( ; i < len; i++ ) {
-			if ( list[i] === elem ) {
-				return i;
-			}
-		}
-		return -1;
-	},
-
-	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
-	// Regular expressions
-
-	// http://www.w3.org/TR/css3-selectors/#whitespace
-	whitespace = "[\\x20\\t\\r\\n\\f]",
-
-	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
-	identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
-
-	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
-	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
-		// Operator (capture 2)
-		"*([*^$|!~]?=)" + whitespace +
-		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
-		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
-		"*\\]",
-
-	pseudos = ":(" + identifier + ")(?:\\((" +
-		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
-		// 1. quoted (capture 3; capture 4 or capture 5)
-		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
-		// 2. simple (capture 6)
-		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
-		// 3. anything else (capture 2)
-		".*" +
-		")\\)|)",
-
-	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
-	rwhitespace = new RegExp( whitespace + "+", "g" ),
-	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
-	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
-	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
-	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
-	rpseudo = new RegExp( pseudos ),
-	ridentifier = new RegExp( "^" + identifier + "$" ),
-
-	matchExpr = {
-		"ID": new RegExp( "^#(" + identifier + ")" ),
-		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
-		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
-		"ATTR": new RegExp( "^" + attributes ),
-		"PSEUDO": new RegExp( "^" + pseudos ),
-		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
-			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
-			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
-		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
-		// For use in libraries implementing .is()
-		// We use this for POS matching in `select`
-		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
-			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
-	},
-
-	rinputs = /^(?:input|select|textarea|button)$/i,
-	rheader = /^h\d$/i,
-
-	rnative = /^[^{]+\{\s*\[native \w/,
-
-	// Easily-parseable/retrievable ID or TAG or CLASS selectors
-	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
-	rsibling = /[+~]/,
-
-	// CSS escapes
-	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
-	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
-	funescape = function( _, escaped, escapedWhitespace ) {
-		var high = "0x" + escaped - 0x10000;
-		// NaN means non-codepoint
-		// Support: Firefox<24
-		// Workaround erroneous numeric interpretation of +"0x"
-		return high !== high || escapedWhitespace ?
-			escaped :
-			high < 0 ?
-				// BMP codepoint
-				String.fromCharCode( high + 0x10000 ) :
-				// Supplemental Plane codepoint (surrogate pair)
-				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
-	},
-
-	// CSS string/identifier serialization
-	// https://drafts.csswg.org/cssom/#common-serializing-idioms
-	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
-	fcssescape = function( ch, asCodePoint ) {
-		if ( asCodePoint ) {
-
-			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
-			if ( ch === "\0" ) {
-				return "\uFFFD";
-			}
-
-			// Control characters and (dependent upon position) numbers get escaped as code points
-			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
-		}
-
-		// Other potentially-special ASCII characters get backslash-escaped
-		return "\\" + ch;
-	},
-
-	// Used for iframes
-	// See setDocument()
-	// Removing the function wrapper causes a "Permission Denied"
-	// error in IE
-	unloadHandler = function() {
-		setDocument();
-	},
-
-	disabledAncestor = addCombinator(
-		function( elem ) {
-			return elem.disabled === true;
-		},
-		{ dir: "parentNode", next: "legend" }
-	);
-
-// Optimize for push.apply( _, NodeList )
-try {
-	push.apply(
-		(arr = slice.call( preferredDoc.childNodes )),
-		preferredDoc.childNodes
-	);
-	// Support: Android<4.0
-	// Detect silently failing push.apply
-	arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
-	push = { apply: arr.length ?
-
-		// Leverage slice if possible
-		function( target, els ) {
-			push_native.apply( target, slice.call(els) );
-		} :
-
-		// Support: IE<9
-		// Otherwise append directly
-		function( target, els ) {
-			var j = target.length,
-				i = 0;
-			// Can't trust NodeList.length
-			while ( (target[j++] = els[i++]) ) {}
-			target.length = j - 1;
-		}
-	};
-}
-
-function Sizzle( selector, context, results, seed ) {
-	var m, i, elem, nid, match, groups, newSelector,
-		newContext = context && context.ownerDocument,
-
-		// nodeType defaults to 9, since context defaults to document
-		nodeType = context ? context.nodeType : 9;
-
-	results = results || [];
-
-	// Return early from calls with invalid selector or context
-	if ( typeof selector !== "string" || !selector ||
-		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
-		return results;
-	}
-
-	// Try to shortcut find operations (as opposed to filters) in HTML documents
-	if ( !seed ) {
-
-		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
-			setDocument( context );
-		}
-		context = context || document;
-
-		if ( documentIsHTML ) {
-
-			// If the selector is sufficiently simple, try using a "get*By*" DOM method
-			// (excepting DocumentFragment context, where the methods don't exist)
-			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
-				// ID selector
-				if ( (m = match[1]) ) {
-
-					// Document context
-					if ( nodeType === 9 ) {
-						if ( (elem = context.getElementById( m )) ) {
-
-							// Support: IE, Opera, Webkit
-							// TODO: identify versions
-							// getElementById can match elements by name instead of ID
-							if ( elem.id === m ) {
-								results.push( elem );
-								return results;
-							}
-						} else {
-							return results;
-						}
-
-					// Element context
-					} else {
-
-						// Support: IE, Opera, Webkit
-						// TODO: identify versions
-						// getElementById can match elements by name instead of ID
-						if ( newContext && (elem = newContext.getElementById( m )) &&
-							contains( context, elem ) &&
-							elem.id === m ) {
-
-							results.push( elem );
-							return results;
-						}
-					}
-
-				// Type selector
-				} else if ( match[2] ) {
-					push.apply( results, context.getElementsByTagName( selector ) );
-					return results;
-
-				// Class selector
-				} else if ( (m = match[3]) && support.getElementsByClassName &&
-					context.getElementsByClassName ) {
-
-					push.apply( results, context.getElementsByClassName( m ) );
-					return results;
-				}
-			}
-
-			// Take advantage of querySelectorAll
-			if ( support.qsa &&
-				!compilerCache[ selector + " " ] &&
-				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
-				if ( nodeType !== 1 ) {
-					newContext = context;
-					newSelector = selector;
-
-				// qSA looks outside Element context, which is not what we want
-				// Thanks to Andrew Dupont for this workaround technique
-				// Support: IE <=8
-				// Exclude object elements
-				} else if ( context.nodeName.toLowerCase() !== "object" ) {
-
-					// Capture the context ID, setting it first if necessary
-					if ( (nid = context.getAttribute( "id" )) ) {
-						nid = nid.replace( rcssescape, fcssescape );
-					} else {
-						context.setAttribute( "id", (nid = expando) );
-					}
-
-					// Prefix every selector in the list
-					groups = tokenize( selector );
-					i = groups.length;
-					while ( i-- ) {
-						groups[i] = "#" + nid + " " + toSelector( groups[i] );
-					}
-					newSelector = groups.join( "," );
-
-					// Expand context for sibling selectors
-					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
-						context;
-				}
-
-				if ( newSelector ) {
-					try {
-						push.apply( results,
-							newContext.querySelectorAll( newSelector )
-						);
-						return results;
-					} catch ( qsaError ) {
-					} finally {
-						if ( nid === expando ) {
-							context.removeAttribute( "id" );
-						}
-					}
-				}
-			}
-		}
-	}
-
-	// All others
-	return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- *	deleting the oldest entry
- */
-function createCache() {
-	var keys = [];
-
-	function cache( key, value ) {
-		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
-		if ( keys.push( key + " " ) > Expr.cacheLength ) {
-			// Only keep the most recent entries
-			delete cache[ keys.shift() ];
-		}
-		return (cache[ key + " " ] = value);
-	}
-	return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
-	fn[ expando ] = true;
-	return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created element and returns a boolean result
- */
-function assert( fn ) {
-	var el = document.createElement("fieldset");
-
-	try {
-		return !!fn( el );
-	} catch (e) {
-		return false;
-	} finally {
-		// Remove from its parent by default
-		if ( el.parentNode ) {
-			el.parentNode.removeChild( el );
-		}
-		// release memory in IE
-		el = null;
-	}
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
-	var arr = attrs.split("|"),
-		i = arr.length;
-
-	while ( i-- ) {
-		Expr.attrHandle[ arr[i] ] = handler;
-	}
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
-	var cur = b && a,
-		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
-			a.sourceIndex - b.sourceIndex;
-
-	// Use IE sourceIndex if available on both nodes
-	if ( diff ) {
-		return diff;
-	}
-
-	// Check if b follows a
-	if ( cur ) {
-		while ( (cur = cur.nextSibling) ) {
-			if ( cur === b ) {
-				return -1;
-			}
-		}
-	}
-
-	return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
-	return function( elem ) {
-		var name = elem.nodeName.toLowerCase();
-		return name === "input" && elem.type === type;
-	};
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
-	return function( elem ) {
-		var name = elem.nodeName.toLowerCase();
-		return (name === "input" || name === "button") && elem.type === type;
-	};
-}
-
-/**
- * Returns a function to use in pseudos for :enabled/:disabled
- * @param {Boolean} disabled true for :disabled; false for :enabled
- */
-function createDisabledPseudo( disabled ) {
-	// Known :disabled false positives:
-	// IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
-	// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
-	return function( elem ) {
-
-		// Check form elements and option elements for explicit disabling
-		return "label" in elem && elem.disabled === disabled ||
-			"form" in elem && elem.disabled === disabled ||
-
-			// Check non-disabled form elements for fieldset[disabled] ancestors
-			"form" in elem && elem.disabled === false && (
-				// Support: IE6-11+
-				// Ancestry is covered for us
-				elem.isDisabled === disabled ||
-
-				// Otherwise, assume any non-
@@ -296,7 +296,6 @@

Indices and tables - diff --git a/docs/modules.html b/docs/modules.html index dc99729..be28d64 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -148,16 +148,14 @@

pywindow

@@ -211,7 +209,6 @@

pywindow - diff --git a/docs/objects.inv b/docs/objects.inv index e88d83e..b3c16be 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/py-modindex.html b/docs/py-modindex.html index a641a32..10e166a 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -159,27 +159,27 @@

Python Module Index

    -
pywindow.io_tools + pywindow.io_tools     - pywindow.molecular + pywindow.molecular     - pywindow.tables + pywindow.tables     - pywindow.trajectory + pywindow.trajectory     - pywindow.utilities + pywindow.utilities @@ -194,7 +194,7 @@

Python Module Index

- © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

@@ -227,7 +227,6 @@

Python Module Index

- diff --git a/docs/pywindow.html b/docs/pywindow.html index b8552f4..18dd313 100644 --- a/docs/pywindow.html +++ b/docs/pywindow.html @@ -80,6 +80,15 @@
  • pywindow package
  • @@ -151,18 +160,1551 @@

    pywindow package

    Submodules

    - +
    +

    pywindow.io_tools module

    +

    Module contains classes for input/output processing.

    +
    +
    +class pywindow.io_tools.Input[source]
    +

    Bases: object

    +

    Class used to load and process input files.

    +
    +
    +load_file(filepath)[source]
    +

    This function opens any type of a readable file and decompose +the file object into a list, for each line, of lists containing +splitted line strings using space as a spacer.

    + +++ + + + + + + + +
    Parameters:filepath (str) – The full path or a relative path to any type of file.
    Returns:Returns a dictionary containing the molecular information +extracted from the input files. This information will +vary with file type and information stored in it. +The data is sorted into lists that contain one feature +for example key atom_id: [atom_id_1, atom_id_2] +Over the process of analysis this dictionary will be updated +with new data.
    Return type:dict
    +
    + +
    +
    +load_rdkit_mol(mol)[source]
    +

    Return molecular data from rdkit.Chem.rdchem.Mol object.

    + +++ + + + + + + + +
    Parameters:mol (rdkit.Chem.rdchem.Mol) – A molecule object from RDKit.
    Returns:A dictionary with elements and coordinates as keys +containing molecular data extracted from +rdkit.Chem.rdchem.Mol object.
    Return type:dict
    +
    + +
    + +
    +
    +class pywindow.io_tools.Output[source]
    +

    Bases: object

    +

    Class used to process and save output files.

    +
    +
    +dump2file(obj, filepath, override=False, **kwargs)[source]
    +

    Dump a dictionary into a file. (Extensions: XYZ or PDB)

    + +++ + + + +
    Parameters:
      +
    • obj (dict) – A dictionary containing molecular information.
    • +
    • filepath (str) – The filepath for the dumped file.
    • +
    • override (bool) – If True, any file in the filepath will be override. (default=False)
    - +
    +
    + +
    +
    +dump2json(obj, filepath, override=False, **kwargs)[source]
    +

    Dump a dictionary into a JSON dictionary.

    +

    Uses the json.dump() function.

    + +++ + + + +
    Parameters:
      +
    • obj (dict) – A dictionary to be dumpped as JSON file.
    • +
    • filepath (str) – The filepath for the dumped file.
    • +
    • override (bool) – If True, any file in the filepath will be override. (default=False)
    • +
    +
    +
    + +
    + +
    +
    +

    pywindow.molecular module

    +

    Defines MolecularSystem and Molecule classes.

    +

    This module is the most important part of the pywindow package, as it is +at the frontfront of the interaction with the user. The two main classes +defined here: MolecularSystem and Molecule are used to +store and analyse single molecules or assemblies of single molecules.

    +

    The MolecularSystem is used as a first step to the analysis. It allows +to load data, to refine it (rebuild molecules in a periodic system, decipher +force field atom ids) and to extract single molecules for analysis as +Molecule instances.

    +

    To get started see MolecularSystem.

    +

    To get started with the analysis of Molecular Dynamic trajectories go to +pywindow.trajectory.

    +
    +
    +class pywindow.molecular.MolecularSystem[source]
    +

    Bases: object

    +

    Container for the molecular system.

    +

    To load input and initialise MolecularSystem, one of the +MolecularSystem classmethods (load_file(), +load_rdkit_mol() or load_system()) should be used. +MolecularSystem should not be initialised by itself.

    +

    Examples

    +
      +
    1. Using file as an input:
    2. +
    +
    pywindow.MolecularSystem.load_file(`filepath`)
    +
    +
    +
      +
    1. Using RDKit molecule object as an input:
    2. +
    +
    pywindow.MolecularSystem.load_rdkit_mol(rdkit.Chem.rdchem.Mol)
    +
    +
    +
      +
    1. Using a dictionary (or another MoleculeSystem.system) as input:
    2. +
    +
    pywindow.MolecularSystem.load_system({...})
    +
    +
    +
    +
    +system_id
    +

    str or int – The input filename or user defined.

    +
    + +
    +
    +system
    +

    dict – A dictionary containing all the information extracted from input.

    +
    + +
    +
    +molecules
    +

    list – A list containing all the returned Molecule s after using +make_modular().

    +
    + +
    +
    +decipher_atom_keys(forcefield='DLF', dict_key='atom_ids')[source]
    +

    Decipher force field atom ids.

    +

    This takes all values in MolecularSystem.system['atom_ids'] +that match force field type criteria and creates +MolecularSystem.system['elements'] with the corresponding +periodic table of elements equivalents.

    +

    If a forcefield is not supported by this method, the +MolecularSystem.swap_atom_keys() can be used instead.

    +

    DLF stands for DL_F notation.

    +

    See: C. W. Yong, Descriptions and Implementations of DL_F Notation: A +Natural Chemical Expression System of Atom Types for Molecular +Simulations, J. Chem. Inf. Model., 2016, 56, 1405–1409.

    + +++ + + + + + + + +
    Parameters:
      +
    • forcefield (str) – The forcefield used to decipher atom ids. Allowed (not case +sensitive): ‘OPLS’, ‘OPLS2005’, ‘OPLSAA’, ‘OPLS3’, ‘DLF’, ‘DL_F’. +(default=’DLF’)
    • +
    • dict_key (str) – The MolecularSystem.system dictionary key to the array +containing the force field atom ids. (default=’atom_ids’)
    • +
    +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +dump_system(filepath=None, modular=False, **kwargs)[source]
    +

    Dump a MolecularSystem to a file (PDB or XYZ).

    +

    Kwargs are passed to pywindow.io_tools.Output.dump2file().

    + +++ + + + + + + + +
    Parameters: +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +dump_system_json(filepath=None, modular=False, **kwargs)[source]
    +

    Dump a MolecularSystem to a JSON dictionary.

    +

    The dumped JSON dictionary, with MolecularSystem, can then be +loaded through a JSON loader and then through load_system() +to retrieve a MolecularSystem.

    +

    Kwargs are passed to pywindow.io_tools.Output.dump2json().

    + +++ + + + + + + + +
    Parameters: +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +classmethod load_file(filepath)[source]
    +

    Create a MolecularSystem from an input file.

    +

    Recognized input file formats: XYZ, PDB and MOL (V3000).

    + +++ + + + + + + + +
    Parameters:filepath (str) – The input’s filepath.
    Returns:MolecularSystem
    Return type:pywindow.molecular.MolecularSystem
    +
    + +
    +
    +classmethod load_rdkit_mol(mol)[source]
    +

    Create a MolecularSystem from rdkit.Chem.rdchem.Mol.

    + +++ + + + + + + + +
    Parameters:mol (rdkit.Chem.rdchem.Mol) – An RDKit molecule object.
    Returns:MolecularSystem
    Return type:pywindow.molecular.MolecularSystem
    +
    + +
    +
    +classmethod load_system(dict_, system_id='system')[source]
    +

    Create a MolecularSystem from a python dict.

    +

    As the loaded MolecularSystem is storred as a dict in +the MolecularSystem.system it can also be loaded directly from +a dict input. This feature is used by trajectory that +extracts trajectory frames as dictionaries and returns them +as MolecularSystem objects through this classmethod.

    + +++ + + + + + + + +
    Parameters:
      +
    • dict (dict) – A python dictionary.
    • +
    • system_id (str or :class:’int’, optional) – Inherited or user defined system id. (default=’system’)
    • +
    +
    Returns:

    MolecularSystem

    +
    Return type:

    pywindow.molecular.MolecularSystem

    +
    +
    + +
    +
    +make_modular(rebuild=False)[source]
    +

    Find and return all Molecule s in MolecularSystem.

    +

    This function populates MolecularSystem.molecules with +Molecule s.

    + +++ + + + + + + + +
    Parameters:rebuild (bool) – If True, run first the rebuild_system(). (default=False)
    Returns:None
    Return type:NoneType
    +
    + +
    +
    +rebuild_system(override=False, **kwargs)[source]
    +

    Rebuild molecules in molecular system.

    + +++ + + + +
    Parameters:override (bool, optional (default=False)) – If False the rebuild molecular system is returned as a new +MolecularSystem, if True, the current +MolecularSystem is modified.
    +
    + +
    +
    +swap_atom_keys(swap_dict, dict_key='atom_ids')[source]
    +

    Swap a force field atom id for another user-defined value.

    +

    This modified all values in MolecularSystem.system['atom_ids'] +that match criteria.

    +

    This function can be used to decipher a whole forcefield if an +appropriate dictionary is passed to the function.

    +

    Example

    +

    In this example all atom ids ‘he’ will be exchanged to ‘H’.

    +
    pywindow.MolecularSystem.swap_atom_keys({'he': 'H'})
    +
    +
    + +++ + + + + + + + +
    Parameters:
      +
    • swap_dict (dict) – A dictionary containg force field atom ids (keys) to be swapped +with corresponding values (keys’ arguments).
    • +
    • dict_key (str) – A key in MolecularSystem.system dictionary to perform the +atom keys swapping operation on. (default=’atom_ids’)
    • +
    +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +system_to_molecule()[source]
    +

    Return MolecularSystem as a Molecule directly.

    +

    Only to be used conditionally, when the MolecularSystem is a +discrete molecule and no input pre-processing is required.

    + +++ + + + + + +
    Returns:Molecule
    Return type:pywindow.molecular.Molecule
    +
    + +
    + +
    +
    +class pywindow.molecular.Molecule(mol, system_name, mol_id)[source]
    +

    Bases: pywindow.molecular._Shape

    +

    Container for a single molecule.

    +

    This class is meant for the analysis of single molecules, molecular pores +especially. The object passed to this class should therefore be a finite +and interconnected individuum.

    +

    This class should not be initialised directly, but result from +MolecularSystem.system_to_molecule() or +MolecularSystem.make_modular().

    +

    Methods in Molecule allow to calculate:

    +
    +
      +
    1. The maximum diameter of a molecule.
    2. +
    3. The average diameter of a molecule.
    4. +
    5. The intrinsic void diameter of a molecule.
    6. +
    7. The intrinsic void volume of a molecule.
    8. +
    9. The optimised intrinsic void diameter of a molecule.
    10. +
    11. The optimised intrinsic void volume of a molecule.
    12. +
    13. The circular diameter of a window of a molecule.
    14. +
    +
    +
    +
    +mol
    +

    dict – The Molecular.System.system dictionary passed to the +Molecule which is esentially a container of the information +that compose a molecular entity, such as the coordinates and +atom ids and/or elements.

    +
    + +
    +
    +no_of_atoms
    +

    int – The number of atoms in the molecule.

    +
    + +
    +
    +elements
    +

    numpy.array – An array containing the elements, as strings, composing the molecule.

    +
    + +
    +
    +atom_ids
    +

    numpy.array (conditional) – If the Molecule.mol contains ‘atom_ids’ keyword, the force +field ids of the elements.

    +
    + +
    +
    +coordinates
    +

    numpy.array – The x, y and z atomic Cartesian coordinates of all elements.

    +
    + +
    +
    +parent_system
    +

    str – The name of MolecularSystem passed to +Molecule.

    +
    + +
    +
    +molecule_id
    +

    any – The molecule id passed when initialising Molecule.

    +
    + +
    +
    +properties
    +

    dict – A dictionary that is populated by the output of +Molecule methods.

    +
    + +
    +
    +calculate_average_diameter(**kwargs)[source]
    +

    Return the average diamension of a molecule.

    + +++ + + + + + +
    Returns:The average dimension of the molecule.
    Return type:float
    +
    + +
    +
    +calculate_centre_of_mass()[source]
    +

    Return the xyz coordinates of the centre of mass of a molecule.

    + +++ + + + + + +
    Returns:The centre of mass of the molecule.
    Return type:numpy.array
    +
    + +
    +
    +calculate_maximum_diameter()[source]
    +

    Return the maximum diamension of a molecule.

    + +++ + + + + + +
    Returns:The maximum dimension of the molecule.
    Return type:float
    +
    + +
    +
    +calculate_pore_diameter()[source]
    +

    Return the intrinsic pore diameter.

    + +++ + + + + + +
    Returns:The intrinsic pore diameter.
    Return type:float
    +
    + +
    +
    +calculate_pore_diameter_opt(**kwargs)[source]
    +

    Return the intrinsic pore diameter (for the optimised pore centre).

    +

    Similarly to calculate_pore_diameter() this method returns the +the intrinsic pore diameter, however, first a better approximation +of the pore centre is found with optimisation.

    + +++ + + + + + +
    Returns:The intrinsic pore diameter.
    Return type:float
    +
    + +
    +
    +calculate_pore_volume()[source]
    +

    Return the intrinsic pore volume.

    + +++ + + + + + +
    Returns:The intrinsic pore volume.
    Return type:float
    +
    + +
    +
    +calculate_pore_volume_opt(**kwargs)[source]
    +

    Return the intrinsic pore volume (for the optimised pore centre).

    +

    Similarly to calculate_pore_volume() this method returns the +the volume intrinsic pore diameter, however, for the +calculate_pore_diameter_opt() returned value.

    + +++ + + + + + +
    Returns:The intrinsic pore volume.
    Return type:float
    +
    + +
    +
    +calculate_windows(**kwargs)[source]
    +

    Return the diameters of all windows in a molecule.

    +

    This function first finds and then measures the diameters of all the +window in the molecule.

    + +++ + + + +
    Returns:
      +
    • numpy.array – An array of windows’ diameters.
    • +
    • NoneType – If no windows were found.
    • +
    +
    +
    + +
    +
    +dump_molecule(filepath=None, include_coms=False, **kwargs)[source]
    +

    Dump a Molecule to a file (PDB or XYZ).

    +

    Kwargs are passed to pywindow.io_tools.Output.dump2file().

    +

    For validation purposes an overlay of window centres and COMs can also +be dumped as:

    +

    He - for the centre of mass

    +

    Ne - for the centre of the optimised cavity

    +

    Ar - for the centres of each found window

    + +++ + + + + + + + +
    Parameters:
      +
    • filepath (str) – The filepath for the dumped file. If None, the file is +dumped localy with molecule_id as filename. +(defualt=None)
    • +
    • include_coms (bool) – If True, dump also with an overlay of window centres and COMs. +(default=False)
    • +
    +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +dump_properties_json(filepath=None, molecular=False, **kwargs)[source]
    +

    Dump content of Molecule.properties to a JSON dictionary.

    + +++ + + + + + + + +
    Parameters:
      +
    • filepath (str) – The filepath for the dumped file. If None, the file is +dumped localy with molecule_id as filename. +(defualt=None)
    • +
    • molecular (bool) – If False, dump only the content of Molecule.properties, +if True, dump all the information about Molecule.
    • +
    +
    Returns:

    None

    +
    Return type:

    NoneType

    +
    +
    + +
    +
    +full_analysis(ncpus=1, **kwargs)[source]
    +

    Perform a full structural analysis of a molecule.

    +

    This invokes other methods:

    +
    +
    + +++ + + + + + + + +
    Parameters:ncpus (int) – Number of CPUs used for the parallelised parts of +pywindow.utilities.find_windows(). (default=1=serial)
    Returns:The updated Molecule.properties with returns of all +used methods.
    Return type:Molecule.properties
    +
    + +
    +
    +molecular_weight()[source]
    +

    Return the molecular weight of a molecule.

    + +++ + + + + + +
    Returns:The molecular weight of the molecule.
    Return type:float
    +
    + +
    +
    +shift_to_origin(**kwargs)[source]
    +

    Shift a molecule to Origin.

    +

    This function takes the molecule’s coordinates and adjust them so that +the centre of mass of the molecule coincides with the origin of the +coordinate system.

    + +++ + + + + + +
    Returns:None
    Return type:NoneType
    +
    + +
    + +
    +
    +

    pywindow.tables module

    +

    This module containes general-purpose chemical data (aka tables).

    +

    Sources:

    +
    +

    1. www.ccdc.cam.ac.uk/Lists/ResourceFileList/Elemental_Radii.xlsx, (access +date: 13 Oct 2015)

    +

    2. C. W. Yong, ‘DL_FIELD - A force field and model development tool for +DL_POLY’, R. Blake, Ed., CSE Frontier, STFC Computational Science and +Engineering, Daresbury Laboratory, UK, p38-40 (2010)

    +

    3. https://www.ccdc.cam.ac.uk/support-and-resources/ccdcresources/ +Elemental_Radii.xlsx (access date: 26 Jul 2017)

    +
    +

    Note:

    +

    Added atomic mass, atomic van der Waals radius and covalent radius, that equals +1, for a dummy atom X. This is for the shape descriptors calculations to use +with functions for molecular shape descriptors that require mass.

    +
    +
    +

    pywindow.trajectory module

    +

    Module intended for the analysis of molecular dynamics trajectories.

    +
    +
    +class pywindow.trajectory.DLPOLY(filepath)[source]
    +

    Bases: object

    +
    +
    +analysis(frames='all', ncpus=1, _ncpus=1, override=False, **kwargs)[source]
    +
    + +
    +
    +get_frames(frames, override=False, **kwargs)[source]
    +
    + +
    +
    +save_analysis(filepath=None, **kwargs)[source]
    +
    + +
    +
    +save_frames(frames, filepath=None, filetype='pdb', **kwargs)[source]
    +
    + +
    + +
    +
    +class pywindow.trajectory.PDB(filepath)[source]
    +

    Bases: object

    +
    +
    +analysis(frames='all', ncpus=1, override=False, **kwargs)[source]
    +
    + +
    +
    +get_frames(frames, override=False, **kwargs)[source]
    +
    + +
    +
    +save_analysis(filepath=None, **kwargs)[source]
    +
    + +
    + +
    +
    +class pywindow.trajectory.XYZ(filepath)[source]
    +

    Bases: object

    +
    +
    +analysis(frames='all', ncpus=1, override=False, **kwargs)[source]
    +
    + +
    +
    +get_frames(frames, override=False, **kwargs)[source]
    +
    + +
    +
    +save_analysis(filepath=None, **kwargs)[source]
    +
    + +
    + +
    +
    +pywindow.trajectory.make_supercell(system, matrix, supercell=[1, 1, 1])[source]
    +
    + +
    +
    +

    pywindow.utilities module

    +

    Module containing all general purpose functions shared by other modules.

    +

    This module is not intended for the direct use by a User. Therefore, I will +only docstring functions if I see fit to do so.

    +
    +

    LOG

    +
    +
    11/07/18
    +
    Changed the way vector path is analysed. Now, the initial analysis is +done with the geometrical formula for line-sphere intersection. Only +the remaining vestors that do not intersect any van der Waals spheres are +then analysed in the old way.
    +
    27/07/17
    +
    Fixed the cartesian coordinates -> fractional coordinates -> cartesian +coordinates conversion related functions, creation of lattice array +from unit cell parameters (triclinic system: so applicable to any) +and conversion back to unit cell parameters. WORKS! inspiration from: +http://www.ruppweb.org/Xray/tutorial/Coordinate%20system%20transformation.htm
    +
    26/07/17
    +
    Changed the way bonds are determined. Now, rather then fixed value +a formula and covalent radii are used as explained in the Elemental_Radii +spreadsheet (see tables module).
    +
    +
    +
    +

    TO DO LIST

    +
      +
    • Fix and validate calculating shape descriptors: asphericity, acylindricity +and the realtive shape anisotropy. (Not working at the moment)
    • +
    • In the find_windows() function, maybe change the way the EPS value for +the DBSCAN() is estimates. Need to look how the distances change with the +increase in size of the sampling sphere. (validate this with the MongoDB)
    • +
    +
    +
    +pywindow.utilities.acylidricity(S)[source]
    +
    + +
    +
    +pywindow.utilities.align_principal_ax(elements, coordinates)[source]
    +
    + +
    +
    +pywindow.utilities.angle_between_vectors(x, y)[source]
    +

    Calculate the angle between two vectors x and y.

    +
    + +
    +
    +pywindow.utilities.asphericity(S)[source]
    +
    + +
    +
    +pywindow.utilities.calc_acylidricity(elements, coordinates)[source]
    +
    + +
    +
    +pywindow.utilities.calc_asphericity(elements, coordinates)[source]
    +
    + +
    +
    +pywindow.utilities.calc_relative_shape_anisotropy(elements, coordinates)[source]
    +
    + +
    +
    +pywindow.utilities.calculate_pore_shape(elements, coordinates, adjust=1, increment=0.1, **kwargs)[source]
    +

    Return average diameter for a molecule.

    +
    + +
    +
    +pywindow.utilities.calculate_window_diameter(window, elements, coordinates, **kwargs)[source]
    +
    + +
    +
    +pywindow.utilities.cart2frac_all(coordinates, lattice_array)[source]
    +

    Convert all cartesian coordinates to fractional.

    +
    + +
    +
    +pywindow.utilities.cartisian_from_fractional(coordinate, lattice_array)[source]
    +

    Return cartesian coordinate from a fractional one.

    +
    + +
    +
    +pywindow.utilities.center_of_coor(coordinates)[source]
    +

    Return the centre of coordinates.

    + +++ + + + + + + + +
    Parameters:coordinates (numpy.ndarray) – An array containing molecule’s coordinates.
    Returns:An 1d array with coordinates of the centre of coordinates excluding +elements’ masses.
    Return type:numpy.ndarray
    +
    + +
    +
    +pywindow.utilities.center_of_mass(elements, coordinates)[source]
    +

    Return the centre of mass (COM).

    + +++ + + + + + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – An array of all elements (type: str) in a molecule.
    • +
    • coordinates (numpy.ndarray) – An array containing molecule’s coordinates.
    • +
    +
    Returns:

    An 1d array with coordinates of the centre of mass including elements’ +masses.

    +
    Return type:

    numpy.ndarray

    +
    +
    + +
    +
    +pywindow.utilities.circumcircle(coordinates, atom_sets)[source]
    +
    + +
    +
    +pywindow.utilities.circumcircle_window(coordinates, atom_set)[source]
    +
    + +
    +
    +pywindow.utilities.compose_atom_list(*args)[source]
    +

    Return an atom list from elements and/or atom ids and coordinates.

    +

    An atom list is a special object that some pywindowfunctions uses. +It is a nested list of lists with each individual list containing:

    +
    +
      +
    1. [[element, coordinates (x, y, z)], …]
    2. +
    3. [[element, atom key, coordinates (x, y, z)], …]
    4. +
    +
    +

    They work better for molecular re-building than two separate arrays for +elements and coordinates do.

    + +++ + + + + + + + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – An array of all elements (type: str) in a molecule.
    • +
    • coordinates (numpy.ndarray) – An array containing molecule’s coordinates.
    • +
    • atom_ids (numpy.ndarray, optional) – An array of all forcfield dependent atom keys (type:str) in a molecule.
    • +
    +
    Returns:

    Version 1 or version 2 atom list depending on input parameters.

    +
    Return type:

    list

    +
    Raises:

    _FunctionError : :class:`Exception` – Raised when wrong number of parameters is passed to the function.

    +
    +
    + +
    +
    +pywindow.utilities.correct_pore_diameter(com, *params)[source]
    +

    Return negative of a pore diameter. (optimisation function).

    +
    + +
    +
    +pywindow.utilities.create_supercell(system, supercell=[[-1, 1], [-1, 1], [-1, 1]])[source]
    +

    Create a supercell.

    +
    + +
    +
    +pywindow.utilities.decipher_atom_key(atom_key, forcefield)[source]
    +

    Return element for deciphered atom key.

    +

    This functions checks if the forcfield specified by user is supported +and passes the atom key to the appropriate function for deciphering.

    + +++ + + + + + + + +
    Parameters:
      +
    • atom_key (str) – The atom key which is to be deciphered.
    • +
    • forcefield (str) – The forcefield to which the atom key belongs to.
    • +
    +
    Returns:

    A string that is the periodic table element equvalent of forcefield +atom key.

    +
    Return type:

    str

    +
    +
    + +
    +
    +pywindow.utilities.decompose_atom_list(atom_list)[source]
    +

    Return elements and/or atom ids and coordinates from an atom list.

    +

    Depending on input type of an atom list (version 1 or 2)

    +
    +
      +
    1. [[element, coordinates (x, y, z)], …]
    2. +
    3. [[element, atom key, coordinates (x, y, z)], …]
    4. +
    +
    +

    the function reverses what pywindow.utilities.compose_atom_list() do.

    + +++ + + + + + + + +
    Parameters:atom_list (list) – A nested list of lists (version 1 or 2)
    Returns:A touple of elements and coordinates arrays, or if input contained +atom ideas, also atom ids array.
    Return type:touple
    +
    + +
    +
    +pywindow.utilities.discrete_molecules(system, rebuild=None, tol=0.4)[source]
    +

    Decompose molecular system into individual discreet molecules.

    +
    +

    Note

    +

    New formula for bonds: (26/07/17) +The two atoms, x and y, are considered bonded if the distance between +them, calculated with distance matrix, is within the ranges: +.. :math:

    +
    +
    Rcov(x) + Rcov(y) - t < R(x,y) < Rcov(x) + Rcov(y) + t
    +

    where Rcov is the covalent radius and the tolarenace (t) is set to +0.4 Angstrom.

    +
    +
    + +
    +
    +pywindow.utilities.distance(a, b)[source]
    +

    Return the distance between two vectors (points) a and b.

    + +++ + + + + + + + +
    Parameters:
      +
    • a (numpy.ndarray) – First vector.
    • +
    • b (numpy.ndarray) – Second vector.
    +
    Returns:

    A distance between two vectors (points).

    +
    Return type:

    numpy.float64

    +
    +
    + +
    +
    +pywindow.utilities.dlf_notation(atom_key)[source]
    +

    Return element for atom key using DL_F notation.

    +
    + +
    +
    +pywindow.utilities.find_average_diameter(elements, coordinates, adjust=1, increment=0.1, processes=None, **kwargs)[source]
    +

    Return average diameter for a molecule.

    +
    + +
    +
    +pywindow.utilities.find_windows(elements, coordinates, processes=None, mol_size=None, adjust=1, pore_opt=True, increment=1.0, **kwargs)[source]
    +

    Return windows diameters and center of masses for a molecule.

    +
    + +
    +
    +pywindow.utilities.find_windows_new(elements, coordinates, processes=None, mol_size=None, adjust=1, pore_opt=True, increment=1.0, **kwargs)[source]
    +

    Return windows diameters and center of masses for a molecule.

    +
    + +
    +
    +pywindow.utilities.frac2cart_all(frac_coordinates, lattice_array)[source]
    +

    Convert all fractional coordinates to cartesian.

    +
    + +
    +
    +pywindow.utilities.fractional_from_cartesian(coordinate, lattice_array)[source]
    +

    Return a fractional coordinate from a cartesian one.

    +
    + +
    +
    +pywindow.utilities.get_gyration_tensor(elements, coordinates)[source]
    +

    Return the gyration tensor of a molecule.

    +

    The gyration tensor should be invariant to the molecule’s position. +The known formulas for the gyration tensor have the correction for the +centre of mass of the molecule, therefore, the coordinates are first +corrected for the centre of mass and essentially shifted to the origin.

    + +++ + + + + + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – The array containing the molecule’s elemental data.
    • +
    • coordinates (numpy.ndarray) – The array containing the Cartesian coordinates of the molecule.
    • +
    +
    Returns:

    The gyration tensor of a molecule invariant to the molecule’s position.

    +
    Return type:

    numpy.ndarray

    +
    +
    + +
    +
    +pywindow.utilities.get_inertia_tensor(elements, coordinates)[source]
    +

    Return the tensor of inertia a molecule.

    + +++ + + + + + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – The array containing the molecule’s elemental data.
    • +
    • coordinates (numpy.ndarray) – The array containing the Cartesian coordinates of the molecule.
    • +
    +
    Returns:

    The tensor of inertia of a molecule.

    +
    Return type:

    numpy.ndarray

    +
    +
    + +
    +
    +pywindow.utilities.get_tensor_eigenvalues(T, sort=False)[source]
    +
    + +
    +
    +pywindow.utilities.get_window_com(window, elements, coordinates, initial_com, **kwargs)[source]
    +
    + +
    +
    +pywindow.utilities.is_inside_polyhedron(point, polyhedron)[source]
    +
    + +
    +
    +pywindow.utilities.is_number(number)[source]
    +

    Return True if an object is a number - can be converted into a float.

    + +++ + + + + + + + +
    Parameters:number (any) –
    Returns:True if input is a float convertable (a number), False otherwise.
    Return type:bool
    +
    + +
    +
    +pywindow.utilities.lattice_array_to_unit_cell(lattice_array)[source]
    +

    Return crystallographic param. from unit cell lattice matrix.

    +
    + +
    +
    +pywindow.utilities.max_dim(elements, coordinates)[source]
    +

    Return the maximum diameter of a molecule.

    + +++ + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – An array of all elements (type: str) in a molecule.
    • +
    • coordinates (numpy.ndarray) – An array containing molecule’s coordinates.
    • +
    +
    +
    + +
    +
    +pywindow.utilities.molecular_weight(elements)[source]
    +

    Return molecular weight of a molecule.

    + +++ + + + + + + + +
    Parameters:elements (numpy.ndarray) – An array of all elements (type: str) in a molecule.
    Returns:A molecular weight of a molecule.
    Return type:numpy.float64
    +
    + +
    +
    +pywindow.utilities.normal_vector(origin, vectors)[source]
    +

    Return normal vector for two vectors with same origin.

    +
    + +
    +
    +pywindow.utilities.normalize_vector(vector)[source]
    +

    Normalize a vector.

    +

    A new vector is returned, the original vector is not modified.

    + +++ + + + + + + + +
    Parameters:vector (np.array) – The vector to be normalized.
    Returns:The normalized vector.
    Return type:np.array
    +
    + +
    +
    +pywindow.utilities.opls_notation(atom_key)[source]
    +

    Return element for OPLS forcefield atom key.

    +
    + +
    +
    +pywindow.utilities.opt_pore_diameter(elements, coordinates, bounds=None, com=None, **kwargs)[source]
    +

    Return optimised pore diameter and it’s COM.

    +
    + +
    +
    +pywindow.utilities.optimise_xy(xy, *args)[source]
    +

    Return negative pore diameter for x and y coordinates optimisation.

    +
    + +
    +
    +pywindow.utilities.optimise_z(z, *args)[source]
    +

    Return pore diameter for coordinates optimisation in z direction.

    +
    + +
    +
    +pywindow.utilities.pore_diameter(elements, coordinates, com=None)[source]
    +

    Return pore diameter of a molecule.

    +
    + +
    +
    +pywindow.utilities.principal_axes(elements, coordinates)[source]
    +
    + +
    +
    +pywindow.utilities.relative_shape_anisotropy(S)[source]
    +
    + +
    +
    +pywindow.utilities.rotation_matrix_arbitrary_axis(angle, axis)[source]
    +

    Return a rotation matrix of angle radians about axis.

    + +++ + + + + + + + +
    Parameters:
      +
    • angle (int or float) – The size of the rotation in radians.
    • +
    • axis (numpy.array) – A 3 element aray which represents a vector. The vector is the +axis about which the rotation is carried out.
    • +
    +
    Returns:

    A 3x3 array representing a rotation matrix.

    +
    Return type:

    numpy.array

    +
    +
    + +
    +
    +pywindow.utilities.shift_com(elements, coordinates, com_adjust=array([0., 0., 0.]))[source]
    +

    Return coordinates translated by some vector.

    + +++ + + + + + + + +
    Parameters:
      +
    • elements (numpy.ndarray) – An array of all elements (type: str) in a molecule.
    • +
    • coordinates (numpy.ndarray) – An array containing molecule’s coordinates.
    • +
    • com_adjust (numpy.ndarray (default = [0, 0, 0])) –
    • +
    +
    Returns:

    Translated array of molecule’s coordinates.

    +
    Return type:

    numpy.ndarray

    +
    +
    + +
    +
    +pywindow.utilities.sphere_volume(sphere_radius)[source]
    +

    Return volume of a sphere.

    +
    + +
    +
    +pywindow.utilities.to_list(obj)[source]
    +
    + +
    +
    +pywindow.utilities.unique(input_list)[source]
    +

    Return a list of unique items (similar to set functionality).

    + +++ + + + + + + + +
    Parameters:input_list (list) – A list containg some items that can occur more than once.
    Returns:A list with only unique occurances of an item.
    Return type:list
    +
    + +
    +
    +pywindow.utilities.unit_cell_to_lattice_array(cryst)[source]
    +

    Return parallelpiped unit cell lattice matrix.

    +
    + +
    +
    +pywindow.utilities.vector_analysis(vector, coordinates, elements_vdw, increment=1.0)[source]
    +

    Analyse a sampling vector’s path for window analysis purpose.

    +
    + +
    +
    +pywindow.utilities.vector_analysis_pore_shape(vector, coordinates, elements_vdw)[source]
    +
    + +
    +
    +pywindow.utilities.vector_analysis_reversed(vector, coordinates, elements_vdw)[source]
    +
    + +
    +
    +pywindow.utilities.vector_preanalysis(vector, coordinates, elements_vdw, increment=1.0)[source]
    +
    + +
    +
    +pywindow.utilities.volume_from_cell_parameters(cryst)[source]
    +

    Return unit cell’s volume from crystallographic parameters.

    +
    + +
    +
    +pywindow.utilities.volume_from_lattice_array(lattice_array)[source]
    +

    Return unit cell’s volume from lattice matrix.

    +
    + +
    +
    +pywindow.utilities.window_analysis(window, elements, coordinates, elements_vdw, increment2=0.1, z_bounds=[None, None], lb_z=True, z_second_mini=False, **kwargs)[source]
    +

    Return window diameter and window’s centre.

    + +++ + + + +
    Parameters:
      +
    • widnow (list) –
    • +
    • elements (numpy.array) –
    • +
    • coordinates (numpy.array) –
    • +
    • elements_vdw (numpy.array) –
    • +
    • step (float) –
    • +
    +
    +
    + +
    +
    +pywindow.utilities.window_shape(window, elements, coordinates, increment2=0.1, z_bounds=[None, None], lb_z=True, z_second_mini=False, **kwargs)[source]
    +

    Return window diameter and window’s centre.

    + +++ + + + +
    Parameters:
      +
    • widnow (list) –
    • +
    • elements (numpy.array) –
    • +
    • coordinates (numpy.array) –
    • +
    • elements_vdw (numpy.array) –
    • +
    • step (float) –
    • +
    +
    +
    +
    @@ -214,7 +1756,6 @@

    Submodules - diff --git a/docs/pywindow.io_tools.html b/docs/pywindow.io_tools.html deleted file mode 100644 index e687624..0000000 --- a/docs/pywindow.io_tools.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - - - - pywindow.io_tools module — pywindow documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    - -
    -

    pywindow.io_tools module

    -

    Module contains classes for input/output processing.

    -
    -
    -class pywindow.io_tools.Input[source]
    -

    Bases: object

    -

    Class used to load and process input files.

    -
    -
    -load_file(filepath)[source]
    -

    This function opens any type of a readable file and decompose -the file object into a list, for each line, of lists containing -splitted line strings using space as a spacer.

    -
    -
    filepath : str
    -
    The full path or a relative path to any type of file.
    -
    -
    -
    dict
    -
    Returns a dictionary containing the molecular information -extracted from the input files. This information will -vary with file type and information stored in it. -The data is sorted into lists that contain one feature -for example key atom_id: [atom_id_1, atom_id_2] -Over the process of analysis this dictionary will be updated -with new data.
    -
    -
    - -
    -
    -load_rdkit_mol(mol)[source]
    -

    Return molecular data from rdkit.Chem.rdchem.Mol object.

    -
    -
    mol : rdkit.Chem.rdchem.Mol
    -
    A molecule object from RDKit.
    -
    -
    -
    dict
    -
    A dictionary with elements and coordinates as keys -containing molecular data extracted from -rdkit.Chem.rdchem.Mol object.
    -
    -
    - -
    - -
    -
    -class pywindow.io_tools.Output[source]
    -

    Bases: object

    -

    Class used to process and save output files.

    -
    -
    -dump2file(obj, filepath, override=False, **kwargs)[source]
    -

    Dump a dictionary into a file. (Extensions: XYZ or PDB)

    -
    -
    obj : dict
    -
    A dictionary containing molecular information.
    -
    filepath : str
    -
    The filepath for the dumped file.
    -
    override : bool
    -
    If True, any file in the filepath will be override. (default=False)
    -
    -
    - -
    -
    -dump2json(obj, filepath, override=False, **kwargs)[source]
    -

    Dump a dictionary into a JSON dictionary.

    -

    Uses the json.dump() function.

    -
    -
    obj : dict
    -
    A dictionary to be dumpped as JSON file.
    -
    filepath : str
    -
    The filepath for the dumped file.
    -
    override : bool
    -
    If True, any file in the filepath will be override. (default=False)
    -
    -
    - -
    - -
    - - -
    - -
    -
    - - -
    - -
    -

    - © Copyright 2018, Marcin Miklitz. - -

    -
    - Built with Sphinx using a theme provided by Read the Docs. - -
    - -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/pywindow.molecular.html b/docs/pywindow.molecular.html deleted file mode 100644 index eab3614..0000000 --- a/docs/pywindow.molecular.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - - - - - pywindow.molecular module — pywindow documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    - -
    -

    pywindow.molecular module

    -

    Defines MolecularSystem and Molecule classes.

    -

    This module is the most important part of the pywindow package, as it is -at the frontfront of the interaction with the user. The two main classes -defined here: MolecularSystem and Molecule are used to -store and analyse single molecules or assemblies of single molecules.

    -

    The MolecularSystem is used as a first step to the analysis. It allows -to load data, to refine it (rebuild molecules in a periodic system, decipher -force field atom ids) and to extract single molecules for analysis as -Molecule instances.

    -

    To get started see MolecularSystem.

    -

    To get started with the analysis of Molecular Dynamic trajectories go to -pywindow.trajectory.

    -
    -
    -class pywindow.molecular.MolecularSystem[source]
    -

    Bases: object

    -

    Container for the molecular system.

    -

    To load input and initialise MolecularSystem, one of the -MolecularSystem classmethods (load_file(), -load_rdkit_mol() or load_system()) should be used. -MolecularSystem should not be initialised by itself.

    -
      -
    1. Using file as an input:
    2. -
    -
    pywindow.MolecularSystem.load_file(`filepath`)
    -
    -
    -
      -
    1. Using RDKit molecule object as an input:
    2. -
    -
    pywindow.MolecularSystem.load_rdkit_mol(rdkit.Chem.rdchem.Mol)
    -
    -
    -
      -
    1. Using a dictionary (or another MoleculeSystem.system) as input:
    2. -
    -
    pywindow.MolecularSystem.load_system({...})
    -
    -
    -
    -
    system_id : str or int
    -
    The input filename or user defined.
    -
    system : dict
    -
    A dictionary containing all the information extracted from input.
    -
    molecules : list
    -
    A list containing all the returned Molecule s after using -make_modular().
    -
    -
    -
    -decipher_atom_keys(forcefield='DLF', dict_key='atom_ids')[source]
    -

    Decipher force field atom ids.

    -

    This takes all values in MolecularSystem.system['atom_ids'] -that match force field type criteria and creates -MolecularSystem.system['elements'] with the corresponding -periodic table of elements equivalents.

    -

    If a forcefield is not supported by this method, the -MolecularSystem.swap_atom_keys() can be used instead.

    -

    DLF stands for DL_F notation.

    -

    See: C. W. Yong, Descriptions and Implementations of DL_F Notation: A -Natural Chemical Expression System of Atom Types for Molecular -Simulations, J. Chem. Inf. Model., 2016, 56, 1405–1409.

    -
    -
    forcefield : str
    -
    The forcefield used to decipher atom ids. Allowed (not case -sensitive): ‘OPLS’, ‘OPLS2005’, ‘OPLSAA’, ‘OPLS3’, ‘DLF’, ‘DL_F’. -(default=’DLF’)
    -
    dict_key : str
    -
    The MolecularSystem.system dictionary key to the array -containing the force field atom ids. (default=’atom_ids’)
    -
    -

    None : NoneType

    -
    - -
    -
    -dump_system(filepath=None, modular=False, **kwargs)[source]
    -

    Dump a MolecularSystem to a file (PDB or XYZ).

    -

    Kwargs are passed to pywindow.io_tools.Output.dump2file().

    -
    -
    filepath : str
    -
    The filepath for the dumped file. If None, the file is -dumped localy with system_id as filename. -(defualt=None)
    -
    modular : bool
    -
    If False, dump the MolecularSystem as in -MolecularSystem.system, if True, dump the -MolecularSystem as catenated :class:Molecule objects -from MolecularSystem.molecules
    -
    -

    None : NoneType

    -
    - -
    -
    -dump_system_json(filepath=None, modular=False, **kwargs)[source]
    -

    Dump a MolecularSystem to a JSON dictionary.

    -

    The dumped JSON dictionary, with MolecularSystem, can then be -loaded through a JSON loader and then through load_system() -to retrieve a MolecularSystem.

    -

    Kwargs are passed to pywindow.io_tools.Output.dump2json().

    -
    -
    filepath : str
    -
    The filepath for the dumped file. If None, the file is -dumped localy with system_id as filename. -(defualt=None)
    -
    modular : bool
    -
    If False, dump the MolecularSystem as in -MolecularSystem.system, if True, dump the -MolecularSystem as catenated :class:Molecule objects -from MolecularSystem.molecules
    -
    -

    None : NoneType

    -
    - -
    -
    -classmethod load_file(filepath)[source]
    -

    Create a MolecularSystem from an input file.

    -

    Recognized input file formats: XYZ, PDB and MOL (V3000).

    -
    -
    filepath : str
    -
    The input’s filepath.
    -
    -
    -
    pywindow.molecular.MolecularSystem
    -
    MolecularSystem
    -
    -
    - -
    -
    -classmethod load_rdkit_mol(mol)[source]
    -

    Create a MolecularSystem from rdkit.Chem.rdchem.Mol.

    -
    -
    mol : rdkit.Chem.rdchem.Mol
    -
    An RDKit molecule object.
    -
    -
    -
    pywindow.molecular.MolecularSystem
    -
    MolecularSystem
    -
    -
    - -
    -
    -classmethod load_system(dict_, system_id='system')[source]
    -

    Create a MolecularSystem from a python dict.

    -

    As the loaded MolecularSystem is storred as a dict in -the MolecularSystem.system it can also be loaded directly from -a dict input. This feature is used by trajectory that -extracts trajectory frames as dictionaries and returns them -as MolecularSystem objects through this classmethod.

    -
    -
    dict_ : dict
    -
    A python dictionary.
    -
    system_id : str or :class:’int’, optional
    -
    Inherited or user defined system id. (default=’system’)
    -
    -
    -
    pywindow.molecular.MolecularSystem
    -
    MolecularSystem
    -
    -
    - -
    -
    -make_modular(rebuild=False)[source]
    -

    Find and return all Molecule s in MolecularSystem.

    -

    This function populates MolecularSystem.molecules with -Molecule s.

    -
    -
    rebuild : bool
    -
    If True, run first the rebuild_system(). (default=False)
    -
    -

    None : NoneType

    -
    - -
    -
    -rebuild_system(override=False, **kwargs)[source]
    -

    Rebuild molecules in molecular system.

    -
    -
    override : bool, optional (default=False)
    -
    If False the rebuild molecular system is returned as a new -MolecularSystem, if True, the current -MolecularSystem is modified.
    -
    -
    - -
    -
    -swap_atom_keys(swap_dict, dict_key='atom_ids')[source]
    -

    Swap a force field atom id for another user-defined value.

    -

    This modified all values in MolecularSystem.system['atom_ids'] -that match criteria.

    -

    This function can be used to decipher a whole forcefield if an -appropriate dictionary is passed to the function.

    -

    In this example all atom ids ‘he’ will be exchanged to ‘H’.

    -
    pywindow.MolecularSystem.swap_atom_keys({'he': 'H'})
    -
    -
    -
    -
    swap_dict: dict
    -
    A dictionary containg force field atom ids (keys) to be swapped -with corresponding values (keys’ arguments).
    -
    dict_key: str
    -
    A key in MolecularSystem.system dictionary to perform the -atom keys swapping operation on. (default=’atom_ids’)
    -
    -

    None : NoneType

    -
    - -
    -
    -system_to_molecule()[source]
    -

    Return MolecularSystem as a Molecule directly.

    -

    Only to be used conditionally, when the MolecularSystem is a -discrete molecule and no input pre-processing is required.

    -
    -
    pywindow.molecular.Molecule
    -
    Molecule
    -
    -
    - -
    - -
    -
    -class pywindow.molecular.Molecule(mol, system_name, mol_id)[source]
    -

    Bases: pywindow.molecular._Shape

    -

    Container for a single molecule.

    -

    This class is meant for the analysis of single molecules, molecular pores -especially. The object passed to this class should therefore be a finite -and interconnected individuum.

    -

    This class should not be initialised directly, but result from -MolecularSystem.system_to_molecule() or -MolecularSystem.make_modular().

    -

    Methods in Molecule allow to calculate:

    -
    -
      -
    1. The maximum diameter of a molecule.
    2. -
    3. The average diameter of a molecule.
    4. -
    5. The intrinsic void diameter of a molecule.
    6. -
    7. The intrinsic void volume of a molecule.
    8. -
    9. The optimised intrinsic void diameter of a molecule.
    10. -
    11. The optimised intrinsic void volume of a molecule.
    12. -
    13. The circular diameter of a window of a molecule.
    14. -
    -
    -
    -
    mol : dict
    -
    The Molecular.System.system dictionary passed to the -Molecule which is esentially a container of the information -that compose a molecular entity, such as the coordinates and -atom ids and/or elements.
    -
    no_of_atoms : int
    -
    The number of atoms in the molecule.
    -
    elements : numpy.array
    -
    An array containing the elements, as strings, composing the molecule.
    -
    atom_ids : numpy.array (conditional)
    -
    If the Molecule.mol contains ‘atom_ids’ keyword, the force -field ids of the elements.
    -
    coordinates : numpy.array
    -
    The x, y and z atomic Cartesian coordinates of all elements.
    -
    parent_system : str
    -
    The name of MolecularSystem passed to -Molecule.
    -
    molecule_id : any
    -
    The molecule id passed when initialising Molecule.
    -
    properties : dict
    -
    A dictionary that is populated by the output of -Molecule methods.
    -
    -
    -
    -calculate_average_diameter(**kwargs)[source]
    -

    Return the average diamension of a molecule.

    -
    -
    float
    -
    The average dimension of the molecule.
    -
    -
    - -
    -
    -calculate_centre_of_mass()[source]
    -

    Return the xyz coordinates of the centre of mass of a molecule.

    -
    -
    numpy.array
    -
    The centre of mass of the molecule.
    -
    -
    - -
    -
    -calculate_maximum_diameter()[source]
    -

    Return the maximum diamension of a molecule.

    -
    -
    float
    -
    The maximum dimension of the molecule.
    -
    -
    - -
    -
    -calculate_pore_diameter()[source]
    -

    Return the intrinsic pore diameter.

    -
    -
    float
    -
    The intrinsic pore diameter.
    -
    -
    - -
    -
    -calculate_pore_diameter_opt(**kwargs)[source]
    -

    Return the intrinsic pore diameter (for the optimised pore centre).

    -

    Similarly to calculate_pore_diameter() this method returns the -the intrinsic pore diameter, however, first a better approximation -of the pore centre is found with optimisation.

    -
    -
    float
    -
    The intrinsic pore diameter.
    -
    -
    - -
    -
    -calculate_pore_volume()[source]
    -

    Return the intrinsic pore volume.

    -
    -
    float
    -
    The intrinsic pore volume.
    -
    -
    - -
    -
    -calculate_pore_volume_opt(**kwargs)[source]
    -

    Return the intrinsic pore volume (for the optimised pore centre).

    -

    Similarly to calculate_pore_volume() this method returns the -the volume intrinsic pore diameter, however, for the -calculate_pore_diameter_opt() returned value.

    -
    -
    float
    -
    The intrinsic pore volume.
    -
    -
    - -
    -
    -calculate_windows(**kwargs)[source]
    -

    Return the diameters of all windows in a molecule.

    -

    This function first finds and then measures the diameters of all the -window in the molecule.

    -
    -
    numpy.array
    -
    An array of windows’ diameters.
    -
    NoneType
    -
    If no windows were found.
    -
    -
    - -
    -
    -dump_molecule(filepath=None, include_coms=False, **kwargs)[source]
    -

    Dump a Molecule to a file (PDB or XYZ).

    -

    Kwargs are passed to pywindow.io_tools.Output.dump2file().

    -

    For validation purposes an overlay of window centres and COMs can also -be dumped as:

    -

    He - for the centre of mass

    -

    Ne - for the centre of the optimised cavity

    -

    Ar - for the centres of each found window

    -
    -
    filepath : str
    -
    The filepath for the dumped file. If None, the file is -dumped localy with molecule_id as filename. -(defualt=None)
    -
    include_coms : bool
    -
    If True, dump also with an overlay of window centres and COMs. -(default=False)
    -
    -

    None : NoneType

    -
    - -
    -
    -dump_properties_json(filepath=None, molecular=False, **kwargs)[source]
    -

    Dump content of Molecule.properties to a JSON dictionary.

    -
    -
    filepath : str
    -
    The filepath for the dumped file. If None, the file is -dumped localy with molecule_id as filename. -(defualt=None)
    -
    molecular : bool
    -
    If False, dump only the content of Molecule.properties, -if True, dump all the information about Molecule.
    -
    -

    None : NoneType

    -
    - -
    -
    -full_analysis(ncpus=1, **kwargs)[source]
    -

    Perform a full structural analysis of a molecule.

    -

    This invokes other methods:

    -
    -
    -
    -
    ncpus : int
    -
    Number of CPUs used for the parallelised parts of -pywindow.utilities.find_windows(). (default=1=serial)
    -
    -
    -
    Molecule.properties
    -
    The updated Molecule.properties with returns of all -used methods.
    -
    -
    - -
    -
    -molecular_weight()[source]
    -

    Return the molecular weight of a molecule.

    -
    -
    float
    -
    The molecular weight of the molecule.
    -
    -
    - -
    -
    -shift_to_origin(**kwargs)[source]
    -

    Shift a molecule to Origin.

    -

    This function takes the molecule’s coordinates and adjust them so that -the centre of mass of the molecule coincides with the origin of the -coordinate system.

    -

    None : NoneType

    -
    - -
    - -
    - - -
    - -
    -
    - - -
    - -
    -

    - © Copyright 2018, Marcin Miklitz. - -

    -
    - Built with Sphinx using a theme provided by Read the Docs. - -
    - -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/pywindow.tables.html b/docs/pywindow.tables.html deleted file mode 100644 index 5fd0ea6..0000000 --- a/docs/pywindow.tables.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - pywindow.tables module — pywindow documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    - -
    -

    pywindow.tables module

    -

    This module containes general-purpose chemical data (aka tables).

    -

    Sources:

    -
    -

    1. www.ccdc.cam.ac.uk/Lists/ResourceFileList/Elemental_Radii.xlsx, (access -date: 13 Oct 2015)

    -

    2. C. W. Yong, ‘DL_FIELD - A force field and model development tool for -DL_POLY’, R. Blake, Ed., CSE Frontier, STFC Computational Science and -Engineering, Daresbury Laboratory, UK, p38-40 (2010)

    -

    3. https://www.ccdc.cam.ac.uk/support-and-resources/ccdcresources/ -Elemental_Radii.xlsx (access date: 26 Jul 2017)

    -
    -

    Note:

    -

    Added atomic mass, atomic van der Waals radius and covalent radius, that equals -1, for a dummy atom X. This is for the shape descriptors calculations to use -with functions for molecular shape descriptors that require mass.

    -
    - - -
    - -
    -
    - - -
    - -
    -

    - © Copyright 2018, Marcin Miklitz. - -

    -
    - Built with Sphinx using a theme provided by Read the Docs. - -
    - -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/pywindow.trajectory.html b/docs/pywindow.trajectory.html deleted file mode 100644 index 30a9486..0000000 --- a/docs/pywindow.trajectory.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - - - - pywindow.trajectory module — pywindow documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    - -
    -

    pywindow.trajectory module

    -

    Module intended for the analysis of molecular dynamics trajectories.

    -
    -
    -class pywindow.trajectory.DLPOLY(filepath)[source]
    -

    Bases: object

    -
    -
    -analysis(frames='all', ncpus=1, _ncpus=1, override=False, **kwargs)[source]
    -
    - -
    -
    -get_frames(frames, override=False, **kwargs)[source]
    -
    - -
    -
    -save_analysis(filepath=None, **kwargs)[source]
    -
    - -
    -
    -save_frames(frames, filepath=None, filetype='pdb', **kwargs)[source]
    -
    - -
    - -
    -
    -class pywindow.trajectory.PDB(filepath)[source]
    -

    Bases: object

    -
    -
    -analysis(frames='all', ncpus=1, override=False, **kwargs)[source]
    -
    - -
    -
    -get_frames(frames, override=False, **kwargs)[source]
    -
    - -
    -
    -save_analysis(filepath=None, **kwargs)[source]
    -
    - -
    - -
    -
    -class pywindow.trajectory.XYZ(filepath)[source]
    -

    Bases: object

    -
    -
    -analysis(frames='all', ncpus=1, override=False, **kwargs)[source]
    -
    - -
    -
    -get_frames(frames, override=False, **kwargs)[source]
    -
    - -
    -
    -save_analysis(filepath=None, **kwargs)[source]
    -
    - -
    - -
    -
    -pywindow.trajectory.make_supercell(system, matrix, supercell=[1, 1, 1])[source]
    -
    - -
    - - -
    - -
    -
    - - -
    - -
    -

    - © Copyright 2018, Marcin Miklitz. - -

    -
    - Built with Sphinx using a theme provided by Read the Docs. - -
    - -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/pywindow.utilities.html b/docs/pywindow.utilities.html deleted file mode 100644 index fcac126..0000000 --- a/docs/pywindow.utilities.html +++ /dev/null @@ -1,772 +0,0 @@ - - - - - - - - - - - pywindow.utilities module — pywindow documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    - -
    -

    pywindow.utilities module

    -

    Module containing all general purpose functions shared by other modules.

    -

    This module is not intended for the direct use by a User. Therefore, I will -only docstring functions if I see fit to do so.

    -
    -

    LOG

    -
    -
    11/07/18
    -
    Changed the way vector path is analysed. Now, the initial analysis is -done with the geometrical formula for line-sphere intersection. Only -the remaining vestors that do not intersect any van der Waals spheres are -then analysed in the old way.
    -
    27/07/17
    -
    Fixed the cartesian coordinates -> fractional coordinates -> cartesian -coordinates conversion related functions, creation of lattice array -from unit cell parameters (triclinic system: so applicable to any) -and conversion back to unit cell parameters. WORKS! inspiration from: -http://www.ruppweb.org/Xray/tutorial/Coordinate%20system%20transformation.htm
    -
    26/07/17
    -
    Changed the way bonds are determined. Now, rather then fixed value -a formula and covalent radii are used as explained in the Elemental_Radii -spreadsheet (see tables module).
    -
    -
    -
    -

    TO DO LIST

    -
      -
    • Fix and validate calculating shape descriptors: asphericity, acylindricity -and the realtive shape anisotropy. (Not working at the moment)
    • -
    • In the find_windows() function, maybe change the way the EPS value for -the DBSCAN() is estimates. Need to look how the distances change with the -increase in size of the sampling sphere. (validate this with the MongoDB)
    • -
    -
    -
    -pywindow.utilities.acylidricity(S)[source]
    -
    - -
    -
    -pywindow.utilities.align_principal_ax(elements, coordinates)[source]
    -
    - -
    -
    -pywindow.utilities.angle_between_vectors(x, y)[source]
    -

    Calculate the angle between two vectors x and y.

    -
    - -
    -
    -pywindow.utilities.asphericity(S)[source]
    -
    - -
    -
    -pywindow.utilities.calc_acylidricity(elements, coordinates)[source]
    -
    - -
    -
    -pywindow.utilities.calc_asphericity(elements, coordinates)[source]
    -
    - -
    -
    -pywindow.utilities.calc_relative_shape_anisotropy(elements, coordinates)[source]
    -
    - -
    -
    -pywindow.utilities.calculate_pore_shape(elements, coordinates, adjust=1, increment=0.1, **kwargs)[source]
    -

    Return average diameter for a molecule.

    -
    - -
    -
    -pywindow.utilities.calculate_window_diameter(window, elements, coordinates, **kwargs)[source]
    -
    - -
    -
    -pywindow.utilities.cart2frac_all(coordinates, lattice_array)[source]
    -

    Convert all cartesian coordinates to fractional.

    -
    - -
    -
    -pywindow.utilities.cartisian_from_fractional(coordinate, lattice_array)[source]
    -

    Return cartesian coordinate from a fractional one.

    -
    - -
    -
    -pywindow.utilities.center_of_coor(coordinates)[source]
    -

    Return the centre of coordinates.

    -
    -
    coordinates : numpy.ndarray
    -
    An array containing molecule’s coordinates.
    -
    -
    -
    numpy.ndarray
    -
    An 1d array with coordinates of the centre of coordinates excluding -elements’ masses.
    -
    -
    - -
    -
    -pywindow.utilities.center_of_mass(elements, coordinates)[source]
    -

    Return the centre of mass (COM).

    -
    -
    elements : numpy.ndarray
    -
    An array of all elements (type: str) in a molecule.
    -
    coordinates : numpy.ndarray
    -
    An array containing molecule’s coordinates.
    -
    -
    -
    numpy.ndarray
    -
    An 1d array with coordinates of the centre of mass including elements’ -masses.
    -
    -
    - -
    -
    -pywindow.utilities.circumcircle(coordinates, atom_sets)[source]
    -
    - -
    -
    -pywindow.utilities.circumcircle_window(coordinates, atom_set)[source]
    -
    - -
    -
    -pywindow.utilities.compose_atom_list(*args)[source]
    -

    Return an atom list from elements and/or atom ids and coordinates.

    -

    An atom list is a special object that some pywindowfunctions uses. -It is a nested list of lists with each individual list containing:

    -
    -
      -
    1. [[element, coordinates (x, y, z)], …]
    2. -
    3. [[element, atom key, coordinates (x, y, z)], …]
    4. -
    -
    -

    They work better for molecular re-building than two separate arrays for -elements and coordinates do.

    -
    -
    elements : numpy.ndarray
    -
    An array of all elements (type: str) in a molecule.
    -
    coordinates : numpy.ndarray
    -
    An array containing molecule’s coordinates.
    -
    atom_ids : numpy.ndarray, optional
    -
    An array of all forcfield dependent atom keys (type:str) in a molecule.
    -
    -
    -
    list
    -
    Version 1 or version 2 atom list depending on input parameters.
    -
    -
    -
    _FunctionError : Exception
    -
    Raised when wrong number of parameters is passed to the function.
    -
    -
    - -
    -
    -pywindow.utilities.correct_pore_diameter(com, *params)[source]
    -

    Return negative of a pore diameter. (optimisation function).

    -
    - -
    -
    -pywindow.utilities.create_supercell(system, supercell=[[-1, 1], [-1, 1], [-1, 1]])[source]
    -

    Create a supercell.

    -
    - -
    -
    -pywindow.utilities.decipher_atom_key(atom_key, forcefield)[source]
    -

    Return element for deciphered atom key.

    -

    This functions checks if the forcfield specified by user is supported -and passes the atom key to the appropriate function for deciphering.

    -
    -
    atom_key : str
    -
    The atom key which is to be deciphered.
    -
    forcefield : str
    -
    The forcefield to which the atom key belongs to.
    -
    -
    -
    str
    -
    A string that is the periodic table element equvalent of forcefield -atom key.
    -
    -
    - -
    -
    -pywindow.utilities.decompose_atom_list(atom_list)[source]
    -

    Return elements and/or atom ids and coordinates from an atom list.

    -

    Depending on input type of an atom list (version 1 or 2)

    -
    -
      -
    1. [[element, coordinates (x, y, z)], …]
    2. -
    3. [[element, atom key, coordinates (x, y, z)], …]
    4. -
    -
    -

    the function reverses what pywindow.utilities.compose_atom_list() do.

    -
    -
    atom_list : list
    -
    A nested list of lists (version 1 or 2)
    -
    -
    -
    touple
    -
    A touple of elements and coordinates arrays, or if input contained -atom ideas, also atom ids array.
    -
    -
    - -
    -
    -pywindow.utilities.discrete_molecules(system, rebuild=None, tol=0.4)[source]
    -

    Decompose molecular system into individual discreet molecules.

    -

    New formula for bonds: (26/07/17) -The two atoms, x and y, are considered bonded if the distance between -them, calculated with distance matrix, is within the ranges: -.. :math:

    -
    -
    Rcov(x) + Rcov(y) - t < R(x,y) < Rcov(x) + Rcov(y) + t
    -

    where Rcov is the covalent radius and the tolarenace (t) is set to -0.4 Angstrom.

    -
    - -
    -
    -pywindow.utilities.distance(a, b)[source]
    -

    Return the distance between two vectors (points) a and b.

    -
    -
    a : numpy.ndarray
    -
    First vector.
    -
    b : numpy.ndarray
    -
    Second vector.
    -
    -
    -
    numpy.float64
    -
    A distance between two vectors (points).
    -
    -
    - -
    -
    -pywindow.utilities.dlf_notation(atom_key)[source]
    -

    Return element for atom key using DL_F notation.

    -
    - -
    -
    -pywindow.utilities.find_average_diameter(elements, coordinates, adjust=1, increment=0.1, processes=None, **kwargs)[source]
    -

    Return average diameter for a molecule.

    -
    - -
    -
    -pywindow.utilities.find_windows(elements, coordinates, processes=None, mol_size=None, adjust=1, pore_opt=True, increment=1.0, **kwargs)[source]
    -

    Return windows diameters and center of masses for a molecule.

    -
    - -
    -
    -pywindow.utilities.find_windows_new(elements, coordinates, processes=None, mol_size=None, adjust=1, pore_opt=True, increment=1.0, **kwargs)[source]
    -

    Return windows diameters and center of masses for a molecule.

    -
    - -
    -
    -pywindow.utilities.frac2cart_all(frac_coordinates, lattice_array)[source]
    -

    Convert all fractional coordinates to cartesian.

    -
    - -
    -
    -pywindow.utilities.fractional_from_cartesian(coordinate, lattice_array)[source]
    -

    Return a fractional coordinate from a cartesian one.

    -
    - -
    -
    -pywindow.utilities.get_gyration_tensor(elements, coordinates)[source]
    -

    Return the gyration tensor of a molecule.

    -

    The gyration tensor should be invariant to the molecule’s position. -The known formulas for the gyration tensor have the correction for the -centre of mass of the molecule, therefore, the coordinates are first -corrected for the centre of mass and essentially shifted to the origin.

    -
    -
    elements : numpy.ndarray
    -
    The array containing the molecule’s elemental data.
    -
    coordinates : numpy.ndarray
    -
    The array containing the Cartesian coordinates of the molecule.
    -
    -
    -
    numpy.ndarray
    -
    The gyration tensor of a molecule invariant to the molecule’s position.
    -
    -
    - -
    -
    -pywindow.utilities.get_inertia_tensor(elements, coordinates)[source]
    -

    Return the tensor of inertia a molecule.

    -
    -
    elements : numpy.ndarray
    -
    The array containing the molecule’s elemental data.
    -
    coordinates : numpy.ndarray
    -
    The array containing the Cartesian coordinates of the molecule.
    -
    -
    -
    numpy.ndarray
    -
    The tensor of inertia of a molecule.
    -
    -
    - -
    -
    -pywindow.utilities.get_tensor_eigenvalues(T, sort=False)[source]
    -
    - -
    -
    -pywindow.utilities.get_window_com(window, elements, coordinates, initial_com, **kwargs)[source]
    -
    - -
    -
    -pywindow.utilities.is_inside_polyhedron(point, polyhedron)[source]
    -
    - -
    -
    -pywindow.utilities.is_number(number)[source]
    -

    Return True if an object is a number - can be converted into a float.

    -

    number : any

    -
    -
    bool
    -
    True if input is a float convertable (a number), False otherwise.
    -
    -
    - -
    -
    -pywindow.utilities.lattice_array_to_unit_cell(lattice_array)[source]
    -

    Return crystallographic param. from unit cell lattice matrix.

    -
    - -
    -
    -pywindow.utilities.max_dim(elements, coordinates)[source]
    -

    Return the maximum diameter of a molecule.

    -
    -
    elements : numpy.ndarray
    -
    An array of all elements (type: str) in a molecule.
    -
    coordinates : numpy.ndarray
    -
    An array containing molecule’s coordinates.
    -
    -
    - -
    -
    -pywindow.utilities.molecular_weight(elements)[source]
    -

    Return molecular weight of a molecule.

    -
    -
    elements : numpy.ndarray
    -
    An array of all elements (type: str) in a molecule.
    -
    -
    -
    numpy.float64
    -
    A molecular weight of a molecule.
    -
    -
    - -
    -
    -pywindow.utilities.normal_vector(origin, vectors)[source]
    -

    Return normal vector for two vectors with same origin.

    -
    - -
    -
    -pywindow.utilities.normalize_vector(vector)[source]
    -

    Normalize a vector.

    -

    A new vector is returned, the original vector is not modified.

    -
    -
    vector : np.array
    -
    The vector to be normalized.
    -
    -
    -
    np.array
    -
    The normalized vector.
    -
    -
    - -
    -
    -pywindow.utilities.opls_notation(atom_key)[source]
    -

    Return element for OPLS forcefield atom key.

    -
    - -
    -
    -pywindow.utilities.opt_pore_diameter(elements, coordinates, bounds=None, com=None, **kwargs)[source]
    -

    Return optimised pore diameter and it’s COM.

    -
    - -
    -
    -pywindow.utilities.optimise_xy(xy, *args)[source]
    -

    Return negative pore diameter for x and y coordinates optimisation.

    -
    - -
    -
    -pywindow.utilities.optimise_z(z, *args)[source]
    -

    Return pore diameter for coordinates optimisation in z direction.

    -
    - -
    -
    -pywindow.utilities.pore_diameter(elements, coordinates, com=None)[source]
    -

    Return pore diameter of a molecule.

    -
    - -
    -
    -pywindow.utilities.principal_axes(elements, coordinates)[source]
    -
    - -
    -
    -pywindow.utilities.relative_shape_anisotropy(S)[source]
    -
    - -
    -
    -pywindow.utilities.rotation_matrix_arbitrary_axis(angle, axis)[source]
    -

    Return a rotation matrix of angle radians about axis.

    -
    -
    angle : int or float
    -
    The size of the rotation in radians.
    -
    axis : numpy.array
    -
    A 3 element aray which represents a vector. The vector is the -axis about which the rotation is carried out.
    -
    -
    -
    numpy.array
    -
    A 3x3 array representing a rotation matrix.
    -
    -
    - -
    -
    -pywindow.utilities.shift_com(elements, coordinates, com_adjust=array([0., 0., 0.]))[source]
    -

    Return coordinates translated by some vector.

    -
    -
    elements : numpy.ndarray
    -
    An array of all elements (type: str) in a molecule.
    -
    coordinates : numpy.ndarray
    -
    An array containing molecule’s coordinates.
    -
    -

    com_adjust : numpy.ndarray (default = [0, 0, 0])

    -
    -
    numpy.ndarray
    -
    Translated array of molecule’s coordinates.
    -
    -
    - -
    -
    -pywindow.utilities.sphere_volume(sphere_radius)[source]
    -

    Return volume of a sphere.

    -
    - -
    -
    -pywindow.utilities.to_list(obj)[source]
    -
    - -
    -
    -pywindow.utilities.unique(input_list)[source]
    -

    Return a list of unique items (similar to set functionality).

    -
    -
    input_list : list
    -
    A list containg some items that can occur more than once.
    -
    -
    -
    list
    -
    A list with only unique occurances of an item.
    -
    -
    - -
    -
    -pywindow.utilities.unit_cell_to_lattice_array(cryst)[source]
    -

    Return parallelpiped unit cell lattice matrix.

    -
    - -
    -
    -pywindow.utilities.vector_analysis(vector, coordinates, elements_vdw, increment=1.0)[source]
    -

    Analyse a sampling vector’s path for window analysis purpose.

    -
    - -
    -
    -pywindow.utilities.vector_analysis_pore_shape(vector, coordinates, elements_vdw)[source]
    -
    - -
    -
    -pywindow.utilities.vector_analysis_reversed(vector, coordinates, elements_vdw)[source]
    -
    - -
    -
    -pywindow.utilities.vector_preanalysis(vector, coordinates, elements_vdw, increment=1.0)[source]
    -
    - -
    -
    -pywindow.utilities.volume_from_cell_parameters(cryst)[source]
    -

    Return unit cell’s volume from crystallographic parameters.

    -
    - -
    -
    -pywindow.utilities.volume_from_lattice_array(lattice_array)[source]
    -

    Return unit cell’s volume from lattice matrix.

    -
    - -
    -
    -pywindow.utilities.window_analysis(window, elements, coordinates, elements_vdw, increment2=0.1, z_bounds=[None, None], lb_z=True, z_second_mini=False, **kwargs)[source]
    -

    Return window diameter and window’s centre.

    -

    widnow: list

    -

    elements: numpy.array

    -

    coordinates: numpy.array

    -

    elements_vdw: numpy.array

    -

    step: float

    -
    - -
    -
    -pywindow.utilities.window_shape(window, elements, coordinates, increment2=0.1, z_bounds=[None, None], lb_z=True, z_second_mini=False, **kwargs)[source]
    -

    Return window diameter and window’s centre.

    -

    widnow: list

    -

    elements: numpy.array

    -

    coordinates: numpy.array

    -

    elements_vdw: numpy.array

    -

    step: float

    -
    - -
    -
    - - -
    - -
    -
    - - -
    - -
    -

    - © Copyright 2018, Marcin Miklitz. - -

    -
    - Built with Sphinx using a theme provided by Read the Docs. - -
    - -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/search.html b/docs/search.html index 5de243c..d3d68dd 100644 --- a/docs/search.html +++ b/docs/search.html @@ -162,7 +162,7 @@

    - © Copyright 2018, Marcin Miklitz. + © Copyright 2017, Marcin Miklitz, Jelfs Materials Group.

    @@ -195,7 +195,6 @@ - diff --git a/docs/searchindex.js b/docs/searchindex.js index 44a0fec..80fb1e8 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","modules","pywindow","pywindow.io_tools","pywindow.molecular","pywindow.tables","pywindow.trajectory","pywindow.utilities"],envversion:53,filenames:["index.rst","modules.rst","pywindow.rst","pywindow.io_tools.rst","pywindow.molecular.rst","pywindow.tables.rst","pywindow.trajectory.rst","pywindow.utilities.rst"],objects:{"":{pywindow:[2,0,0,"-"]},"pywindow.io_tools":{Input:[3,1,1,""],Output:[3,1,1,""]},"pywindow.io_tools.Input":{load_file:[3,2,1,""],load_rdkit_mol:[3,2,1,""]},"pywindow.io_tools.Output":{dump2file:[3,2,1,""],dump2json:[3,2,1,""]},"pywindow.molecular":{MolecularSystem:[4,1,1,""],Molecule:[4,1,1,""]},"pywindow.molecular.MolecularSystem":{decipher_atom_keys:[4,2,1,""],dump_system:[4,2,1,""],dump_system_json:[4,2,1,""],load_file:[4,3,1,""],load_rdkit_mol:[4,3,1,""],load_system:[4,3,1,""],make_modular:[4,2,1,""],rebuild_system:[4,2,1,""],swap_atom_keys:[4,2,1,""],system_to_molecule:[4,2,1,""]},"pywindow.molecular.Molecule":{calculate_average_diameter:[4,2,1,""],calculate_centre_of_mass:[4,2,1,""],calculate_maximum_diameter:[4,2,1,""],calculate_pore_diameter:[4,2,1,""],calculate_pore_diameter_opt:[4,2,1,""],calculate_pore_volume:[4,2,1,""],calculate_pore_volume_opt:[4,2,1,""],calculate_windows:[4,2,1,""],dump_molecule:[4,2,1,""],dump_properties_json:[4,2,1,""],full_analysis:[4,2,1,""],molecular_weight:[4,2,1,""],shift_to_origin:[4,2,1,""]},"pywindow.trajectory":{DLPOLY:[6,1,1,""],PDB:[6,1,1,""],XYZ:[6,1,1,""],make_supercell:[6,4,1,""]},"pywindow.trajectory.DLPOLY":{analysis:[6,2,1,""],get_frames:[6,2,1,""],save_analysis:[6,2,1,""],save_frames:[6,2,1,""]},"pywindow.trajectory.PDB":{analysis:[6,2,1,""],get_frames:[6,2,1,""],save_analysis:[6,2,1,""]},"pywindow.trajectory.XYZ":{analysis:[6,2,1,""],get_frames:[6,2,1,""],save_analysis:[6,2,1,""]},"pywindow.utilities":{acylidricity:[7,4,1,""],align_principal_ax:[7,4,1,""],angle_between_vectors:[7,4,1,""],asphericity:[7,4,1,""],calc_acylidricity:[7,4,1,""],calc_asphericity:[7,4,1,""],calc_relative_shape_anisotropy:[7,4,1,""],calculate_pore_shape:[7,4,1,""],calculate_window_diameter:[7,4,1,""],cart2frac_all:[7,4,1,""],cartisian_from_fractional:[7,4,1,""],center_of_coor:[7,4,1,""],center_of_mass:[7,4,1,""],circumcircle:[7,4,1,""],circumcircle_window:[7,4,1,""],compose_atom_list:[7,4,1,""],correct_pore_diameter:[7,4,1,""],create_supercell:[7,4,1,""],decipher_atom_key:[7,4,1,""],decompose_atom_list:[7,4,1,""],discrete_molecules:[7,4,1,""],distance:[7,4,1,""],dlf_notation:[7,4,1,""],find_average_diameter:[7,4,1,""],find_windows:[7,4,1,""],find_windows_new:[7,4,1,""],frac2cart_all:[7,4,1,""],fractional_from_cartesian:[7,4,1,""],get_gyration_tensor:[7,4,1,""],get_inertia_tensor:[7,4,1,""],get_tensor_eigenvalues:[7,4,1,""],get_window_com:[7,4,1,""],is_inside_polyhedron:[7,4,1,""],is_number:[7,4,1,""],lattice_array_to_unit_cell:[7,4,1,""],max_dim:[7,4,1,""],molecular_weight:[7,4,1,""],normal_vector:[7,4,1,""],normalize_vector:[7,4,1,""],opls_notation:[7,4,1,""],opt_pore_diameter:[7,4,1,""],optimise_xy:[7,4,1,""],optimise_z:[7,4,1,""],pore_diameter:[7,4,1,""],principal_axes:[7,4,1,""],relative_shape_anisotropy:[7,4,1,""],rotation_matrix_arbitrary_axis:[7,4,1,""],shift_com:[7,4,1,""],sphere_volume:[7,4,1,""],to_list:[7,4,1,""],unique:[7,4,1,""],unit_cell_to_lattice_array:[7,4,1,""],vector_analysis:[7,4,1,""],vector_analysis_pore_shape:[7,4,1,""],vector_analysis_reversed:[7,4,1,""],vector_preanalysis:[7,4,1,""],volume_from_cell_parameters:[7,4,1,""],volume_from_lattice_array:[7,4,1,""],window_analysis:[7,4,1,""],window_shape:[7,4,1,""]},pywindow:{io_tools:[3,0,0,"-"],molecular:[4,0,0,"-"],tables:[5,0,0,"-"],trajectory:[6,0,0,"-"],utilities:[7,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","classmethod","Python class method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:classmethod","4":"py:function"},terms:{"20system":7,"20transform":7,"3x3":7,"case":4,"class":[3,4,6],"default":[3,4,7],"float":[4,7],"function":[3,4,5,7],"import":[0,4],"int":[4,7],"new":[3,4,7],"return":[3,4,7],"true":[3,4,7],"void":4,Added:5,EPS:7,For:[0,4],Not:7,The:[3,4,7],Uses:3,Using:[0,4],_functionerror:7,_ncpu:6,_shape:4,about:[4,7],access:5,acylidr:7,acylindr:7,adjust:[4,7],after:4,aka:5,align_principal_ax:7,all:[4,6,7],allow:[0,4],also:[4,7],analys:[4,7],analysi:[0,3,4,6,7],angl:7,angle_between_vector:7,angstrom:7,ani:[3,4,7],anisotropi:7,anoth:[0,4],applic:7,appropri:[4,7],approxim:4,arai:7,arg:7,argument:4,arrai:[4,7],aspher:7,assembl:4,atom:[0,4,5,7],atom_id:[3,4,7],atom_id_1:3,atom_id_2:3,atom_kei:7,atom_list:7,atom_set:7,averag:[4,7],axi:7,back:7,base:[3,4,6],belong:7,better:[4,7],between:7,blake:5,bond:7,bool:[3,4,7],bound:7,boundari:0,build:7,calc_acylidr:7,calc_aspher:7,calc_relative_shape_anisotropi:7,calcul:[4,5,7],calculate_average_diamet:4,calculate_centre_of_mass:4,calculate_maximum_diamet:4,calculate_pore_diamet:4,calculate_pore_diameter_opt:4,calculate_pore_shap:7,calculate_pore_volum:4,calculate_pore_volume_opt:4,calculate_window:4,calculate_window_diamet:7,cam:5,can:[0,4,7],carri:7,cart2frac_al:7,cartesian:[4,7],cartisian_from_fract:7,caten:4,caviti:4,ccdc:5,ccdcresourc:5,cell:7,center:7,center_of_coor:7,center_of_mass:7,centr:[4,7],chang:7,check:7,chem:[0,3,4],chemic:[4,5],circular:4,circumcircl:7,circumcircle_window:7,classmethod:4,coincid:4,com:[0,4,7],com_adjust:7,compos:4,compose_atom_list:7,comput:5,condit:4,condition:4,consid:7,conta:[4,7],contain:[3,4,5,7],content:[1,4],convers:7,convert:7,coordin:[3,4,7],correct:7,correct_pore_diamet:7,correspond:4,coval:[5,7],cpu:4,creat:[4,7],create_supercel:7,creation:7,criteria:4,cryst:7,crystallograph:7,cse:5,current:4,custom:0,daresburi:5,data:[0,3,4,5,7],date:[0,5],dbscan:7,deciph:[0,4,7],decipher_atom_kei:[0,4,7],decompos:[3,7],decompose_atom_list:7,defin:4,defualt:4,depend:7,der:[5,7],descript:4,descriptor:[5,7],determin:7,develop:5,diamens:4,diamet:[4,7],dict:[3,4],dict_:4,dict_kei:4,dictionari:[0,3,4],dimens:4,direct:7,directli:4,discreet:7,discret:4,discrete_molecul:7,distanc:7,dl_f:[4,7],dl_field:5,dl_poli:5,dlf:4,dlf_notat:7,dlpoli:6,docstr:7,done:7,dummi:5,dump2fil:[3,4],dump2json:[3,4],dump:[3,4],dump_molecul:4,dump_properties_json:4,dump_system:4,dump_system_json:4,dynam:[4,6],each:[3,4,7],element:[3,4,7],elemental_radii:[5,7],elements_vdw:7,engin:5,entiti:4,equal:5,equival:4,equval:7,esenti:4,especi:4,essenti:7,estim:7,exampl:[3,4],except:7,exchang:4,exclud:7,explain:7,express:4,extens:3,extract:[3,4],fals:[3,4,6,7],featur:[3,4],field:[0,4,5],file:[0,3,4],filenam:4,filepath:[3,4,6],filetyp:6,find:4,find_average_diamet:7,find_window:[4,7],find_windows_new:7,finit:4,first:[4,7],fit:7,fix:7,float64:7,follow:0,forc:[0,4,5],forcefield:[4,7],forcfield:7,format:4,formula:7,found:4,frac2cart_al:7,frac_coordin:7,fraction:7,fractional_from_cartesian:7,frame:[4,6],from:[0,3,4,7],frontfront:4,frontier:5,full:[3,4],full_analysi:4,gener:[0,5,7],geometr:7,get:4,get_fram:6,get_gyration_tensor:7,get_inertia_tensor:7,get_tensor_eigenvalu:7,get_window_com:7,github:0,gyrat:7,have:7,head:0,here:4,how:7,howev:4,htm:7,http:[0,5,7],idea:7,ids:[0,4,7],implement:4,includ:7,include_com:4,increas:7,increment2:7,increment:7,index:0,individu:7,individuum:4,inertia:7,inf:4,inform:[3,4],inherit:4,initi:7,initial_com:7,initialis:4,input:[3,4,7],input_list:7,inspir:7,instanc:4,instead:4,intend:[6,7],interact:4,interconnect:4,intersect:7,intrins:4,invari:7,invok:4,io_tool:[1,2,4],is_inside_polyhedron:7,is_numb:7,item:7,itself:4,jelfsmaterialsgroup:0,json:[3,4],jul:5,kei:[3,4,7],keyword:4,known:7,kwarg:[3,4,6,7],laboratori:5,lattic:7,lattice_arrai:7,lattice_array_to_unit_cel:7,lb_z:7,librari:0,line:[3,7],list:[1,2,3,4,5],load:[3,4],load_fil:[0,3,4],load_rdkit_mol:[0,3,4],load_system:[0,4],loader:4,locali:4,log:[1,2],look:7,main:4,make_modular:4,make_supercel:6,marcinmiklitz:0,mass:[4,5,7],match:4,math:7,matrix:[6,7],max_dim:7,maximum:[4,7],mayb:7,meant:4,measur:4,method:[0,4],model:[4,5],modifi:[4,7],modul:[0,1],modular:4,mol2:0,mol:[3,4],mol_id:4,mol_siz:7,molecul:[0,3,4,7],molecular:[0,1,2,3,5,6,7],molecular_weight:[4,7],molecularsystem:[0,4],molecule_id:4,moleculesystem:[0,4],molfrommol2fil:0,molsi:0,molsys2:0,moment:7,mongodb:7,more:7,most:[0,4],name:4,natur:4,ncpu:[4,6],ndarrai:7,need:7,neg:7,nest:7,no_of_atom:4,none:[4,6,7],nonetyp:4,normal:7,normal_vector:7,normalize_vector:7,notat:[4,7],note:5,now:7,number:[4,7],numpi:[4,7],obj:[3,7],object:[0,3,4,6,7],occur:7,oct:5,old:7,onc:7,one:[3,4,7],onli:[4,7],open:3,oper:4,opl:[0,4,7],opls2005:4,opls3:4,opls_not:7,oplsaa:4,opt_pore_diamet:7,optimis:[4,7],optimise_xi:7,optimise_z:7,option:[4,7],org:7,origin:[4,7],other:[4,7],otherwis:7,our:0,out:7,output:[3,4],over:3,overlai:4,overrid:[3,4,6],p38:5,packag:[1,4],page:0,parallelis:4,parallelpip:7,param:7,paramet:7,parent_system:4,part:4,pass:[4,7],path:[3,7],pdb:[3,4,6],perform:4,period:[0,4,7],point:7,polyhedron:7,popul:4,pore:[0,4,7],pore_diamet:7,pore_opt:7,posit:7,pre:4,principal_ax:7,process:[3,4,7],properti:4,pudx:0,purpos:[4,5,7],python:[0,4],pywindowfunct:7,quick:0,radian:7,radii:7,radiu:[5,7],rais:7,rang:7,rather:7,rcov:7,rdchem:[3,4],rdkit:[0,3,4],rdkit_mol:0,readabl:3,realtiv:7,rebuild:[0,4,7],rebuild_molsi:0,rebuild_system:[0,4],recogn:4,refin:4,rel:3,relat:7,relative_shape_anisotropi:7,releas:0,remain:7,repres:7,requir:[0,4,5],resourc:5,resourcefilelist:5,result:4,retriev:4,revers:7,rotat:7,rotation_matrix_arbitrary_axi:7,run:4,ruppweb:7,same:7,sampl:7,save:3,save_analysi:6,save_fram:6,scienc:5,search:0,second:7,see:[0,4,7],sensit:4,separ:7,serial:4,set:7,shape:[5,7],share:7,shift:[4,7],shift_com:7,shift_to_origin:4,should:[4,7],similar:7,similarli:4,simul:4,singl:4,size:7,some:7,some_forcefield:0,sort:[3,7],sourc:[3,4,5,6,7],space:3,spacer:3,special:7,specifi:7,sphere:7,sphere_radiu:7,sphere_volum:7,split:3,spreadsheet:7,stabl:0,stand:4,start:[0,4],step:[4,7],stfc:5,stor:4,store:[3,4],str:[3,4,7],string:[3,4,7],structur:[0,4],submodul:1,supercel:[6,7],support:[0,4,5,7],swap:4,swap_atom_kei:[0,4],swap_dict:4,system:[0,4,6,7],system_id:4,system_nam:4,system_to_molecul:4,tabl:[1,2,4,7],take:4,tensor:7,than:7,thei:7,them:[4,7],therefor:[4,7],thi:[3,4,5,7],through:[0,4],to_list:7,tol:7,tolarenac:7,tool:[0,5],toupl:7,trajectori:[1,2,4],translat:7,triclin:7,tutori:7,two:[4,7],type:[3,4,7],uniqu:7,unit:7,unit_cell_to_lattice_arrai:7,updat:[3,4],use:[0,5,7],used:[3,4,7],user:[4,7],uses:7,using:[3,4,7],util:[1,2,4],v3000:4,valid:[4,7],valu:[4,7],van:[5,7],vari:3,vector:7,vector_analysi:7,vector_analysis_pore_shap:7,vector_analysis_revers:7,vector_preanalysi:7,version:7,vestor:7,volum:[4,7],volume_from_cell_paramet:7,volume_from_lattice_arrai:7,waal:[5,7],wai:7,weight:[4,7],were:4,what:7,when:[4,7],where:7,which:[4,7],whole:4,widnow:7,window:[4,7],window_analysi:7,window_shap:7,within:7,work:7,wrong:7,www:[5,7],xlsx:5,xrai:7,xyz:[0,3,4,6],yong:[4,5],z_bound:7,z_second_mini:7},titles:["Welcome to pywindow\u2019s documentation!","pywindow","pywindow package","pywindow.io_tools module","pywindow.molecular module","pywindow.tables module","pywindow.trajectory module","pywindow.utilities module"],titleterms:{content:2,document:0,exampl:0,indic:0,input:0,io_tool:3,list:7,load:0,log:7,modul:[2,3,4,5,6,7],molecular:4,overview:0,packag:2,pre:0,process:0,pywindow:[0,1,2,3,4,5,6,7],submodul:2,tabl:[0,5],test:0,trajectori:6,util:7,welcom:0}}) \ No newline at end of file +Search.setIndex({docnames:["index","modules","pywindow"],envversion:53,filenames:["index.rst","modules.rst","pywindow.rst"],objects:{"":{pywindow:[2,0,0,"-"]},"pywindow.io_tools":{Input:[2,1,1,""],Output:[2,1,1,""]},"pywindow.io_tools.Input":{load_file:[2,2,1,""],load_rdkit_mol:[2,2,1,""]},"pywindow.io_tools.Output":{dump2file:[2,2,1,""],dump2json:[2,2,1,""]},"pywindow.molecular":{MolecularSystem:[2,1,1,""],Molecule:[2,1,1,""]},"pywindow.molecular.MolecularSystem":{decipher_atom_keys:[2,2,1,""],dump_system:[2,2,1,""],dump_system_json:[2,2,1,""],load_file:[2,3,1,""],load_rdkit_mol:[2,3,1,""],load_system:[2,3,1,""],make_modular:[2,2,1,""],molecules:[2,4,1,""],rebuild_system:[2,2,1,""],swap_atom_keys:[2,2,1,""],system:[2,4,1,""],system_id:[2,4,1,""],system_to_molecule:[2,2,1,""]},"pywindow.molecular.Molecule":{atom_ids:[2,4,1,""],calculate_average_diameter:[2,2,1,""],calculate_centre_of_mass:[2,2,1,""],calculate_maximum_diameter:[2,2,1,""],calculate_pore_diameter:[2,2,1,""],calculate_pore_diameter_opt:[2,2,1,""],calculate_pore_volume:[2,2,1,""],calculate_pore_volume_opt:[2,2,1,""],calculate_windows:[2,2,1,""],coordinates:[2,4,1,""],dump_molecule:[2,2,1,""],dump_properties_json:[2,2,1,""],elements:[2,4,1,""],full_analysis:[2,2,1,""],mol:[2,4,1,""],molecular_weight:[2,2,1,""],molecule_id:[2,4,1,""],no_of_atoms:[2,4,1,""],parent_system:[2,4,1,""],properties:[2,4,1,""],shift_to_origin:[2,2,1,""]},"pywindow.trajectory":{DLPOLY:[2,1,1,""],PDB:[2,1,1,""],XYZ:[2,1,1,""],make_supercell:[2,5,1,""]},"pywindow.trajectory.DLPOLY":{analysis:[2,2,1,""],get_frames:[2,2,1,""],save_analysis:[2,2,1,""],save_frames:[2,2,1,""]},"pywindow.trajectory.PDB":{analysis:[2,2,1,""],get_frames:[2,2,1,""],save_analysis:[2,2,1,""]},"pywindow.trajectory.XYZ":{analysis:[2,2,1,""],get_frames:[2,2,1,""],save_analysis:[2,2,1,""]},"pywindow.utilities":{acylidricity:[2,5,1,""],align_principal_ax:[2,5,1,""],angle_between_vectors:[2,5,1,""],asphericity:[2,5,1,""],calc_acylidricity:[2,5,1,""],calc_asphericity:[2,5,1,""],calc_relative_shape_anisotropy:[2,5,1,""],calculate_pore_shape:[2,5,1,""],calculate_window_diameter:[2,5,1,""],cart2frac_all:[2,5,1,""],cartisian_from_fractional:[2,5,1,""],center_of_coor:[2,5,1,""],center_of_mass:[2,5,1,""],circumcircle:[2,5,1,""],circumcircle_window:[2,5,1,""],compose_atom_list:[2,5,1,""],correct_pore_diameter:[2,5,1,""],create_supercell:[2,5,1,""],decipher_atom_key:[2,5,1,""],decompose_atom_list:[2,5,1,""],discrete_molecules:[2,5,1,""],distance:[2,5,1,""],dlf_notation:[2,5,1,""],find_average_diameter:[2,5,1,""],find_windows:[2,5,1,""],find_windows_new:[2,5,1,""],frac2cart_all:[2,5,1,""],fractional_from_cartesian:[2,5,1,""],get_gyration_tensor:[2,5,1,""],get_inertia_tensor:[2,5,1,""],get_tensor_eigenvalues:[2,5,1,""],get_window_com:[2,5,1,""],is_inside_polyhedron:[2,5,1,""],is_number:[2,5,1,""],lattice_array_to_unit_cell:[2,5,1,""],max_dim:[2,5,1,""],molecular_weight:[2,5,1,""],normal_vector:[2,5,1,""],normalize_vector:[2,5,1,""],opls_notation:[2,5,1,""],opt_pore_diameter:[2,5,1,""],optimise_xy:[2,5,1,""],optimise_z:[2,5,1,""],pore_diameter:[2,5,1,""],principal_axes:[2,5,1,""],relative_shape_anisotropy:[2,5,1,""],rotation_matrix_arbitrary_axis:[2,5,1,""],shift_com:[2,5,1,""],sphere_volume:[2,5,1,""],to_list:[2,5,1,""],unique:[2,5,1,""],unit_cell_to_lattice_array:[2,5,1,""],vector_analysis:[2,5,1,""],vector_analysis_pore_shape:[2,5,1,""],vector_analysis_reversed:[2,5,1,""],vector_preanalysis:[2,5,1,""],volume_from_cell_parameters:[2,5,1,""],volume_from_lattice_array:[2,5,1,""],window_analysis:[2,5,1,""],window_shape:[2,5,1,""]},pywindow:{io_tools:[2,0,0,"-"],molecular:[2,0,0,"-"],tables:[2,0,0,"-"],trajectory:[2,0,0,"-"],utilities:[2,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","classmethod","Python class method"],"4":["py","attribute","Python attribute"],"5":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:classmethod","4":"py:attribute","5":"py:function"},terms:{"20system":2,"20transform":2,"3x3":2,"case":2,"class":2,"default":2,"float":2,"function":2,"import":[0,2],"int":2,"new":2,"return":2,"true":2,"void":2,Added:2,EPS:2,For:[0,2],Not:2,The:2,Uses:2,Using:[0,2],_functionerror:2,_ncpu:2,_shape:2,about:2,access:2,acylidr:2,acylindr:2,adjust:2,after:2,aka:2,align_principal_ax:2,all:2,allow:[0,2],also:2,analys:2,analysi:[0,2],angl:2,angle_between_vector:2,angstrom:2,ani:2,anisotropi:2,anoth:[0,2],applic:2,appropri:2,approxim:2,arai:2,arg:2,argument:2,arrai:2,aspher:2,assembl:2,atom:[0,2],atom_id:2,atom_id_1:2,atom_id_2:2,atom_kei:2,atom_list:2,atom_set:2,averag:2,axi:2,back:2,base:2,belong:2,better:2,between:2,blake:2,bond:2,bool:2,bound:2,boundari:0,build:2,calc_acylidr:2,calc_aspher:2,calc_relative_shape_anisotropi:2,calcul:2,calculate_average_diamet:2,calculate_centre_of_mass:2,calculate_maximum_diamet:2,calculate_pore_diamet:2,calculate_pore_diameter_opt:2,calculate_pore_shap:2,calculate_pore_volum:2,calculate_pore_volume_opt:2,calculate_window:2,calculate_window_diamet:2,cam:2,can:[0,2],carri:2,cart2frac_al:2,cartesian:2,cartisian_from_fract:2,caten:2,caviti:2,ccdc:2,ccdcresourc:2,cell:2,center:2,center_of_coor:2,center_of_mass:2,centr:2,chang:2,check:2,chem:[0,2],chemic:2,circular:2,circumcircl:2,circumcircle_window:2,classmethod:2,coincid:2,com:[0,2],com_adjust:2,compos:2,compose_atom_list:2,comput:2,condit:2,condition:2,consid:2,conta:2,contain:2,content:1,convers:2,convert:2,coordin:2,correct:2,correct_pore_diamet:2,correspond:2,coval:2,cpu:2,creat:2,create_supercel:2,creation:2,criteria:2,cryst:2,crystallograph:2,cse:2,current:2,custom:0,daresburi:2,data:[0,2],date:[0,2],dbscan:2,deciph:[0,2],decipher_atom_kei:[0,2],decompos:2,decompose_atom_list:2,defin:2,defualt:2,depend:2,der:2,descript:2,descriptor:2,determin:2,develop:2,diamens:2,diamet:2,dict:2,dict_:2,dict_kei:2,dictionari:[0,2],dimens:2,direct:2,directli:2,discreet:2,discret:2,discrete_molecul:2,distanc:2,dl_f:2,dl_field:2,dl_poli:2,dlf:2,dlf_notat:2,dlpoli:2,docstr:2,done:2,dummi:2,dump2fil:2,dump2json:2,dump:2,dump_molecul:2,dump_properties_json:2,dump_system:2,dump_system_json:2,dynam:2,each:2,element:2,elemental_radii:2,elements_vdw:2,engin:2,entiti:2,equal:2,equival:2,equval:2,esenti:2,especi:2,essenti:2,estim:2,exampl:2,except:2,exchang:2,exclud:2,explain:2,express:2,extens:2,extract:2,fals:2,featur:2,field:[0,2],file:[0,2],filenam:2,filepath:2,filetyp:2,find:2,find_average_diamet:2,find_window:2,find_windows_new:2,finit:2,first:2,fit:2,fix:2,float64:2,follow:0,forc:[0,2],forcefield:2,forcfield:2,format:2,formula:2,found:2,frac2cart_al:2,frac_coordin:2,fraction:2,fractional_from_cartesian:2,frame:2,from:[0,2],frontfront:2,frontier:2,full:2,full_analysi:2,gener:[0,2],geometr:2,get:2,get_fram:2,get_gyration_tensor:2,get_inertia_tensor:2,get_tensor_eigenvalu:2,get_window_com:2,github:0,gyrat:2,have:2,head:0,here:2,how:2,howev:2,htm:2,http:[0,2],idea:2,ids:[0,2],implement:2,includ:2,include_com:2,increas:2,increment2:2,increment:2,index:0,individu:2,individuum:2,inertia:2,inf:2,inform:2,inherit:2,initi:2,initial_com:2,initialis:2,input:2,input_list:2,inspir:2,instanc:2,instead:2,intend:2,interact:2,interconnect:2,intersect:2,intrins:2,invari:2,invok:2,io_tool:1,is_inside_polyhedron:2,is_numb:2,item:2,itself:2,jelfsmaterialsgroup:0,json:2,jul:2,kei:2,keyword:2,known:2,kwarg:2,laboratori:2,lattic:2,lattice_arrai:2,lattice_array_to_unit_cel:2,lb_z:2,librari:0,line:2,list:1,load:2,load_fil:[0,2],load_rdkit_mol:[0,2],load_system:[0,2],loader:2,locali:2,log:1,look:2,main:2,make_modular:2,make_supercel:2,marcinmiklitz:0,mass:2,match:2,math:2,matrix:2,max_dim:2,maximum:2,mayb:2,meant:2,measur:2,method:[0,2],model:2,modifi:2,modul:[0,1],modular:2,mol2:0,mol:2,mol_id:2,mol_siz:2,molecul:[0,2],molecular:[0,1],molecular_weight:2,molecularsystem:[0,2],molecule_id:2,moleculesystem:[0,2],molfrommol2fil:0,molsi:0,molsys2:0,moment:2,mongodb:2,more:2,most:[0,2],name:2,natur:2,ncpu:2,ndarrai:2,need:2,neg:2,nest:2,no_of_atom:2,none:2,nonetyp:2,normal:2,normal_vector:2,normalize_vector:2,notat:2,note:2,now:2,number:2,numpi:2,obj:2,object:[0,2],occur:2,oct:2,old:2,onc:2,one:2,onli:2,open:2,oper:2,opl:[0,2],opls2005:2,opls3:2,opls_not:2,oplsaa:2,opt_pore_diamet:2,optimis:2,optimise_xi:2,optimise_z:2,option:2,org:2,origin:2,other:2,otherwis:2,our:0,out:2,output:2,over:2,overlai:2,overrid:2,p38:2,packag:1,page:0,parallelis:2,parallelpip:2,param:2,paramet:2,parent_system:2,part:2,pass:2,path:2,pdb:2,perform:2,period:[0,2],point:2,polyhedron:2,popul:2,pore:[0,2],pore_diamet:2,pore_opt:2,posit:2,pre:2,principal_ax:2,process:2,properti:2,pudx:0,purpos:2,python:[0,2],pywindowfunct:2,quick:0,radian:2,radii:2,radiu:2,rais:2,rang:2,rather:2,rcov:2,rdchem:2,rdkit:[0,2],rdkit_mol:0,readabl:2,realtiv:2,rebuild:[0,2],rebuild_molsi:0,rebuild_system:[0,2],recogn:2,refin:2,rel:2,relat:2,relative_shape_anisotropi:2,releas:0,remain:2,repres:2,requir:[0,2],resourc:2,resourcefilelist:2,result:2,retriev:2,revers:2,rotat:2,rotation_matrix_arbitrary_axi:2,run:2,ruppweb:2,same:2,sampl:2,save:2,save_analysi:2,save_fram:2,scienc:2,search:0,second:2,see:[0,2],sensit:2,separ:2,serial:2,set:2,shape:2,share:2,shift:2,shift_com:2,shift_to_origin:2,should:2,similar:2,similarli:2,simul:2,singl:2,size:2,some:2,some_forcefield:0,sort:2,sourc:2,space:2,spacer:2,special:2,specifi:2,sphere:2,sphere_radiu:2,sphere_volum:2,split:2,spreadsheet:2,stabl:0,stand:2,start:[0,2],step:2,stfc:2,stor:2,store:2,str:2,string:2,structur:[0,2],submodul:1,supercel:2,support:[0,2],swap:2,swap_atom_kei:[0,2],swap_dict:2,system:[0,2],system_id:2,system_nam:2,system_to_molecul:2,tabl:1,take:2,tensor:2,than:2,thei:2,them:2,therefor:2,thi:2,through:[0,2],to_list:2,tol:2,tolarenac:2,tool:[0,2],toupl:2,trajectori:1,translat:2,triclin:2,tutori:2,two:2,type:2,uniqu:2,unit:2,unit_cell_to_lattice_arrai:2,updat:2,use:[0,2],used:2,user:2,uses:2,using:2,util:1,v3000:2,valid:2,valu:2,van:2,vari:2,vector:2,vector_analysi:2,vector_analysis_pore_shap:2,vector_analysis_revers:2,vector_preanalysi:2,version:2,vestor:2,volum:2,volume_from_cell_paramet:2,volume_from_lattice_arrai:2,waal:2,wai:2,weight:2,were:2,what:2,when:2,where:2,which:2,whole:2,widnow:2,window:2,window_analysi:2,window_shap:2,within:2,work:2,wrong:2,www:2,xlsx:2,xrai:2,xyz:[0,2],yong:2,z_bound:2,z_second_mini:2},titles:["Welcome to pywindow\u2019s documentation!","pywindow","pywindow package"],titleterms:{content:2,document:0,exampl:0,indic:0,input:0,io_tool:2,list:2,load:0,log:2,modul:2,molecular:2,overview:0,packag:2,pre:0,process:0,pywindow:[0,1,2],submodul:2,tabl:[0,2],test:0,trajectori:2,util:2,welcom:0}}) \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 05dd8de..dfd7187 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,17 +1,12 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# pywindow documentation build configuration file, created by -# sphinx-quickstart on Thu Jul 19 21:16:42 2018. +# Configuration file for the Sphinx documentation builder. # -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -22,7 +17,19 @@ sys.path.insert(0, os.path.abspath('../..')) -# -- General configuration ------------------------------------------------ +# -- Project information ----------------------------------------------------- + +project = 'pywindow' +copyright = '2017, Marcin Miklitz, Jelfs Materials Group' +author = 'Marcin Miklitz' + +# The short X.Y version +version = '' +# The full version, including alpha/beta/rc tags +release = '' + + +# -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # @@ -32,11 +39,11 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', + 'sphinx.ext.imgmath', 'sphinx.ext.viewcode', - 'sphinx.ext.githubpages'] + 'sphinx.ext.githubpages', + 'sphinx.ext.napoleon', + 'sphinx.ext.todo'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -50,20 +57,6 @@ # The master toctree document. master_doc = 'index' -# General information about the project. -project = 'pywindow' -copyright = '2018, Marcin Miklitz' -author = 'Marcin Miklitz' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '' -# The full version, including alpha/beta/rc tags. -release = '' - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -73,17 +66,14 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = [] +# This pattern also affects html_static_path and html_extra_path . +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True - -# -- Options for HTML output ---------------------------------------------- +# -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. @@ -104,26 +94,21 @@ # Custom sidebar templates, must be a dictionary that maps document names # to template names. # -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', - 'donate.html', - ] -} +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} -# -- Options for HTMLHelp output ------------------------------------------ +# -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'pywindowdoc' -# -- Options for LaTeX output --------------------------------------------- +# -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). @@ -152,7 +137,7 @@ ] -# -- Options for manual page output --------------------------------------- +# -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). @@ -162,7 +147,7 @@ ] -# -- Options for Texinfo output ------------------------------------------- +# -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, @@ -174,4 +159,9 @@ ] +# -- Extension configuration ------------------------------------------------- +# -- Options for todo extension ---------------------------------------------- + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True diff --git a/docs/source/pywindow.io_tools.rst b/docs/source/pywindow.io_tools.rst deleted file mode 100644 index f5b6346..0000000 --- a/docs/source/pywindow.io_tools.rst +++ /dev/null @@ -1,7 +0,0 @@ -pywindow\.io\_tools module -========================== - -.. automodule:: pywindow.io_tools - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/pywindow.molecular.rst b/docs/source/pywindow.molecular.rst deleted file mode 100644 index c34545c..0000000 --- a/docs/source/pywindow.molecular.rst +++ /dev/null @@ -1,7 +0,0 @@ -pywindow\.molecular module -========================== - -.. automodule:: pywindow.molecular - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/pywindow.rst b/docs/source/pywindow.rst index 60121a5..880d1d5 100644 --- a/docs/source/pywindow.rst +++ b/docs/source/pywindow.rst @@ -4,13 +4,46 @@ pywindow package Submodules ---------- -.. toctree:: +pywindow.io\_tools module +------------------------- + +.. automodule:: pywindow.io_tools + :members: + :undoc-members: + :show-inheritance: + +pywindow.molecular module +------------------------- + +.. automodule:: pywindow.molecular + :members: + :undoc-members: + :show-inheritance: + +pywindow.tables module +---------------------- + +.. automodule:: pywindow.tables + :members: + :undoc-members: + :show-inheritance: + +pywindow.trajectory module +-------------------------- + +.. automodule:: pywindow.trajectory + :members: + :undoc-members: + :show-inheritance: + +pywindow.utilities module +------------------------- + +.. automodule:: pywindow.utilities + :members: + :undoc-members: + :show-inheritance: - pywindow.io_tools - pywindow.molecular - pywindow.tables - pywindow.trajectory - pywindow.utilities Module contents --------------- diff --git a/docs/source/pywindow.tables.rst b/docs/source/pywindow.tables.rst deleted file mode 100644 index ad01f51..0000000 --- a/docs/source/pywindow.tables.rst +++ /dev/null @@ -1,7 +0,0 @@ -pywindow\.tables module -======================= - -.. automodule:: pywindow.tables - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/pywindow.trajectory.rst b/docs/source/pywindow.trajectory.rst deleted file mode 100644 index e0271aa..0000000 --- a/docs/source/pywindow.trajectory.rst +++ /dev/null @@ -1,7 +0,0 @@ -pywindow\.trajectory module -=========================== - -.. automodule:: pywindow.trajectory - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/pywindow.utilities.rst b/docs/source/pywindow.utilities.rst deleted file mode 100644 index 83d8324..0000000 --- a/docs/source/pywindow.utilities.rst +++ /dev/null @@ -1,7 +0,0 @@ -pywindow\.utilities module -========================== - -.. automodule:: pywindow.utilities - :members: - :undoc-members: - :show-inheritance: