vibesketch.inputs¶
Input writers: from a document’s job to a program’s input files.
>>> from vibesketch.document import load
>>> from vibesketch.inputs import write_input
>>> bundle = write_input(load("ethanol.vsk"), species="m1", program="xyz")
>>> bundle.files[0].name
'm1.xyz'
Every writer fails closed: what it cannot express raises
WriterRefusal with the reasons. vibe-sketch writers lists them.
- class vibesketch.inputs.Batch(bundles=<factory>, refused=<factory>)¶
Bases:
objectInputs for several species with one writer and one specification.
- bundles: list[InputBundle]¶
- class vibesketch.inputs.InputBundle(program, species, files)¶
Bases:
objectEverything a writer produced for one job.
- class vibesketch.inputs.InputFile(name, content, media_type)¶
Bases:
objectOne file of a program input.
- class vibesketch.inputs.InputWriter¶
Bases:
ABCTranslate a job specification into one program’s input, or refuse.
- tasks: ClassVar[frozenset[Literal['geometry', 'sp', 'opt', 'freq', 'opt+freq', 'tddft', 'nmr']]]¶
The tasks this writer can express.
- fields: ClassVar[frozenset[str]] = frozenset({})¶
The specification fields, besides
task, this writer can express.
- refusals(species, spec)¶
Everything in the request this writer cannot express; empty if it can.
- write(species, spec)¶
The input files for
speciesandspec; raisesWriterRefusal.- Parameters:
- Return type:
- exception vibesketch.inputs.UnknownReference(kind, identifier)¶
Bases:
KeyErrorThe document has no job or species with that id.
- exception vibesketch.inputs.UnknownWriter(name)¶
Bases:
LookupErrorNo writer is registered under that name.
- Parameters:
name (str)
- Return type:
None
- exception vibesketch.inputs.WriterRefusal(program, reasons)¶
Bases:
ValueErrorThe writer cannot express the request;
reasonssays what and why.
- vibesketch.inputs.get_writer(name)¶
The writer registered as
name; raisesUnknownWriter.- Parameters:
name (str)
- Return type:
- vibesketch.inputs.register(writer, *, replace=False)¶
Make
writeravailable underwriter.name.- Parameters:
writer (InputWriter)
replace (bool)
- Return type:
None
- vibesketch.inputs.write_input(document, *, job=None, species=None, program=None, spec=None)¶
Write the input for one job of
document.Name a job by its id, or give a species id and a program (with an optional specification; the default is the geometry only). Raises
WriterRefusalwhen the writer cannot express the request,UnknownWriterfor an unknown program, andUnknownReferencefor an id the document does not have.
- vibesketch.inputs.write_inputs(document, *, program, spec, species=None)¶
The inputs for
species(default: every species) with one writer.A species the writer refuses is listed in
Batch.refusedwith the reasons, and the others are still written; a proton in a mechanism should not stop the rest of it. RaisesUnknownWriterfor an unknown program andUnknownReferencefor an unknown species id.
- vibesketch.inputs.writers()¶
Every registered writer, by name.
- Return type:
Modules
The input-writer interface. |
|
The ORCA input writer (roadmap WP 2.2). |
|
The ORCA keyword model: what vibe-sketch knows how to say in ORCA. |
|
The QCSchema molecule writer. |
|
The registry of input writers, and the one call that runs them. |
|
The vibe-qc writer: a Python script that runs the job with |
|
The XYZ writer: the geometry of one species, nothing else. |