Source: https://guthlabs.ai/docs/instruments/lewis-structure-formal-charge-helper/implementation/

instrument implementation / implementation-contract

# Lewis Structure / Formal Charge Helper implementation

A source-bound implementation contract for Lewis Structure / Formal Charge Helper; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t6-131

**Effect**: Computation or source lookup only

## Input and validation requirements

An out-of-domain element symbol produces undefined valence-electron and formal-charge results; the instrument should reject it rather than propagate undefined values.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "molecular_formula": "H2O",
    "charge": 0,
    "atoms": [
      {
        "id": "O1",
        "element": "O",
        "group": 16,
        "lone_pair_electrons": 4
      },
      {
        "id": "H1",
        "element": "H",
        "group": 1,
        "lone_pair_electrons": 0
      },
      {
        "id": "H2",
        "element": "H",
        "group": 1,
        "lone_pair_electrons": 0
      }
    ],
    "bonds": [
      {
        "between": [
          "O1",
          "H1"
        ],
        "order": 1
      },
      {
        "between": [
          "O1",
          "H2"
        ],
        "order": 1
      }
    ]
  },
  "expected_outputs": {
    "total_valence_electrons": 8,
    "formal_charge": {
      "O1": 0,
      "H1": 0,
      "H2": 0
    },
    "octet_check": {
      "O1": {
        "required_electrons": 8,
        "assigned_electrons": 8,
        "satisfied": true
      },
      "H1": {
        "required_electrons": 2,
        "assigned_electrons": 2,
        "satisfied": true
      },
      "H2": {
        "required_electrons": 2,
        "assigned_electrons": 2,
        "satisfied": true
      }
    }
  },
  "working": "Valence count: O=6 (group 16 maps to 6), H=1, H=1; neutral total = 6+1+1 = 8; charge adjustment = −0 = 0, so total = 8. O has 4 nonbonding electrons and 4 bonding electrons from two single bonds: FC(O)=6−4−(4/2)=0. Each H has 0 nonbonding electrons and 2 bonding electrons: FC(H)=1−0−(2/2)=0. Octet check: O has 4 nonbonding + 4 bonding = 8; each H has 2 bonding = 2."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/lewis-structure-formal-charge-helper/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/lewis-structure-formal-charge-helper/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/lewis-structure-formal-charge-helper/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche6/tranche6-results.json`
