Skip to content

Quickstart Analysis

Antonio Marinho edited this page Sep 30, 2026 · 3 revisions

Quickstart Analysis

This page shows the smallest useful FleXgeo2 workflows: one command-line run and one Python run. Both compute Melodia descriptors, summarize residue-level geometry, and write the default output files.

Command-line run

flexgeo2 path/to/structure.pdb

By default, outputs are written to results/, and the command prints a short summary of the results and where to find them. FleXgeo2 will not write into a folder that already has files; add --overwrite to replace an earlier run.

To choose a different output directory:

flexgeo2 path/to/structure.pdb --output-dir path/to/results

To keep one chain:

flexgeo2 path/to/structure.pdb --chain A

Python run

from flexgeo2 import AnalysisConfig, FlexGeo2App

config = AnalysisConfig(pdb_file="path/to/structure.pdb")
result = FlexGeo2App().run(config)

From Python, results stay in memory unless you ask for files. Write the output folder (the same one the CLI writes) with:

result.save("path/to/results")

Or filter a chain and write the files during the run:

from flexgeo2 import AnalysisConfig, FlexGeo2App, OutputConfig

config = AnalysisConfig(
    pdb_file="path/to/structure.pdb",
    chains=["A"],
    output=OutputConfig(output_dir="path/to/results"),
)

result = FlexGeo2App().run(config)

What comes back

The returned result contains in-memory data frames:

  • result.raw_df: normalized Melodia descriptors for each model, chain, and residue
  • result.residue_summary_df: residue-level curvature, torsion, and dmax summaries
  • result.model_summary_df: per-chain model summaries
  • result.overall_model_summary_df: model summaries across all selected chains
  • result.outputs: paths to files written by FleXgeo2 (empty until files are written)

Default output files

A standard run writes:

  • README.md: what ran, the key results, and a guide to every file (start here)
  • run.json: parameters, package versions and input checksums
  • overview.png: curvature, torsion and dmax along the sequence
  • geometry/descriptors.csv: Melodia descriptors for every model and residue
  • geometry/residues.csv: per-residue statistics, including dmax
  • geometry/models.csv: per-model summary

For multi-model PDB files, the overview shows the ensemble mean and standard deviation, and overlays individual model traces. See Understanding Outputs for the files written by the optional analyses.

For a runnable notebook version of this workflow, see notebooks/01_quickstart_analysis.ipynb.

Clone this wiki locally