No such file or directory
Closed this issue · 4 comments
Excellent work, and very thx for open source. This is my question.
When testing api.design, error:
api/design.py", line 43, in get_epitope
with open(epitope_def, 'r') as fin:
FileNotFoundError: [Errno 2] No such file or directory: './demos/data/e_epitope.json'
I have './demos/data/E_epitope.json; but don't have other 3 " e,F,f "
from api.design import design
ckpt = './checkpoints/cdrh3_design.ckpt'
root_dir = './demos/data'
pdbs = [os.path.join(root_dir, '7l2m.pdb') for _ in range(4)]
toxin_chains = ['E', 'e', 'F', 'f']
remove_chains = [toxin_chains for _ in range(4)]
epitope_defs = [os.path.join(root_dir, c + '_epitope.json') for c in toxin_chains]
identifiers = [f'{c}_antibody' for c in toxin_chains]
frameworks = [
(
('H', 'QVQLKESGPGLLQPSQTLSLTCTVSGISLSDYGVHWVRQAPGKGLEWMGIIGHAGGTDYNSNLKSRVSISRDTSKSQVFLKLNSLQQEDTAMYFC----------WGQGIQVTVSSA'),
('L', 'YTLTQPPLVSVALGQKATITCSGDKLSDVYVHWYQQKAGQAPVLVIYEDNRRPSGIPDHFSGSNSGNMATLTISKAQAGDEADYYCQSWDGTNSAWVFGSGTKVTVLGQ')
)
for _ in pdbs
] # the first item of each tuple is heavy chain, the second is light chain
design(ckpt=ckpt, # path to the checkpoint of the trained model
gpu=0, # the ID of the GPU to use
pdbs=pdbs, # paths to the PDB file of each antigen (here antigen is all TRPV1)
epitope_defs=epitope_defs, # paths to the epitope definitions
frameworks=frameworks, # the given sequences of the framework regions
out_dir=root_dir, # output directory
identifiers=identifiers, # name of each output antibody
remove_chains=remove_chains,# remove the original ligand
enable_openmm_relax=True, # use openmm to relax the generated structure
auto_detect_cdrs=False) # manually use '-' to represent CDR residues
谢谢您,孔老师,很赞!
annother error occur when using api.optimize, it seems like the force field is not defined or force file missing, could u tell me how to fix it?
python -m api.optimize
Traceback (most recent call last):
File "/home/ad/miniconda3/envs/abc/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/ad/miniconda3/envs/abc/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ad/dyMEAN/api/optimize.py", line 223, in
optimize(
File "/home/ad/dyMEAN/api/optimize.py", line 194, in optimize
openmm_relax(mod_pdb, mod_pdb,
File "/home/ad/dyMEAN/utils/relax.py", line 74, in openmm_relax
modeller.addHydrogens(force_field)
File "/home/ad/miniconda3/envs/abc/lib/python3.10/site-packages/openmm/app/modeller.py", line 998, in addHydrogens
system = forcefield.createSystem(newTopology, rigidWater=False, nonbondedMethod=CutoffNonPeriodic)
File "/home/ad/miniconda3/envs/abc/lib/python3.10/site-packages/openmm/app/forcefield.py", line 1218, in createSystem
templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds)
File "/home/ad/miniconda3/envs/abc/lib/python3.10/site-packages/openmm/app/forcefield.py", line 1433, in _matchAllResiduesToTemplates
raise ValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template' % (res.index+1, res.name, _findMatchErrors(self, res)))
ValueError: No template found for residue 6 (LEU). The set of atoms matches CLEU, but the bonds are different. For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template