mmtfPyspark.interactions.interactionCenter module

interactionCenter.py:

InteractionCenter stores information about an atom involved in a molecular interaction.

class InteractionCenter(structure=None, atomIndex=None)[source]

Bases: object

Class that stores information about an atom involved in a molecular interaction.

Attributes

structure (mmtfStructure) structure to be used as interaction center [None]
atomIndex (int) the index of the atom at center [None]

Methods

get_as_object() Returns a list of objects representing this interaction center.
get_atom_name() Gets the atom name
get_chain_name() Gets the chainName.
get_coordinates() Gets the position of the interaction center.
get_element() Gets the case-sensitive element symbol
get_group_name() Gets the names of the group.
get_group_number() Gets the group number for the interaction center.
get_length() Returns the number of data items in an interaction center.
get_normalized_b_factors() Gets the normalized b-factor
get_sequence_position() Gets an index into the one-letter polymer sequence.
get_struct_fields() Returns a schema to create Spark Datasets.
get_type() Gets the type of the group.
set_atom_name(atomName) Sets the atom name
set_chain_name(chainName) Sets the chainName.
set_coordinates(coordinates) Sets the position of the interaction center.
set_element(element) Sets the case-sensitive element symbol
set_group_name(groupName) Sets the names of the group.
set_group_number(groupNumber) Sets the group number for the interaction center.
set_normalized_b_factors(normalizedbFactor) Sets the normalized b-factor
set_sequence_position(sequencePosition) Sets an index into the one-letter polymer sequence.
set_type(gtype) Sets the type of the group.
get_as_object()[source]

Returns a list of objects representing this interaction center. Note, not all data are currently included. This method is ucsed to create Spark datasets.

Returns:list of objects representing this interaction center
get_atom_name()[source]

Gets the atom name

Returns:name of the atom
get_chain_name()[source]

Gets the chainName. This corresponds to the “chain Id” in PDB files.

Returns:the name of the chain
get_coordinates()[source]

Gets the position of the interaction center.

Returns:the position of the interaction center
get_element()[source]

Gets the case-sensitive element symbol

Returns:element symbol
get_group_name()[source]

Gets the names of the group. This name is the chemical component id of this group

Returns:name of group
get_group_number()[source]

Gets the group number for the interaction center. A group number consists of the residue number (e.g. 101) plus an optional insertion code (e.g. A): 101A.

Returns:group number
get_length()[source]

Returns the number of data items in an interaction center. Note, not all data are currently included

Returns:the number of data items in an interaction center
get_normalized_b_factors()[source]

Gets the normalized b-factor

Returns:the normalized b-factor
get_sequence_position()[source]

Gets an index into the one-letter polymer sequence. this index is zero-based. If the interaction center is not a polymer atom, this index is -1

Returns:index into polymer sequence
get_struct_fields()[source]

Returns a schema to create Spark Datasets. This schema must match the order in which the data are return by the getAsObject() method.

Parameters:index (int): an integer to label an interaction center
Returns:schema to represent an interaction center in spark dataset.
get_type()[source]

Gets the type of the group.

Returns:type of group
set_atom_name(atomName)[source]

Sets the atom name

Parameters:atomName (str): name of the atom
set_chain_name(chainName)[source]

Sets the chainName. This corresponds to the “chain Id” in PDB files.

Parameters:chainName (str): the name of the chian
set_coordinates(coordinates)[source]

Sets the position of the interaction center.

Parameters:coordinates (list): the position of the interaction center
set_element(element)[source]

Sets the case-sensitive element symbol

Parameters:element (str): element symbol
set_group_name(groupName)[source]

Sets the names of the group. This name is the chemical component id of this group

Parameters:groupName (str): name of group
set_group_number(groupNumber)[source]

Sets the group number for the interaction center. A group number consists of the residue number (e.g. 101) plus an optional insertion code (e.g. A): 101A.

Parameters:groupNumber (str): group number
set_normalized_b_factors(normalizedbFactor)[source]

Sets the normalized b-factor

Parameters:normalizedbFactor (float) the normalized b-factor
set_sequence_position(sequencePosition)[source]

Sets an index into the one-letter polymer sequence. this index is zero-based. If the interaction center is not a polymer atom, this index is -1

Parameters:sequencePosition (int): index into polymer sequence
set_type(gtype)[source]

Sets the type of the group.

Parameters:gtype (str): type of group