Inductiva offers HPC as it should be: click, run, results.
Before diving into tutorials and benchmarks, let's ensure that your Inductiva Python package is properly set up. To confirm everything is working as expected, simply run a quick GROMACS simulation — it only takes a few seconds!
To get started, copy the code below and paste it into a Python script.
When you run the script, all the necessary simulation artifacts and configuration files will be automatically downloaded to your computer. The GROMACS simulation will then be sent to a cloud machine for execution.
"""GROMACS example."""
import inductiva
# Allocate cloud machine on Google Cloud Platform
cloud_machine = inductiva.resources.MachineGroup( \
provider="GCP",
machine_type="c2d-highcpu-4",
spot=True)
# Download the input files into a folder
input_dir = inductiva.utils.download_from_url(
"https://storage.googleapis.com/inductiva-api-demo-files/"
"gromacs-input-example.zip",
unzip=True)
# List of commands to run
commands = [
"gmx solvate -cs tip4p -box 2.3 -o conf.gro -p topol.top",
("gmx grompp -f energy_minimization.mdp -o min.tpr -pp min.top -po min.mdp "
"-c conf.gro -p topol.top"),
"gmx mdrun -s min.tpr -o min.trr -c min.gro -e min.edr -g min.log",
("gmx grompp -f positions_decorrelation.mdp -o decorr.tpr -pp decorr.top "
"-po decorr.mdp -c min.gro"),
("gmx mdrun -s decorr.tpr -o decorr.trr -x -c decorr.gro -e decorr.edr "
"-g decorr.log"),
("gmx grompp -f simulation.mdp -o eql.tpr -pp eql.top -po eql.mdp "
"-c decorr.gro"),
("gmx mdrun -s eql.tpr -o eql.trr -x trajectory.xtc -c eql.gro -e eql.edr "
"-g eql.log"),
]
# Initialize the Simulator
gromacs = inductiva.simulators.GROMACS( \
version="2022.2")
# Run simulation
task = gromacs.run( \
input_dir=input_dir,
commands=commands,
on=cloud_machine)
# Wait for the simulation to finish and download the results
task.wait()
cloud_machine.terminate()
task.download_outputs()
task.print_summary()
After the simulation completes, a task summary will be displayed in your terminal. If the task status shows Success, congratulations! You've successfully run a GROMACS simulation.
You're ready to start running simulations seamlessly!
If you encounter any issues or need further assistance, don't hesitate to Contact Us. We're here to help!