Pairing

Pairing

Author:

Orion Cohen, Tingzheng Hou, Kara Fong

Year:

2021

Copyright:

GNU Public License v3

Elucidate the composition of the the uncoordinated solvent molecules.

Pairing tracks the fraction of all solvent molecules paired with the solute, as well as the composition of the diluent.

While pairing can be used in isolation, it is meant to be used as an attribute of the Solute class. This makes instantiating it and calculating the solvation data a non-issue.

class solvation_analysis.pairing.Pairing[source]

Calculate the fraction of solutes that are coordinated with each solvent.

The pairing fraction is the fraction of solutes that are coordinated with ANY solvent with matching type. So if the pairing of mol1 is 0.5, then 50% of solutes are coordinated with at least 1 mol1.

The pairing fractions are made available as an mean over the whole simulation and by frame.

Parameters:
  • solvation_data (pandas.DataFrame) – The solvation data frame output by Solute.

  • n_frames (int) – The number of frames in solvation_data.

  • n_solutes (int) – The number of solutes in solvation_data.

  • n_solvents (dict of {str: int}) – The number of each kind of solvent.

Examples

# first define Li, BN, and FEC AtomGroups
>>> solute = Solute(Li, {'BN': BN, 'FEC': FEC, 'PF6': PF6})
>>> solute.run()
>>> solute.pairing.solvent_pairing
{'BN': 1.0, 'FEC': 0.210, 'PF6': 0.120}
__init__(solvation_data, n_frames, n_solutes, n_solvents)[source]
static from_solute(solute)[source]

Generate a Pairing object from a solute.

Parameters:

solute (Solute)

Return type:

Pairing

property solvent_pairing

A dictionary where keys are residue names (str) and values are the fraction of solutes that contain that residue (float).

property pairing_by_frame

A pd.Dataframe tracking the mean fraction of each residue across frames.

property fraction_free_solvents

A dictionary containing the fraction of each solvent that is free. e.g. not coordinated to a solute.

property diluent_composition

The fraction of the diluent constituted by each solvent. The diluent is defined as everything that is not coordinated with the solute.

property diluent_composition_by_frame

A DataFrame of the diluent composition in each frame of the trajectory.

property diluent_counts

A DataFrame of the raw solvent counts in the diluent in each frame of the trajectory.