structure_analysis
– Functions to Analyze Structures¶
Some functions for analyzing structures
Author: Niklaus Johner (Niklaus.Johner@unibas.ch)
- CalculateBestFitLine(sele1)¶
This function calculates the best fit line to the atoms in sele1.
- Parameters:
sele1 (
EntityView
) –- Returns:
- CalculateBestFitPlane(sele1)¶
This function calculates the best fit plane to the atoms in sele1.
- Parameters:
sele1 (
EntityView
) –- Returns:
- CalculateDistanceDifferenceMatrix(sele1, sele2)¶
This function calculates the pairwise distance differences between two selections (
EntityView
). The two selections should have the same number of atoms It returns an NxN DistanceDifferenceMatrix M (where N is the number of atoms in sele1) where M[i,j]=||(sele2.atoms[i].pos-sele2.atoms[j].pos)||-||(sele1.atoms[i].pos-sele1.atoms[j].pos)||- Parameters:
sele1 (
EntityView
) –sele2 (
EntityView
) –
- Returns:
NxN numpy matrix
- CalculateHelixAxis(sele1)¶
This function calculates the best fit cylinder to the CA atoms in sele1, and returns its axis. Residues should be ordered correctly in sele1.
- Parameters:
sele1 (
EntityView
) –- Returns:
- GetAlphaHelixContent(sele1)¶
This function calculates the content of alpha helix in a view. All residues in the view have to ordered and adjacent (no gaps allowed)
- Parameters:
sele1 (
EntityView
) –- Returns:
float
- GetDistanceBetwCenterOfMass(sele1, sele2)¶
This function calculates the distance between the centers of mass of sele1 and sele2, two selections from the same Entity.
- Parameters:
sele1 (
EntityView
) –sele2 (
EntityView
) –
- Returns:
float
- GetFrameFromEntity(eh)¶
This function returns a CoordFrame from an EntityHandle
- Parameters:
eh (
EntityHandle
) –- Returns:
- GetMinDistBetwCenterOfMassAndView(sele1, sele2)¶
This function calculates the minimal distance between sele2 and the center of mass of sele1, two selections from the same Entity.
- Parameters:
sele1 (
EntityView
) – The selection from which the center of mass is takensele2 (
EntityView
) –
- Returns:
distance (
float
)
- GetMinDistanceBetweenViews(sele1, sele2)¶
This function calculates the minimal distance between sele1 and sele2, two selections from the same Entity.
- Parameters:
sele1 (
EntityView
) –sele2 (
EntityView
) –
- Returns:
float