Skip to content

Commit

Permalink
Merge pull request #308 from UCL-CCS/update_md
Browse files Browse the repository at this point in the history
update ties_md interface
  • Loading branch information
adw62 authored Aug 3, 2022
2 parents ff450ad + 71c6cb9 commit 9036d59
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: ties20
channels:
- conda-forge
- adw62
dependencies:
- ambertools>=20.0, <22.0
- libgfortran
Expand Down
6 changes: 4 additions & 2 deletions examples/mol2_2ligands_MCL1/full_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#run ligand and complex simulations
legs = ['lig', 'com']
for leg in legs:
MD('./ties20/ties-l02-l03/{}'.format(leg), fast=True)
md = MD('./ties20/ties-l02-l03/{}'.format(leg), fast=True)
md.setup()
#md.run()

#run the analysis of these simulations
exp_data = {'ties20': {'ties-l02-l03': [0.0, 0.0]}}
MD.analysis(exp_data, legs)
md.analysis(exp_data, legs)
10 changes: 4 additions & 6 deletions ties/md.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os

from TIES_MD import TIES, cli
from ties_analysis.ties_analysis import Analysis
from ties_analysis.config import Config

from TIES_MD.ties_analysis import ties_analysis

class MD():
def __init__(self, sim_dir, sim_name='complex', fast=False):
Expand All @@ -18,7 +16,7 @@ def __init__(self, sim_dir, sim_name='complex', fast=False):
self.md.reps_per_exec = 1
self.md.total_reps = 3
self.md.global_lambdas = [0.00, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9, 0.95, 1.00]
self.md.sampling_per_window = md.sampling_per_window*0.5
self.md.sampling_per_window = self.md.sampling_per_window*0.5
self.md.update_cfg()

def run(self):
Expand All @@ -28,10 +26,10 @@ def setup(self):
self.md.setup()

def analysis(self, exp_data, legs, analysis_cfg='./analysis.cfg'):
ana_cfg = Config(analysis_cfg)
ana_cfg = ties_analysis.Config(analysis_cfg)
ana_cfg.simulation_legs = legs
ana_cfg.exp_data = exp_data
ana = Analysis(ana_cfg)
ana = ties_analysis.Analysis(ana_cfg)
ana.run()


Expand Down

0 comments on commit 9036d59

Please sign in to comment.