# moleculekit.projections.metricfluctuation module#

class moleculekit.projections.metricfluctuation.MetricFluctuation(atomsel, refmol=None, trajalnsel='protein and name CA', refalnsel=None, centersel='protein', pbc=True, mode='atom')#

Creates a MetricFluctuation object that calculates the squared fluctuation of atom positions in trajectories.

Depending on the refmol option the projection either returns the fluctuation from the mean position of the atoms, or from coordinates of reference given in refmol. This means it calculates for atom coordinates (x,y,z) and reference coordinates (xr, yr, yz): (xr-x)**2+(yr-y)**2+(zr-z)**2. If groupsel is set to residue it will calculate the mean of this value over all atoms of the residue. To then get the RMSD you need to compute the square root (of the mean) of the results this projection returns over the desired atoms.

Parameters:
• atomsel (str) – Atom selection string for the atoms whose fluctuations we want to calculate. See more here

• refmol (`Molecule` object) – If refmol is None, MetricFluctuation will calculate the fluctuation of the atoms/residues around the trajectory mean. If a refmol is given, it will calculate the fluctuation around the reference atom positions after aligning.

• trajalnsel (str, optional) – Atom selection string for the trajectories from which to align to the reference structure. See more here

• refalnsel (str, optional) – Atom selection string for refmol from which to align to the reference structure. If None, it defaults to the same as trajalnsel. See more here

• centersel (str, optional) – Atom selection string around which to wrap the simulation. See more here

• pbc (bool) – Enable or disable coordinate wrapping based on periodic boundary conditions.

• mode (str) – Set to ‘atom’ to get the fluctuation per atom. Set to ‘residue’ to get the mean fluctuation of the residue by grouping all of its atoms given in atomsel

Returns:

metr

Return type:

MetricFluctuation object

Examples

Calculate the fluctuation of atoms wrt their mean positions >>> MetricFluctuation(‘protein and name CA’).project(mol) Calculate the fluctuation of atoms wrt the reference structure >>> MetricFluctuation(‘protein and name CA’, refmol).project(mol) Calculate the fluctuation of residues wrt their mean positions >>> MetricFluctuation(‘protein’, mode=’residue’).project(mol) Calculate the fluctuation of residues wrt the reference structure >>> MetricFluctuation(‘protein’, refmol, mode=’residue’).project(mol)

getMapping(mol)#

Returns the description of each projected dimension.

Parameters:

mol (`Molecule` object) – A Molecule object which will be used to calculate the descriptions of the projected dimensions.

Returns:

map – A DataFrame containing the descriptions of each dimension

Return type:

`DataFrame` object

project(mol)#

Project molecule.

Parameters:

mol (`Molecule`) – A `Molecule` object to project.

Returns:

data – An array containing the projected data.

Return type:

np.ndarray
{"ft_lang_label":"__label__en","ft_lang_prob":0.6544943,"math_prob":0.9530855,"size":2816,"snap":"2023-14-2023-23","text_gpt3_token_len":653,"char_repetition_ratio":0.16607396,"word_repetition_ratio":0.07948718,"special_character_ratio":0.20348011,"punctuation_ratio":0.116883114,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9549781,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-01T11:26:13Z\",\"WARC-Record-ID\":\"<urn:uuid:b839e699-d0fe-40ad-ac0d-68b30a314a2c>\",\"Content-Length\":\"61626\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:63f7e14c-ecae-43ac-8271-f6471b7e72c1>\",\"WARC-Concurrent-To\":\"<urn:uuid:64f0c1b6-8979-4465-925f-1c15efe6a848>\",\"WARC-IP-Address\":\"34.23.140.61\",\"WARC-Target-URI\":\"https://software.acellera.com/moleculekit/moleculekit.projections.metricfluctuation.html\",\"WARC-Payload-Digest\":\"sha1:7HQOE7IS2W25IRI6SP2M6YAO43YQVK4C\",\"WARC-Block-Digest\":\"sha1:Z3TD4QUM4JSZUC43I2U3BI5GXUUARAD3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224647810.28_warc_CC-MAIN-20230601110845-20230601140845-00452.warc.gz\"}"}