Utilities (pele.utils)#
Helper functions#
rotations#
Functions related to rotations
Most of these were adapted from victor’s rotations.f90. Not all functions from the file have been implemented. Warning, they have not all been tested in this format.
|
multiply 2 quaternions q1, q2 |
|
convert angle axis to quaternion |
|
quaternion to angle axis |
|
quaternion to rotation matrix |
|
convert a rotation matrix to a quaternion |
|
|
|
convert an angle axis rotation to a rotation matrix |
|
uniform random rotation in angle axis formulation |
return a uniformly distributed random angle axis vector |
|
|
change an angle axis vector by a small rotation |
|
change a given angle axis rotation p2 by the rotation p1 |
|
generate a small random rotation |
uniform random unit vector |
|
n-dimensional uniform random unit vector |
|
return a vector sampled uniformly in a hypersphere of dimension k |
|
|
return the inverse of a 3x3 matrix |
benchmarking tool#
|
classdocs |
Coords Adapter#
|
Wrapper to access coordinate array for rigid body systems |
Hessian eigenvalues and eigenvectors#
Tools for manipulating the Hessian. In particular, for finding eigenvalues and eigenvectors
|
return the eigenvalue and eigenvectors of a Hessian (symmetric) |
|
return the eigenvalues of a Hessian (symmetric) |
|
return the sorted eigenvalues and eigenvectors of a Hessian sorted |
|
return the smallest eigenvalue and associated eigenvector of a Hessian |
|
return a sparse form of the hessian using scipy.sparse |
NeighborLists#
classes to build and maintain neighborlists .. currentmodule:: pele.utils.neighbor_list
|
a potential wrapper for multiple potentials |
|
The same as NeighborListSubset except only do the building. |
|
a potential wrapper for a neighbor list, but only rebuild when told to |
|
A wrapper for multiple NeighborListPotentialBuild |
tools for dealing with frozen atoms. Especially in relation to neighbor lists
|
potential wrapper for frozen particles |
|
create the potential object for the kob andersen binary lennard jones with frozeen particles |
Histogram#
Create and print histograms. Especially energy histograms.
|
this class will build 1 dimensional histogram. |
|
.xyz files#
tools for reading from and writing to .xyz files
Disconnectivity Graph#
Wrapper / helper functions for external programs#
- pele.utils.pymolwrapper.draw_box(boxvec, model, frame)[source]#
Draw a box around the system to easily visualise periodic boundaries
- Parameters:
- boxvec: np.array
The dimensions of the periodic box
- pele.utils.pymolwrapper.draw_rigid(coords, model, frame, colour, bondslist=[], radius=0.5)[source]#
Use pymol to draw a system of rigid body fragments
- Parameters:
- colour: 3-tuple
RBG colour for the spheres being drawn.
- bondslist: list of 2-tuples, optional
List of atom pairs between which bonds should be drawn.
- pele.utils.pymolwrapper.draw_spheres(coords, model, frame, radius=0.5, color=[1.0, 0.0, 0.0])[source]#
- class pele.utils.amber.readAmberParam[source]#
Extract info from coords.prmtop
- prmtop:
string with the full coords.prmtop file
- bondConn:
list of 2-ples such that bondConn[i][0] and bondConn[i][1] are the atom numbers of the i-th bond; atom numbers start at 1
TODO: deprecate – use OpenMM parser instead (11 Jan 13)