Web

class hippo.web.ProjectPage(output_dir: str | Path, *, animal: HIPPO, scaffolds: CompoundSet | None = None, suppliers: list[str] | None = None, starting_recipe: Recipe | None = None, rgen: RandomRecipeGenerator | None = None, scorer: Scorer | None = None, proposals: list[Recipe] | None = None, title: str | None = None, scaffold_tag: str = 'Syndirella scaffold', extra_recipe_dir: str | Path = None, skip_existing: bool = True)[source]

Recipe proposal web page

ProjectPage initialisation

accordion() None[source]

sub-content accordion

property all_elab_poses: PoseSet

All elaboration poses

property all_elabs: CompoundSet

All elaborations

property all_scaffold_poses: PoseSet

All scaffold poses

property all_scaffolds: CompoundSet

All scaffold compounds

property animal: HIPPO

associated HIPPO object

button(text: str, onclick: str = '', style='w3-teal', disable: bool = False)[source]

Generic button component

compound_grid(compounds, style='w3-center', pose_modal: bool = False)[source]

Compound grid component

compound_image(compound, max_height='250px')[source]

Compound image stag

property db: Database

associated Database object

property doc: yattag.Doc

yattag.Doc

property extra_recipe_dir: Path

Optional extra recipe directory

funnel(log_y: bool = True, scaffolds: CompoundSet | None = None, num_inspirations: int | None = None, num_inspiration_sets: int | None = None) plotly.graph_objects.Figure[source]

Funnel plot

header() None[source]

Create the page header

property index_path: Path

index.html Path

property line: yattag.line
make_directories() None[source]

Create output directories

modal(modal_name, content_function)[source]

Generic modal

modal_button(text, modal_name, disable: bool = False, style: str = 'w3-teal')[source]

Modal opening button

property mol_image_dir: Path

Output directory

property output_dir: Path

Output directory

plotly_graph(figure, filename, write: bool = True)[source]

Generic plotly graph component

property pose_sdf_dir: Path

Output directory

property proposal: Recipe

Return single Recipe proposal

property proposals: list[Recipe]

List of proposal Recipe objects

recipe_subsection(recipe, title, sankey: bool = False, title_style='h3', show_title=True)[source]

recipe subsection

property resource_dir: Path

Output directory

property rgen: RandomRecipeGenerator

RandomRecipeGenerator

save_compound_image(compound)[source]

Create 2D compound drawing

save_pose_sdf(pose)[source]

Export pose SDF

save_pset_sdf(name, pset)[source]

Save poseset as SDF

property scaffold_poses: PoseSet

Scaffold poses

property scaffolds: CompoundSet

Scaffold CompoundSet

property scorer: Scorer

Scorer

scorer_attribute(attribute, histogram: bool = True)[source]

scorer attribute component

sec_elaborations() None[source]

Section on elaborations

sec_hits() None[source]

Section on experimental hits

sec_product_pool() None[source]

Section on product_pool

sec_proposals() None[source]

Section on proposals

sec_quoting() None[source]

Section on quoting

sec_rgen() None[source]

Section on rgen

sec_route_pool() None[source]

Section on route_pool

sec_scaffolds() None[source]

Section on scaffolds

sec_scorer() None[source]

Section on scorer

sec_targets() None[source]

Section on targets

section(function) None[source]

create section div

section_header(title: str, tag: str = 'h2') None[source]

section header

setup_page() None[source]

Create the yattag page content

sidebar() None[source]

https://www.w3schools.com/w3css/w3css_sidebar.asp

property skip_existing: bool

Skip creation of existing files

property starting_recipe: Recipe

Starting Recipe

style() None[source]

Create the page style

property suppliers: list[str]

Compound suppliers

table(data, style: str = 'w3-table-all w3-responsive', **kwargs)[source]

Embed some data as a table

property tag: yattag.tag
property text: yattag.text
property title: str

Page title

var(key, value, tag=None, separator=': ') None[source]

sub-content accordion

write_html() None[source]

Write the index.html file