Spaces:
Running
Running
Download esm/source/examples/protein-programming-language/programs/free_hallucination.py from kabuda777/Code2MCP-esm: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/spaces/kabuda777/Code2MCP-esm/resolve/main/esm/source/examples/protein-programming-language/programs/free_hallucination.py
- Command line
-
hf download hf://spaces/kabuda777/Code2MCP-esm/esm/source/examples/protein-programming-language/programs/free_hallucination.py
-
curl -L -o free_hallucination.py https://huggingface.co/spaces/kabuda777/Code2MCP-esm/resolve/main/esm/source/examples/protein-programming-language/programs/free_hallucination.py
651 Bytes
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| # This source code is licensed under the MIT license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| from language import ( | |
| FixedLengthSequenceSegment, | |
| MaximizePLDDT, | |
| MaximizePTM, | |
| MinimizeSurfaceHydrophobics, | |
| ProgramNode, | |
| ) | |
| def free_hallucination(sequence_length: int) -> ProgramNode: | |
| sequence = FixedLengthSequenceSegment(sequence_length) | |
| return ProgramNode( | |
| sequence_segment=sequence, | |
| energy_function_terms=[ | |
| MaximizePTM(), | |
| MaximizePLDDT(), | |
| MinimizeSurfaceHydrophobics(), | |
| ], | |
| ) | |