fastatomstruct-mcp

v0.1.0
fastatomstruct-mcp Checked 23 hours ago Published 1 month ago

MCP server exposing fastatomstruct analysis, structure building, simulation and DFT tools to AI assistants

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

cp2k_settings_template

Return a template CP2K settings dict for Quickstep DFT.

cp2k_energy_forces_from_file

Compute energy and forces using a CP2K input file.

ParameterTypeDescription
handle *string
input_file *string
charge
compute_stressboolean
connect_timeoutnumber
echo_input
env
launcher_cmd
multiplicity
nproc
output_file
print_level
project_label
roks
run_type
seed
uks
walltime
wfn_restart_file
working_dir

cp2k_energy_forces_from_settings

Compute energy and forces using typed CP2K settings.

ParameterTypeDescription
handle *string
settings *object
charge
compute_stressboolean
connect_timeoutnumber
echo_input
env
launcher_cmd
multiplicity
nproc
output_file
print_level
project_label
roks
run_type
seed
uks
walltime
wfn_restart_file
working_dir

cp2k_dos_from_file

Compute DOS using a CP2K input file.

ParameterTypeDescription
handle *string
input_file *string
connect_timeoutnumber
dos_kpoints
dos_npointsinteger
dos_sigma_evnumber
dos_use_symmetryboolean
energy_range_evarray
energy_range_relative_efboolean
env
launcher_cmd
nproc
output_file
working_dir

cp2k_dos_from_settings

Compute DOS using typed CP2K settings.

ParameterTypeDescription
handle *string
settings *object
connect_timeoutnumber
dos_kpoints
dos_npointsinteger
dos_sigma_evnumber
dos_use_symmetryboolean
energy_range_evarray
energy_range_relative_efboolean
env
launcher_cmd
nproc
output_file
working_dir

cp2k_band_structure_dos_from_file

Compute band structure + DOS using a CP2K input file. plot_mode defaults to "band+dos". Accepted values: "band+dos" (preferred), "band" (alias for band+dos), or "dos".

ParameterTypeDescription
handle *string
input_file *string
band_path
connect_timeoutnumber
dedupe_labelsboolean
dos_kpoints
dos_npointsinteger
dos_sigma_evnumber
dos_use_symmetryboolean
energy_range_evarray
energy_range_relative_efboolean
env
label_map
launcher_cmd
npoints_bandinteger
nproc
output_file
plot_modestring
working_dir

cp2k_band_structure_dos_from_settings

Compute band structure + DOS using typed CP2K settings. plot_mode defaults to "band+dos". Accepted values: "band+dos" (preferred), "band" (alias for band+dos), or "dos".

ParameterTypeDescription
handle *string
settings *object
band_path
connect_timeoutnumber
dedupe_labelsboolean
dos_kpoints
dos_npointsinteger
dos_sigma_evnumber
dos_use_symmetryboolean
energy_range_evarray
energy_range_relative_efboolean
env
label_map
launcher_cmd
npoints_bandinteger
nproc
output_file
plot_modestring
working_dir

upload_file

Upload a file via base64 and return a handle + absolute path. This is useful for passing CP2K input files through MCP.

ParameterTypeDescription
data_base64 *string
filename *string
subdir

load_structure

Load an atomic structure from a file. Supported formats: XYZ, CIF, PDB, TACO, Quantum ESPRESSO, CP2K restart, … The first frame is loaded if the file contains multiple frames. Args: path: Absolute or relative path to the structure file. Returns a handle (e.g. "struct_0") and a summary of the loaded structure.

ParameterTypeDescription
path *string

load_trajectory

Load a trajectory from a file. Supported formats: TACO, XYZ, Quantum ESPRESSO output, … Args: path: Path to the trajectory file. start: Index of the first frame to load (default: 0). stop: Index after the last frame to load (default: all). step: Frame stride — load every Nth frame (default: 1). timestep_fs: Time between consecutive saved frames in femtoseconds (default: 1.0). This is stored with the trajectory and used automatically by analysis tools. Returns a handle (e.g. "traj_0") and metadata about the traje…

ParameterTypeDescription
path *string
start
step
stop
timestep_fsnumber

save_structure

Save a structure or trajectory to a file. The format is inferred from the file extension (.xyz, .cif, .pdb, .taco, …). Args: handle: Handle of the structure or trajectory to save. path: Output file path.

ParameterTypeDescription
handle *string
path *string

list_loaded

List all structures and trajectories currently loaded in this session.

extract_frame

Extract a single frame from a trajectory as a structure handle. This lets you run structure-only tools (e.g. find_bonds, compute_bond_order) on a specific snapshot from a trajectory. Args: traj_handle: Trajectory handle. frame: Frame index (default: -1 = last frame). Negative indices count from the end (Python convention). Returns a new structure handle for the extracted frame.

ParameterTypeDescription
traj_handle *string
frameinteger

get_structure_info

Get detailed information about a loaded structure or trajectory. For trajectories, information is shown for the first frame plus trajectory-specific metadata (number of frames). Returns: number of atoms, element counts, cell parameters (a, b, c, α, β, γ), periodic boundary conditions, volume (ų), density (g/cm³), and potential energy if available. Args: handle: Structure or trajectory handle.

ParameterTypeDescription
handle *string

get_composition

Get the chemical composition of a structure or trajectory. Returns the reduced chemical formula and the percentage composition per element. Args: handle: Structure or trajectory handle.

ParameterTypeDescription
handle *string

create_bulk

Create a bulk crystal structure. Args: element: Element spec, e.g. 'Cu', 'Si', 'NaCl', 'Na-Cl', or ['Na', 'Cl']. lattice_type: Crystal structure: 'fcc', 'bcc', 'hcp', 'diamond', 'sc', 'rocksalt', 'zincblende', 'wurtzite', 'cesiumchloride', 'fluorite'. a: Lattice constant in Ångström. supercell_nx/ny/nz: Optional repetitions along each axis (default: 1×1×1). Returns a handle for the created structure. Use list_lattice_types() to see all options with example elements.

ParameterTypeDescription
a *number
element *string
lattice_type *string
supercell_nxinteger
supercell_nyinteger
supercell_nzinteger

create_supercell

Create a supercell by repeating a structure along each axis. Args: handle: Handle of the input (primitive) structure. nx/ny/nz: Number of repetitions along the a/b/c cell vectors. Returns a new handle for the supercell.

ParameterTypeDescription
handle *string
nx *integer
ny *integer
nz *integer

create_molecule

Create a common molecule by name. Use list_molecules() to see all available molecule names (H2O, CH4, …). Args: name: Molecule name (e.g. 'H2O', 'CH4', 'C2H6', 'NH3'). vacuum: Vacuum padding in Ångström around the molecule (default: 10). Set to None for no cell. Returns a handle for the created molecule.

ParameterTypeDescription
name *string
vacuum

list_molecules

List all molecule names available for create_molecule(). Returns the list of available molecule names.

create_amorphous

Generate a random amorphous structure with a given composition and density. Args: composition: Chemical formula (e.g. 'SiO2', 'Al2O3', 'GeSe3'). density: Target density in g/cm³. num_atoms: Approximate total number of atoms. seed: Optional random seed for reproducibility. Returns a handle for the generated amorphous structure.

ParameterTypeDescription
composition *string
density *number
num_atoms *integer
seed

compute_rdf

Compute the radial distribution function g(r). Accepts both structure and trajectory handles. For trajectories the RDF is averaged over all frames automatically. Args: handle: Structure or trajectory handle. r_max: Maximum distance in Ångström. n_bins: Number of histogram bins (default: 200). element_pair: Optional element filter. Examples: 'Cu' → Cu-Cu pairs only 'Cu-O' → Cu around O (or O around Cu) None → all pairs (total RDF) Returns r valu…

ParameterTypeDescription
handle *string
r_max *number
element_pair
n_binsinteger

compute_coordination_numbers

Compute per-atom coordination numbers. Accepts both structure and trajectory handles. For trajectories the coordination numbers are averaged over all frames. Args: handle: Structure or trajectory handle. cutoff: Cutoff radius in Ångström. Use the first RDF peak as a guide. element: Optional: restrict to atoms of this element (e.g. 'Cu'). Returns mean, std, histogram, and a bar chart.

ParameterTypeDescription
cutoff *number
handle *string
element

compute_bond_order

Compute the Steinhardt bond-order parameter q_l. Accepts both structure and trajectory handles. For trajectories the per-atom q_l values are concatenated from all frames. Common values of l: l=4 → sensitive to cubic/octahedral symmetry (perfect FCC: Q4≈0.19) l=6 → sensitive to close-packed order (perfect FCC: Q6≈0.57, BCC: Q6≈0.51) Args: handle: Structure or trajectory handle. l: Order of the Steinhardt parameter (integer ≥ 1). cutoff: Cutoff radius in Ångström. element: Optional: compute only for atoms of…

ParameterTypeDescription
cutoff *number
handle *string
l *integer
element

compute_static_structure_factor

Compute the static structure factor S(q). Accepts both structure and trajectory handles. For trajectories S(q) is averaged over all frames automatically. Args: handle: Structure or trajectory handle. q_max: Maximum wavevector magnitude in Å⁻¹ (typical range: 10–25 Å⁻¹). n_bins: Number of q-bins (default: 200). Returns S(q) values and a plot.

ParameterTypeDescription
handle *string
q_max *number
n_binsinteger

find_bonds

Find all bonds and compute per-pair bond-length statistics. Accepts both structure and trajectory handles. For trajectories the last frame is used. Args: handle: Structure or trajectory handle. cutoff: Bond cutoff radius in Ångström. Use the first RDF valley as a guide. Returns bond counts, mean/std/min/max lengths per element pair.

ParameterTypeDescription
cutoff *number
handle *string

compute_bond_angles

Compute the bond angle distribution. Accepts both structure and trajectory handles. Args: handle: Structure or trajectory handle. cutoff: Cutoff radius in Ångström for bond detection. n_bins: Number of angular bins (default: 180, i.e. 1° resolution). element_pair: Optional element filter (e.g. 'Si', 'Si-O'). Returns angles (degrees) and their distribution, plus a plot.

ParameterTypeDescription
cutoff *number
handle *string
element_pair
n_binsinteger

compute_tetrahedral_order

Compute the tetrahedral order parameter q. q = 1 for a perfect tetrahedron, q = 0 for ideal gas / disordered. Common use: water, silica, Ge-Se glasses. Accepts both structure and trajectory handles. Args: handle: Structure or trajectory handle. cutoff: Cutoff radius in Ångström for neighbour detection. n_neighbours: Number of nearest neighbours for the angle calculation (default: 4). element: Optional: compute only for atoms of this element. Returns per-atom q values, statistics, and a histogram.

ParameterTypeDescription
cutoff *number
handle *string
element
n_neighboursinteger

compute_ring_statistics

Compute the ring size distribution. Identifies rings in the bond network. Useful for characterising amorphous structures (e.g. SiO2 glass, amorphous carbon). Accepts both structure and trajectory handles. Args: handle: Structure or trajectory handle. cutoff: Bond cutoff in Ångström. max_ring_size: Largest ring size to search for (default: 9). element: Optional element filter. Returns ring sizes and their counts, plus a bar chart.

ParameterTypeDescription
cutoff *number
handle *string
element
max_ring_sizeinteger

compute_void_fraction

Compute the void (free volume) fraction of a structure. Places a grid inside the simulation cell and tests which grid points are not overlapping with any atom (considering van der Waals radii). Args: handle: Structure handle. n_grid: Number of grid points along each axis (default: 50). probe_radius: Probe radius in Ångström (default: 0 = point probe). Returns the void fraction (0 = fully packed, 1 = empty cell).

ParameterTypeDescription
handle *string
n_gridinteger
probe_radiusnumber

render_structure

Render a structure as a PNG image. Useful for visually inspecting atomic configurations. Args: handle: Structure or trajectory handle. For trajectories, the last frame is rendered. Returns the rendered image.

ParameterTypeDescription
handle *string

compute_msd

Compute the Mean Squared Displacement (MSD) from a trajectory. A linear MSD indicates diffusive (liquid-like) motion. A plateau indicates solid-like (caged) motion. Use log-log axis to see the ballistic regime at short times (MSD ~ t²). Args: traj_handle: Trajectory handle. timestep_fs: Time between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs). axis: Scale of the plot axes: 'linear' (default), 'log-log', or 'semilog'. Returns MSD(t), the deriv…

ParameterTypeDescription
traj_handle *string
axis
timestep_fs

compute_vdos

Compute the Vibrational Density of States (VDOS) from a trajectory. The VDOS is computed as the Fourier transform of the velocity autocorrelation function (VACF). The trajectory must contain atom velocities. Args: traj_handle: Trajectory handle. timestep_fs: MD timestep between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs). Returns frequency axis (THz) and VDOS, plus a plot.

ParameterTypeDescription
traj_handle *string
timestep_fs

compute_overlap_q

Compute the self-overlap function Q(t) — a key observable for glassy dynamics. Q(t) is the fraction of atoms that have moved less than q_cutoff from their initial position. It decays from 1 to 0 in a liquid; for a glass or crystal it plateaus at a non-zero value. The decay time τ_α is the structural relaxation time. Args: traj_handle: Trajectory handle. q_cutoff: Distance threshold in Ångström (typically 1.5–2.5 Å, corresponding to the first minimum of the RDF). timestep_fs: Time between saved frames in femtosecon…

ParameterTypeDescription
q_cutoff *number
traj_handle *string
timestep_fs

compute_vacf

Compute the Velocity Autocorrelation Function (VACF) from a trajectory. The VACF characterises how quickly atoms lose memory of their initial velocity direction. Its Fourier transform gives the VDOS. The trajectory must contain atom velocities. Args: traj_handle: Trajectory handle. timestep_fs: Time between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs). Returns time axis and VACF values, plus a plot.

ParameterTypeDescription
traj_handle *string
timestep_fs

compute_isf

Compute the incoherent intermediate scattering function F_s(q, t). F_s(q, t) describes single-particle dynamics at wavevector q. It decays from 1 to 0; the decay time at the structure factor peak gives the alpha relaxation time. If only qx is provided, it is treated as the magnitude of q and an isotropic average is performed. Args: traj_handle: Trajectory handle. qx: x-component of the wavevector in Å⁻¹. qy: y-component of the wavevector in Å⁻¹. qz: z-component of the wavevector in Å⁻¹. timeste…

ParameterTypeDescription
qx *number
traj_handle *string
qy
qz
timestep_fs

compute_chi4

Compute the four-point susceptibility χ₄(t). χ₄(t) quantifies the degree of dynamic heterogeneity. A higher peak indicates more spatially correlated dynamics (typical for supercooled liquids near the glass transition). Args: traj_handle: Trajectory handle. q_cutoff: Overlap cutoff in Ångström (same as for compute_overlap_q). temperature: Temperature in Kelvin. timestep_fs: Time between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs).…

ParameterTypeDescription
q_cutoff *number
temperature *number
traj_handle *string
timestep_fs

compute_alpha2

Compute the non-Gaussian parameter α₂(t). α₂ = 0 for a Gaussian distribution of displacements (normal diffusion). α₂ > 0 indicates heterogeneous dynamics (some atoms move much faster or slower than the average). The peak of α₂(t) corresponds to the time scale of maximum dynamic heterogeneity. Args: traj_handle: Trajectory handle. timestep_fs: Time between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs). Returns time axis, α₂(t), and a plot.…

ParameterTypeDescription
traj_handle *string
timestep_fs

compute_viscosity

Compute the shear viscosity via the Green-Kubo relation. Integrates the stress autocorrelation function. The trajectory must contain stress tensor information. Args: traj_handle: Trajectory handle. timestep_fs: Time between consecutive saved frames in femtoseconds. If not provided, uses the timestep stored with the trajectory (default: 1.0 fs). Returns time axis, stress autocorrelation, running viscosity integral, and a plot.

ParameterTypeDescription
traj_handle *string
timestep_fs

compute_phonons

Compute phonon band structure and density of states via finite differences. Tips: - Use a primitive cell for the input structure (not a supercell). - Use a larger supercell (3×3×3 or 4×4×4) for better convergence. - If imaginary modes appear, run run_optimization first. - EMT only works for certain metals (Cu, Ag, Au, Ni, Pd, Pt, Al, Rh, Ir). Args: handle: Structure handle (primitive cell recommended). calculator: 'emt' (fast, metals) or 'lj' (Lennard-Jones). supercell_nx/ny/nz: Supercell size for finite-difference force c…

ParameterTypeDescription
handle *string
calculatorstring
supercell_nxinteger
supercell_nyinteger
supercell_nzinteger

run_optimization

Run a structural geometry optimization (energy minimisation). Args: handle: Structure handle. calculator: 'emt' (fast, metals) or 'lj' (Lennard-Jones). optimizer: 'lbfgsb' (default), 'bfgs' (supports cell relaxation), or 'fire'. fmax: Force convergence threshold in eV/Å (default: 0.05). max_steps: Maximum number of optimizer steps (default: 200). Returns a new handle for the relaxed structure.

ParameterTypeDescription
handle *string
calculatorstring
fmaxnumber
max_stepsinteger
optimizerstring

run_md

Run a short molecular dynamics simulation. Args: handle: Structure handle (starting configuration). n_steps: Number of MD steps. temperature: Target temperature in Kelvin. calculator: 'emt' (metals) or 'lj' (Lennard-Jones). ensemble: 'nve', 'nvt', or 'npt'. thermostat: Thermostat: 'bussi' (CSVR, default), 'nose-hoover', 'berendsen', 'andersen', or 'langevin'. Ignored for NVE ensemble. pressure: Target pressure in GPa (only for NPT, default: 0). times…

ParameterTypeDescription
handle *string
n_steps *integer
temperature *number
calculatorstring
ensemblestring
pressure
save_intervalinteger
thermostatstring
timestep_fsnumber

list_lattice_types

List all crystal lattice types available for create_bulk(). Returns the lattice name, description, and example elements for each type.