Skip to content

Commit

Permalink
os.sep rather than '\' or analysis_example.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SCMusson committed Jun 26, 2023
1 parent 070520c commit ceff082
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/analysis_example.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import torch

import os
from molearn.models.foldingnet import AutoEncoder
from molearn.analysis import MolearnAnalysis
from molearn.data import PDBData


print("> Loading network parameters...")

fname = 'xbb_foldingnet_checkpoints\\checkpoint_no_optimizer_state_dict_epoch167_loss0.003259085263643.ckpt'
fname = f'xbb_foldingnet_checkpoints{os.sep}checkpoint_no_optimizer_state_dict_epoch167_loss0.003259085263643.ckpt'
checkpoint = torch.load(fname, map_location=torch.device('cpu'))
net = AutoEncoder(**checkpoint['network_kwargs'])
net.load_state_dict(checkpoint['model_state_dict'])
Expand All @@ -29,8 +29,8 @@
# by defining the manual see and loading the dataset in the same order as when
#the neural network was trained, the same train-test split will be obtained
data = PDBData()
data.import_pdb('data\\MurD_closed_selection.pdb')
data.import_pdb('data\\MurD_open_selection.pdb')
data.import_pdb(f'data{os.sep}MurD_closed_selection.pdb')
data.import_pdb(f'data{os.sep}MurD_open_selection.pdb')
data.fix_terminal()
data.atomselect(atoms = ['CA', 'C', 'N', 'CB', 'O'])
data.prepare_dataset()
Expand Down

0 comments on commit ceff082

Please sign in to comment.