Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ test_output_1/
examples/test_output/SimID_*
/examples/notebooks/*.py
/examples/solver_output/zarr/
/examples/solver_output/*.vtu
/examples/solver_output/*.json

examples/notebooks/workspace/

Expand Down
14 changes: 12 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Run `make check`, which does:

Then run tests: `poetry run pytest tests -v`

For changes to remote/session code, also prompt the developer to run authenticated integration tests manually:

```bash
poetry run pytest tests/vcml/test_remote_integration.py -v --run-remote
```

This requires interactive browser login and a live VCell server.

## Project structure

```
Expand Down Expand Up @@ -58,8 +66,10 @@ scripts/

The main entry point is `import pyvcell.vcml as vc`. Key functions:

- **Load models**: `vc.load_vcml_file()`, `vc.load_vcml_url()`, `vc.load_biomodel(id)`, `vc.load_sbml_file()`, `vc.load_antimony_str()`
- **Simulate**: `vc.simulate(biomodel, sim_name)` (local), `vc.run_remote(...)` (server)
- **Load models (local)**: `vc.load_vcml_file()`, `vc.load_vcml_url()`, `vc.load_sbml_file()`, `vc.load_antimony_str()`
- **Simulate (local)**: `vc.simulate(biomodel, sim_name)`
- **Remote (anonymous)**: `session = vc.connect()`, `session.load_biomodel(id)`, `session.list_biomodels()`
- **Remote (authenticated)**: `session = vc.connect(login=True)`, `session.run_sim(...)`, `session.start_sim(...)`
- **Results**: `result.plotter.plot_concentrations()`, `result.plotter.plot_slice_3d()`

## Code conventions
Expand Down
22 changes: 7 additions & 15 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,20 @@ biomodel = vc.load_vcml_file("path/to/model.vcml")
print(biomodel)
```

You can also load public models directly from the VCell database by ID:
You can also load public models from the VCell server. Use `vc.connect()` to create a session for remote access:

```python
biomodel = vc.load_biomodel("279851639")
```

To browse or search models by name, authenticate first:

```python
from pyvcell._internal.api.vcell_client.auth.auth_utils import login_interactive
session = vc.connect()

api_client = login_interactive() # opens a browser for login
# Load by database ID
biomodel = session.load_biomodel("279851639")

# List available models (public, shared, and your private models)
for m in vc.list_biomodels(api_client=api_client)[:2]:
# List available models
for m in session.list_biomodels()[:2]:
print(m)

# Load by name and owner
biomodel = vc.load_biomodel(name="Tutorial_MultiApp", owner="tutorial", api_client=api_client)

# Load by database ID
biomodel = vc.load_biomodel("279851639", api_client=api_client)
biomodel = session.load_biomodel(name="Tutorial_MultiApp", owner="tutorial")
```

Output:
Expand Down
269 changes: 21 additions & 248 deletions docs/guides/notebooks/remote-simulations.ipynb

Large diffs are not rendered by default.

Loading
Loading