Home
API: chem

Function: asBackbone()

lifecycle-kit

lifecycle-kit


lifecycle-kit / chem / asBackbone

Function: asBackbone()

asBackbone(id, backbone?): Record<string, number>

Defined in: chem/biomolecules.ts:129

A tissue's formula expressed in a given world's backbone.

Carbon atoms become backbone atoms; everything else is untouched. Passing "C" returns the formula unchanged, which is why every caller can default to it and worlds that chose carbon cost nothing extra.

Parameters

id

string

backbone?

Backbone = "C"

Returns

Record<string, number>