mirror of
https://github.com/HannesStark/boltzgen.git
synced 2026-06-04 11:54:23 +08:00
fix several isses
This commit is contained in:
@@ -17,37 +17,26 @@ structure_groups:
|
||||
visibility: 0
|
||||
res_index: 26..34,52..59,98..118
|
||||
|
||||
# Flexible lengths for CDR 1
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 26..28 # take out 3
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 52..54 # take out 3
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 98..104 # take out seven
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 26 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 2
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 52..54 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 52 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 3
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 98..104 # take out seven
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 98 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
|
||||
@@ -17,41 +17,31 @@ structure_groups:
|
||||
res_index: 26..33,51..57,97..110
|
||||
|
||||
|
||||
# Flexible lengths for CDR 1
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 26..28 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 26 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 2
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 51..53 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 51 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 3
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 97..102 # take out 6
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 26 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 51 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 97 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..12
|
||||
|
||||
|
||||
# reindex the residue index which is used in the positional encoding
|
||||
reset_res_index:
|
||||
|
||||
@@ -18,37 +18,26 @@ structure_groups:
|
||||
res_index: 26..33,51..58,97..115
|
||||
|
||||
|
||||
# Flexible lengths for CDR 1
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 26..28 # take out 3
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 51..53 # take out 3
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 97..103 # take out seven
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 26 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 2
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 51..53 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 51 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 3
|
||||
exclude:
|
||||
- chain:
|
||||
id: A
|
||||
res_index: 97..103 # take out seven
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: A
|
||||
res_index: 98 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
|
||||
@@ -16,39 +16,26 @@ structure_groups:
|
||||
visibility: 0
|
||||
res_index: 26..33,51..58,98..108
|
||||
|
||||
|
||||
|
||||
# Flexible lengths for CDR 1
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 26..28 # take out 3
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 51..53 # take out 3
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 98..100 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 26 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 2
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 51..53 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 51 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
num_residues: 1..5
|
||||
|
||||
# Flexible lengths for CDR 3
|
||||
exclude:
|
||||
- chain:
|
||||
id: B
|
||||
res_index: 98..100 # take out 3
|
||||
|
||||
design_insertions:
|
||||
- insertion:
|
||||
id: B
|
||||
res_index: 98 # The res_index'th residue will be a designed one (starting to count from 1)
|
||||
|
||||
91
filter.ipynb
91
filter.ipynb
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "boltzgen"
|
||||
requires-python = ">=3.10"
|
||||
requires-python = ">=3.9"
|
||||
#dynamic = ["version"]
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
@@ -37,7 +37,7 @@ dependencies = [
|
||||
"cuequivariance_ops_torch_cu12>=0.5.0",
|
||||
"cuequivariance_torch>=0.5.0",
|
||||
"huggingface_hub",
|
||||
"biopython",
|
||||
"biopython",
|
||||
]
|
||||
|
||||
# Enables the usage of setuptools_scm
|
||||
|
||||
@@ -322,12 +322,6 @@ def add_configure_arguments(
|
||||
help="Threshold used for RMSD-based filters (lower is better).",
|
||||
default=None,
|
||||
)
|
||||
p.add_argument(
|
||||
"--local_files_only",
|
||||
action="store_true",
|
||||
help="Run in offline mode, use model weights and data from the local cache.",
|
||||
default=False,
|
||||
)
|
||||
|
||||
|
||||
def add_models_download_options(p: argparse.ArgumentParser) -> None:
|
||||
@@ -1297,7 +1291,6 @@ def get_artifact_path(
|
||||
library_name="boltzgen",
|
||||
force_download=args.force_download,
|
||||
token=args.models_token,
|
||||
local_files_only=args.local_files_only,
|
||||
cache_dir=args.cache,
|
||||
)
|
||||
result = Path(result)
|
||||
|
||||
@@ -1394,15 +1394,6 @@ class YamlDesignParser:
|
||||
)
|
||||
new_chain_to_msa[renamed_id] = msa
|
||||
chain_to_msa.update(new_chain_to_msa)
|
||||
# Update chain_to_msa dictionary. Set defaults given by file_msa_flag for proteins. Insert -1 (no msa) for {dna, rna, ligand}.
|
||||
for chain in data.chains:
|
||||
chain_id = chain["name"].item()
|
||||
if chain_id not in chain_to_msa:
|
||||
if chain["mol_type"] == const.chain_type_ids["PROTEIN"]:
|
||||
chain_to_msa[chain_id] = file_msa_flag
|
||||
else:
|
||||
chain_to_msa[chain_id] = -1
|
||||
chain_to_msa.update(new_chain_to_msa)
|
||||
else:
|
||||
path = item["file"]["path"]
|
||||
(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from boltzgen.data.data import StructureInfo
|
||||
from pathlib import Path
|
||||
import re
|
||||
from typing import Dict, List, Optional
|
||||
@@ -286,7 +287,7 @@ class PredictionDataset(torch.utils.data.Dataset):
|
||||
|
||||
# Load record
|
||||
record = load_record(pdb_id, self.dataset.record_dir)
|
||||
|
||||
|
||||
# Get the structure
|
||||
try:
|
||||
if self.inverse_fold:
|
||||
|
||||
Reference in New Issue
Block a user