Quickstart
==========

Installation
------------

Clone the repository and install with pip:

.. code-block:: bash

   git clone https://github.com/your-org/moltenflow.git
   cd moltenflow
   pip install -e .

Basic Usage
-----------

Train a surrogate model on toy data:

.. code-block:: python

   import torch
   from moltenflow.models.surrogate import PropertySurrogate
   from moltenflow.data.latents import generate_toy_latents, generate_toy_targets

   # Generate toy data
   z = generate_toy_latents(n_samples=1000, latent_dim=64)
   y = generate_toy_targets(z, n_properties=2)

   # Create and train model
   model = PropertySurrogate(in_dim=64, out_dim=2)
   optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)
   loss_fn = torch.nn.MSELoss()

   for epoch in range(100):
       optimizer.zero_grad()
       loss = loss_fn(model(z), y)
       loss.backward()
       optimizer.step()

Use with real molecular data:

.. code-block:: python

   from moltenflow.data.latents import get_latents

   smiles = ["CCO", "CC(=O)O", "c1ccccc1"]
   z = get_latents(smiles, backend="rdkit_fp", fp_nbits=2048)
