generate_molecule_def
Generate a RASPA2 molecule definition file from atom coordinates and force-field parameters, writing it to the workspace for molecular simulations.
Instructions
Generate a per-molecule .def file at
<work_dir>/molecules/<subdirectory>/<molecule_name>.def.
atoms items: {"type": str, "x": float, "y": float, "z": float}.
Coords are Å relative to the molecule centre of mass.
bonds items: [i, j, "RIGID_BOND"] (or any RASPA2 bond keyword).
bends items: [i, j, k, "<bend_keyword>"].
torsions items: [i, j, k, l, "<torsion_keyword>"].
Set MoleculeDefinition <subdirectory> in simulation.input so RASPA2
finds this file. Avoid MoleculeDefinition local — that points to
$RASPA_DIR/share/raspa/molecules/local/, not your workspace.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"work_dir": "<work_dir>",
"molecule_name": "<molecule_name>",
"critical_temperature_K": "<critical_temperature_K>",
"critical_pressure_Pa": "<critical_pressure_Pa>",
"acentric_factor": "<acentric_factor>",
"atoms": "<atoms>"
},
"name": "generate_molecule_def"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atoms | Yes | ||
| bends | No | ||
| bonds | No | ||
| rigid | No | ||
| n_groups | No | ||
| torsions | No | ||
| work_dir | Yes | ||
| return_only | No | ||
| subdirectory | No | TraPPE | |
| molecule_name | Yes | ||
| acentric_factor | Yes | ||
| critical_pressure_Pa | Yes | ||
| critical_temperature_K | Yes |