Previous topic

3. Parser for Structure Instance

Next topic

5. Parser for Density Map Instance

This Page

4. Structure Instance Informations

class ProtRep_Biopy.BioPyAtom(atom)[source]

A class representing an atom, as read from a PDB file using Biopython.

change_init_position()[source]

Change initial position co-ordinates of atom to current position.

copy()[source]

Return a copy of the Atom instance.

dist(atom)[source]

Return distance from another atom.

distance_from_init_position()[source]

Return distance from initial position.

get_id_no()[source]

Get string of atom serial number

get_mass()[source]

Return atom mass.

get_name()[source]

Get string of atom name (ie. ‘CA’ or ‘O’)

get_pos_mass()[source]
get_pos_vector()[source]

Return a Vector instance of the position of the atom.

get_res()[source]

Get string of residue type (ie ‘ARG’)

get_res_no()[source]

Get string of residue number

get_x()[source]

Return x co-ordinate of atom.

get_y()[source]

Return y co-ordinate of atom.

get_z()[source]

Return z co-ordinate of atom.

map_grid_position(densMap)[source]

Return the co-ordinates and density value of the grid point in a density map closest to this atom. Return 0 if atom is outside of map.

matrix_transform(rot_mat)[source]

Transform atom using a 3x3 matrix rot_mat = a 3x3 Python matrix instance.

reset_position()[source]

Put atom back in its initial position.

set_x(mod)[source]

Change x co-ordinate of atom.

set_y(mod)[source]

Change y co-ordinate of atom.

set_z(mod)[source]

Change z co-ordinate of atom.

translate(x, y, z)[source]

Move atom. x, y, z = distance in Angstroms in respective Cartesian directions to move atom.

writeTerm()[source]
write_to_PDB()[source]

Write atom attributes as a line in a PDB file.

class ProtRep_Biopy.BioPy_Residue(res_no, atom_list)[source]

A class representing an Residues, use instead the residues option if Biopy

class ProtRep_Biopy.BioPy_Structure(atomList, filename='Unknown', header='', footer='')[source]

A class representing an Structure, as read from a PDB file using Biopython.

RMSD_from_init_position(CA=False)[source]

Return RMSD of structure from initial position after transltation.

Arguments:
CA
True if only CA atoms are considered False when all atoms are considered.
RMSD_from_same_structure(otherStruct, CA=False)[source]

Return the RMSD between two structure instance.

Arguments:
otherStruct
Structure instance to compare, containing the same atoms as the target instance.
CA
True if only CA atoms are considered False when all atoms are considered.
break_into_segments(rigid_list)[source]

Return a list of Structure instance of the selected segment from the structure:

Arguments:

rigid list

list of rigid body defined as:

[[riA,rfA],..,[riB,rfB]]

where :

riA= starting residues of segment A rfA=final residues of segment A.

build_C_symmetric_model(symm_axis, noOfUnits, x_point, y_point, z_point)[source]
build_C_symmetric_model_around_line(l, c, noOfUnits)[source]
build_C_symmetric_model_using_map(noOfUnits, symm_axis, densMap)[source]
calculate_centre_of_mass()[source]

Return centre of mass of structure as a Vector instance.

change_init_position()[source]

Change initial position of structure to current position.

combine_SSE_structures(structList)[source]

Combine a list of Structure instance in a unique rigid body (as Structure instance).

combine_structures(structList)[source]

Add a list of Structure instance to the structure.

copy()[source]

Return copy of Structure instance.

find_same_atom(atom_index, otherStruct)[source]

Return an Atom instances if exists in compared structure, based on atom index.

get_RB(rigid_list)[source]

Return a Structure instance of the selected rigid body of non consecutively segment from a Structure instance:

Arguments:
rigid list

list of rigid body defined as:

[riA,rfA,..,riB,rfB]

where :

riA= starting residues of segment A rfA=final residues of segment A

so that Rigid body Structure is formed by non consecutively segment.

get_atom(index)[source]

Return specific atom in Structure instance.

get_atom_list()[source]

Return an array containing Atom instances of positions of all atoms as: [(RES 1 A: x,y,z), ... ,(RES2 1 A: x1,y1,z1)].

get_backbone()[source]

Return Structure instance of the backbone atoms in structure.

get_chain(chainID)[source]

Return new Structure instance with only the requested chain.

get_chain_list()[source]

Return list of chain ID in Structure.

get_extreme_values()[source]

Return a 6-ple containing the minimum and maximum x, y and z co-ordinates of the structure. Given in order (min_x, max_x, min_y, max_y, min_z, max_z).

get_pos_mass_list()[source]

Return an array containing Vector instances of positions of all atoms and mass.

get_prot_mass_from_atoms()[source]

Calculates Mass (kDa) of the Structure instance, from average mass. Atoms based use get_prot_mass_from_res is more accurate.

get_prot_mass_from_res(Termini=False)[source]

Calculates Mass (kDa) of the Structure instance, from average mass

get_residue(resNo)[source]

Return specific residue in Structure instance.

get_selection(startRes, finishRes)[source]

Return new Structure instance of the selected residues range without considering residues chain.

get_selection_less_than(endRes)[source]

Return a Structure instance comprising all residues smaller then startRes.

get_selection_more_than(startRes)[source]

Return a Structure instance comprising all residues greater then startRes.

get_torsion_angles()[source]

Return list of torsion angle in Structure instance

get_vector_list()[source]

Return an array containing Vector instances of positions of all atoms.

matrix_transform(matrix)[source]

Transform Structure using a 3x3 matrix

Arguments:

matrix
a 3x3 Python matrix instance.
no_of_chains()[source]
randomise_position(max_trans, max_rot, v_grain=30, rad=False, verbose=False)[source]

Randomise the position of this Structure instance.

Arguments:
max_trans
Maximum translation permitted
max_rot
Maximum rotation permitted (in degree if rad=False)
v_grain
Graning Level for the generation of random vetors (default=30)
rename_chains(chain_list=False)[source]
renumber_atoms()[source]
renumber_residues(startRes=1, missingRes=[])[source]

Renumber the structure starting from startRes. Missing number list to add.

reorder_residues()[source]

Order residues in atom list by residue number. (NOTE: Does not check for chain information - split by chain first).

reset_position()[source]

Move structure back into initial position.

rotate_by_axis_angle(x, y, z, turn, x_trans=0, y_trans=0, z_trans=0, rad=False, com=False)[source]

Rotate this Structure instance around its centre.

Arguments:

turn
angle (in radians if rad == True, else in degrees) to rotate map.
x,y,z
axis to rotate about, ie. x,y,z = 0,0,1 rotates the structure round the xy-plane.
x_trans, y_trans, z_trans
extra translational movement if required.
com
centre of mass around which to rotate the structure. If False, rotates around centre of mass of structure.
rotate_by_euler(x_turn, y_turn, z_turn, x_trans=0, y_trans=0, z_trans=0, rad=False, com=False)[source]

Rotate this Structure instance around its centre.

Arguments:
x_turn,y_turn,z_turn
Euler angles (in radians if rad == True, else in degrees) used to rotate structure, in order XYZ.
x_trans, y_trans, z_trans
extra translational movement if required.
com
centre of mass around which to rotate the structure. If False, rotates around centre of mass of structure.
split_into_chains()[source]
translate(x, y, z)[source]

Translate structure in three Cartesian directions.

Arguments:

x, y, z
distance in Angstroms to move structure in respective direction.
vectorise()[source]
write_to_PDB(filename)[source]

Write Structure instance to PDB file.

Arguments:

filename
output filename.