mmtfPyspark.interactions.atomInteraction module

atomInteraction.py:

AtomInteraction contains interaction information of a central atom with it’s interacting neighbors (coordination sphere). Once this data structure is filled with interaction centers, this class calculates various geometric properties such as distance, angles, and order parameters for the interacting atoms. Finally, it provides methods for creating row-rise representations of the data in Spark Datasets.

class AtomInteraction[source]

Bases: object

Attributes

angles  
distances  
q3  
q4  
q5  
q6  

Methods

add_neighbor(neighbor) Adds a neighbor interaction center.
calc_coordination_geometry(maxInteraction) Calculates geometric properties of the coordination sphere.
get_center() Returns information about the central atom of a coordination sphere
get_interactions() Returns information about the interacting neighbor atoms.
get_multiple_interactions_as_row(maxInteractions) Returns interactions and geometric information in a single row
get_num_interactions() Returns the number of neighboring atoms that interact with the central atom
get_pair_interaction_schema() Returns the schema for a row of pairwise atom interactions.
get_pair_interactions_as_rows() Return rows of pairwise interactions with the central atom
get_schema(maxInteractions) Returns the schema for a row of atom interaction inforamtion.
get_structure_id() Returns the structure identifier
set_center(center) Sets the central atom information of a coordination sphere.
set_structure_id(structureId) Sets the structure identifier
add_neighbor(neighbor)[source]

Adds a neighbor interaction center.

Parameters:

neighbor : InteractionCenter

an interation with the central atom

angles = None
calc_coordination_geometry(maxInteraction)[source]

Calculates geometric properties of the coordination sphere. The geometric properties include orientational order parameters that describe the arrangement of the atoms in the coordination sphere, distances and angles of the neighcor atoms with the cnter atom.

Parameters:

maxInteraction : int

maximum number of interaction

distances = None
get_center()[source]

Returns information about the central atom of a coordination sphere

Returns:

list

centeral atom information

get_interactions()[source]

Returns information about the interacting neighbor atoms.

Returns:

list

interaction centers

get_multiple_interactions_as_row(maxInteractions)[source]

Returns interactions and geometric information in a single row

Returns:

int

row of itneractions and geometric information

get_num_interactions()[source]

Returns the number of neighboring atoms that interact with the central atom

Returns:

int

number of neighboring atoms that interact with the central atom

get_pair_interaction_schema()[source]

Returns the schema for a row of pairwise atom interactions. The schema is used to create a Dataset<Row> from the row information

Returns:

pyspark.sql.types.StructType

schema for dataset

get_pair_interactions_as_rows()[source]

Return rows of pairwise interactions with the central atom

Returns:

list

rows of pairwise interactions with the central atom

get_schema(maxInteractions)[source]

Returns the schema for a row of atom interaction inforamtion. The schema is used to create a Dataset<Row> from the row information.

Parameters:

maxInteraction : int

maximum number of interactions

Returns:

pyspark.sql.types.StructType

schema for dataset

get_structure_id()[source]

Returns the structure identifier

Returns:

str

structure identifier

q3 = None
q4 = None
q5 = None
q6 = None
set_center(center)[source]

Sets the central atom information of a coordination sphere.

Parameters:

center : InteractionCenter

central atom information

set_structure_id(structureId)[source]

Sets the structure identifier

Parameters:

structureId : str

the structure identifier