modify prot

This commit is contained in:
zichongwang
2025-02-25 16:16:11 +08:00
parent 6721d1f6b7
commit 02d1131783
2 changed files with 132 additions and 6 deletions

132
.gitignore vendored Normal file
View File

@@ -0,0 +1,132 @@
# Byte-compiled / optimized / DLL files
**/__pycache__/
__pycache__/
*.py[cod]
*$py.class
.github
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Lightning /research
test_tube_exp/
tests/tests_tt_dir/
tests/save_dir
default/
data/
test_tube_logs/
test_tube_data/
datasets/
model_weights/
tests/save_dir
tests/tests_tt_dir/
processed/
raw/
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
# IDEs
.idea
.vscode
# seed project
lightning_logs/
MNIST
.DS_Store
**/nohup
*.out

View File

@@ -460,7 +460,6 @@ class FlowModule(LightningModule):
diffuse_mask = torch.ones(1, sample_length, device=device)
self.prot_df = pd.DataFrame(columns=['prot_path','length'])
for i in range(num_batch):
sample_dir = sample_dirs[i]
@@ -478,11 +477,6 @@ class FlowModule(LightningModule):
trans_1=trans_1, rotmats_1=rotmats_1, diffuse_mask=diffuse_mask
)
append = pd.DataFrame([[prot_traj_dir, sample_length]], columns=self.prot_df.columns)
if not os.path.exists(os.path.join(self.inference_dir, 'prot_df.csv')):
append.to_csv(os.path.join(self.inference_dir, 'prot_df.csv'), index=False)
else:
append.to_csv(os.path.join(self.inference_dir, 'prot_df.csv'), mode='a', header=False, index=False)
finish_sample_time = time.time()