Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better requirements + rename command to chai-lab #304

Merged
merged 9 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"--memory=1000g"
],
"shutdownAction": "none",
"postCreateCommand": "uv pip install -e . && pre-commit install -f",
// This contains a separate requirements file for devcontainer specific packages e.g. ruff
"postCreateCommand": "uv pip install -e . && uv pip install -r requirements.dev && pre-commit install -f",
"customizations": {
"vscode": {
"settings": {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
# install requirements, except torch and potentially nvidia-related stuff
uv pip install --system -r <( cat requirements.in | grep -v nvidia | grep -v torch )
uv pip install --system --no-deps -e .
uv pip install -r requirements.dev
- name: Run pytest
run: pytest ./tests/
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: "3.10"
cache: "pip"
- name: Install
run: pip install pre-commit
run: pip install -r requirements.dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, let's add to mypy too

- name: Run pre-commit checks on all files
# run specific ruff pre-commit hooks on all files
run: >
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ This Python package requires Linux, and a GPU with CUDA and bfloat16 support. We

You can fold a FASTA file containing all the sequences (including modified residues, nucleotides, and ligands as SMILES strings) in a complex of interest by calling:
```shell
chai fold input.fasta output_folder
chai-lab fold input.fasta output_folder
```

By default, the model generates five sample predictions, and uses embeddings without MSAs or templates. For additional information about how to supply MSAs, templates, and restraints to the model, see the documentation below, or run `chai fold --help`.
By default, the model generates five sample predictions, and uses embeddings without MSAs or templates. For additional information about how to supply MSAs, templates, and restraints to the model, see the documentation below, or run `chai-lab fold --help`.

For example, to run the model with MSAs (which we recommend for improved performance), pass the `--use-msa-server` and `--use-templates-server` flags:

```shell
chai fold --use-msa-server --use-templates-server input.fasta output_folder
chai-lab fold --use-msa-server --use-templates-server input.fasta output_folder
```

If you are hosting your own ColabFold server, additionally pass the `--msa-server` flag with your server:

```shell
chai fold --use-msa-server --msa-server-url "https://api.internalcolabserver.com" input.fasta output_folder
chai-lab fold --use-msa-server --msa-server-url "https://api.internalcolabserver.com" input.fasta output_folder
```

We also provide additional utility functions for tasks such as MSA file format conversion; see `chai --help` for details.
Expand Down
2 changes: 1 addition & 1 deletion examples/msas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ aligned_pqt.head()

## Additional MSA generation strategies

Multiple strategies can be used for generating MSAs. In our [technical report](https://chaiassets.com/chai-1/paper/technical_report_v1.pdf), we generated MSAs using [jackhmmer](https://github.com/EddyRivasLab/hmmer). Other algorithms such as [MMseqs2](https://github.com/soedinglab/MMseqs2) can also be used. In this vein, we provide support for automatic MSA generation via the [ColabFold](https://github.com/sokrypton/ColabFold) server using `chai fold input.fasta output_directory --msa-server` or by invoking `run_inference` as follows:
Multiple strategies can be used for generating MSAs. In our [technical report](https://chaiassets.com/chai-1/paper/technical_report_v1.pdf), we generated MSAs using [jackhmmer](https://github.com/EddyRivasLab/hmmer). Other algorithms such as [MMseqs2](https://github.com/soedinglab/MMseqs2) can also be used. In this vein, we provide support for automatic MSA generation via the [ColabFold](https://github.com/sokrypton/ColabFold) server using `chai-lab fold input.fasta output_directory --msa-server` or by invoking `run_inference` as follows:

```python
candidates = run_inference(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ exclude = [
# should use packages from sdist section

[project.scripts]
chai = "chai_lab.main:cli"
chai-lab = "chai_lab.main:cli"
6 changes: 6 additions & 0 deletions requirements.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# dev-deps
pre-commit
ruff==0.6.3 # in sync with pre-commit-hook
mypy
pytest
ipykernel~=6.27 # needed by vs code to run notebooks in devcontainer
8 changes: 0 additions & 8 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# dev-deps, still placed in the same requirements file
ruff==0.6.3 # in sync with pre-commit-hook
mypy
pytest
pre-commit

# types/stubs are required by mypy
pandas-stubs
types-pyyaml
Expand All @@ -15,8 +9,6 @@ types-requests
typer~=0.12 # CLI generator
# pydantic~=2.5 # serialization/deserialization of configs

# notebooks, plotting
ipykernel~=6.27 # needed by vs code to run notebooks in devcontainer
# seaborn
matplotlib

Expand Down
Loading