Package src :: Package toplevel :: Module FTSM
[hide private]
[frames] | no frames]

Module FTSM

source code

Classes [hide private]
  SplineInterpolator
Cubic spline interpolator.
Functions [hide private]
list
linspace(xmin, xmax, N)
N-element linear space between xmin and xmax
source code
 
extractPhi(phipsi)
Extract phi values of a string.
source code
 
extractPsi(phipsi)
Extract psi values of a string.
source code
 
setConstraint(angle1, angle2, phi, psi, kappa, forcefield)
Find the harmonic dihedral forces, and set their reference dihedrals
source code
 
switchPhiPsi(S)
Switch phi and psi in the passed string.
source code
float
norm(v3d)
Compute the norm of a 3-element vector.
source code
float
norm2(v3d)
Compute the norm squared of a 3-element vector.
source code
list
circshift(v)
Shift all elements of the passed vector by one.
source code
list
cumsum(v)
Return a vector with each element as the sum of all previous elements.
source code
float
M(phys, alpha, beta)
Returns: Value for M
source code
float
L(z, p)
Helper function for reparameterization.
source code
float
l(z, p)
Helper function for reparameterization.
source code
int
q(z, p)
Helper function for reparameterization.
source code
list
reparam(z)
Reparameterize the string.
source code
Function Details [hide private]

linspace(xmin, xmax, N)

source code 

N-element linear space between xmin and xmax

Parameters:
  • xmin (float) - Lower boundary
  • xmax (float) - Upper boundary
  • N (int) - Number of elements
Returns: list
N-element list of evenly spaced points

extractPhi(phipsi)

source code 

Extract phi values of a string.

Parameters:
  • phipsi (list) - List of [phi, psi]

extractPsi(phipsi)

source code 

Extract psi values of a string.

Parameters:
  • phipsi (list) - List of [phi, psi]

setConstraint(angle1, angle2, phi, psi, kappa, forcefield)

source code 

Find the harmonic dihedral forces, and set their reference dihedrals

Parameters:
  • angle1 (int) - Phi dihedral index.
  • angle2 (int) - Psi dihedral index
  • phi (float) - Reference phi value in radians
  • psi (float) - Reference psi value in radians
  • kappa (float) - Controls restraint strength.
  • forcefield (ForceField) - MDL ForceField object.

switchPhiPsi(S)

source code 

Switch phi and psi in the passed string.

Parameters:
  • S (list) - List of [phi, psi]

norm(v3d)

source code 

Compute the norm of a 3-element vector.

Parameters:
  • v3d (numpy.ndarray) - 3-element vector
Returns: float
The norm

norm2(v3d)

source code 

Compute the norm squared of a 3-element vector.

Parameters:
  • v3d (numpy.ndarray) - 3-element vector
Returns: float
The norm squared

circshift(v)

source code 

Shift all elements of the passed vector by one. Move the last element to the front.

Parameters:
  • v (list) - Vector to shift.
Returns: list
Shifted vector

cumsum(v)

source code 

Return a vector with each element as the sum of all previous elements. Thus if [1 4 5] was passed, [1 5 10] would be returned.

Parameters:
  • v (list) - Vector of elements to sum
Returns: list
List of cumulative sums

M(phys, alpha, beta)

source code 
Parameters:
  • phys (Physical) - The physical system
  • alpha (int) - Index of the first dihedral
  • beta (int) - Index of the second dihedral
Returns: float
Value for M

L(z, p)

source code 

Helper function for reparameterization. Defined in Maragliano and Vanden-Eijnden 2007: L(1) = 0 L(p) = sum(q=2, p) |z_q* - z_(q-1)*|

Parameters:
  • z (list) - The string.
  • p (int) - Image index.
Returns: float
Length of z up to image p.

l(z, p)

source code 

Helper function for reparameterization. Defined in Maragliano and Vanden-Eijnden 2007: l(p) = (p-1)L(R)/(R-1)

Parameters:
  • z (list) - The string.
  • p (int) - Image index.
Returns: float
Mean distance between string images.

q(z, p)

source code 

Helper function for reparameterization. Defined in Maragliano and Vanden-Eijnden 2007: q(p) = 2...R such that L(q(p)-1) < l(p) < L(q(p))

Parameters:
  • z (list) - The string.
  • p (int) - Image index.
Returns: int
Integer between 2 and R, where R is the size of the string.

reparam(z)

source code 

Reparameterize the string. Defined in Maragliano and Vanden-Eijnden 2007.

Parameters:
  • z (list) - The string.
Returns: list
The newly parameterized string.