vibesketch.document.properties

Species property tables and property text under a structure (#93).

The values are the species report’s (vibesketch.chem.report): formula, masses, elemental analysis and calculated descriptors, labelled as estimates. CSV keeps full precision; Markdown and LaTeX show two decimals, as the analysis line does.

Module Attributes

FIELDS

What a property text can show, in the order it shows them.

Functions

property_lines(document, species[, fields])

The lines of a species' property text, one per field.

property_table(document[, format])

One row per species: formula, masses, elemental analysis and descriptors.

with_property_text(document, species[, fields])

document with a property text under the first drawn structure of species.

Exceptions

PropertiesRefused

A table or text that cannot be made as asked.

vibesketch.document.properties.FIELDS: tuple[Literal['formula', 'mass', 'analysis', 'logp', 'tpsa'], ...] = ('formula', 'mass', 'analysis', 'logp', 'tpsa')

What a property text can show, in the order it shows them.

exception vibesketch.document.properties.PropertiesRefused[source]

Bases: ValueError

A table or text that cannot be made as asked.

vibesketch.document.properties.property_lines(document, species, fields=None)[source]

The lines of a species’ property text, one per field.

Parameters:
Return type:

list[str]

vibesketch.document.properties.property_table(document, format='csv')[source]

One row per species: formula, masses, elemental analysis and descriptors.

Parameters:
Return type:

bytes

vibesketch.document.properties.with_property_text(document, species, fields=None)[source]

document with a property text under the first drawn structure of species.

The text goes below the structure, and below its compound number when it has one; the structure itself does not move.

Parameters:
Return type:

Document