stacker.visualization.display_psf_scatter

stacker.visualization.display_psf_scatter#

display_psf_scatter(csv, plot_outfile='', frame_list={}, **kwargs)[source]#

Alias for visualize_two_residue_movement_scatterplot().

Creates scatterplot of two-residue movement relative to each other.

Takes the data created in residue_movement and visualizes it as a polar coordinate scatterplot similar to the Figure D link in Proposal Feature 4.

Parameters:
csvstr

Filepath to csv file containing data on the movement of two residues relative to each other (r, rho, and theta values). Created in residue_movement.

plot_outfilestr

Filepath of the image file to write to. Format inferred from file extension. png, pdf, ps, eps, and svg supported.

frame_listset, default = {}

Set of frames to use in csv, if empty use all frames.

**kwargsdict, optional

Additional keyword arguments to customize the plot:

  • fontsizeint, default = 10

    Font size for all text elements.

  • fig_widthfloat, default = 5

    Width of the figure in inches.

  • fig_heightfloat, default = 5

    Height of the figure in inches.

  • xaxis_fontsizeint, default = fontsize

    Font size for the theta-axis labels.

  • yaxis_fontsizeint, default = fontsize

    Font size for the rho-axis labels.

Returns:
None

See also

write_bottaro_to_csv

Creates CSV file that is inputted here

Examples

>>> import stacker as st
>>> trajectory_file = 'testing/first10_5JUP_N2_tUAG_aCUA_+1GCU_nowat.mdcrd'
>>> topology_file = 'testing/5JUP_N2_tUAG_aCUA_+1GCU_nowat.prmtop'
>>> pdb_filename = 'testing/script_tests/residue_movement/5JUP_N2_tUAG_aCUA_+1GCU_nowat_mdcrd.pdb'
>>> output_csv_name = "testing/script_tests/residue_movement/tUAG_aCUA_+1GCU_GC_plot.csv"
>>> perspective_residue = 426 # 1-indexed
>>> viewed_residue = 427 # 1-indexed
>>> st.filter_traj_to_pdb(trj_file=trajectory_file, top_file=topology_file, pdb=pdb_filename,
...                        residues={perspective_residue,viewed_residue}, atoms={"C2", "C4", "C6"})
WARNING: Residue Indices are expected to be 1-indexed
Reading trajectory...
Reading topology...
Filtering trajectory...
WARNING: Output filtered traj atom, residue, and chain indices are zero-indexed
WARNING: Output file atom, residue, and chain indices are zero-indexed
Filtered trajectory written to:  testing/script_tests/residue_movement/5JUP_N2_tUAG_aCUA_+1GCU_nowat_mdcrd.pdb
>>> st.write_bottaro_to_csv(pdb_filename, output_csv_name, perspective_residue_num=perspective_residue, viewed_residue_num=viewed_residue)
Output values written to testing/script_tests/residue_movement/tUAG_aCUA_+1GCU_GC_plot.csv
>>> st.visualize_two_residue_movement_scatterplot('testing/script_tests/residue_movement/tUAG_aCUA_+1GCU_GC_plot.csv', 
...                                                 plot_outfile='testing/script_tests/visualization/tUAG_aCUA_+1GCU_GC_plot_10frames_scatter.png')