Skip to content

Commit

Permalink
code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocamilloni committed Nov 1, 2024
1 parent 13b924e commit 163bbe5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:
- family-names: "Camilloni"
given-names: "Carlo"
title: "Multi-eGO"
version: beta.1
version: beta.4
date-released: 2023-10-24
url: "https://github.com/multi-ego/multi-ego"
preferred-citation:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Create a folder in which you want to run the random coil simulation. Copy the ``
python multiego.py --system $SYSTEM_NAME --egos rc
```
```multiego.py``` will then create an output directory in ```multi-eGO/outputs/${SYSTEM_NAME}_rc``` which provides the inputs for the random coil simulation.
The contents of the output folder are ```ffnonbonded.itp``` and ```topol_GRETA.top```. The former is the non-bonded interaction file and needs to be copied into the ```multi-ego-basic.ff/``` folder. The latter needs to be placed in the simulation root directory. We provide ```mdps``` simulation setup files tested with various multi-*e*GO setups in the ```multi-eGO/mdps``` folder. The order in which the simulations are run is as follows:
The contents of the output folder are ```ffnonbonded.itp``` and ```topol_mego.top```. The former is the non-bonded interaction file and needs to be copied into the ```multi-ego-basic.ff/``` folder. The latter needs to be placed in the simulation root directory. We provide ```mdps``` simulation setup files tested with various multi-*e*GO setups in the ```multi-eGO/mdps``` folder. The order in which the simulations are run is as follows:

```
1. ff_em.mdp
Expand Down Expand Up @@ -138,7 +138,7 @@ To setup a multi-*e*GO production simulation, you need to run ```multiego.py```
```
python multiego.py --system $SYSTEM_NAME --egos production --epsilon 0.3 --train md_ensemble
```
Here one sets the energy scale ε to 0.3 kJ/mol and trains the model from the ```md_ensemble``` data. The output directory will be ```multi-eGO/outputs/${SYSTEM_NAME}_production_e0.3_0.3``` and will contain the inputs for the production simulation. Again, the contents of the output directory are ```ffnonbonded.itp``` and ```topol_GRETA.top``` and need to be copied to the ```multi-ego-basic.ff/``` folder and the simulation root directory. The ```mdps``` files are the same except for the last step which is now ```ff_aa.mdp```.
Here one sets the energy scale ε to 0.3 kJ/mol and trains the model from the ```md_ensemble``` data. The output directory will be ```multi-eGO/outputs/${SYSTEM_NAME}_production_e0.3_0.3``` and will contain the inputs for the production simulation. Again, the contents of the output directory are ```ffnonbonded.itp``` and ```topol_mego.top``` and need to be copied to the ```multi-ego-basic.ff/``` folder and the simulation root directory. The ```mdps``` files are the same except for the last step which is now ```ff_aa.mdp```.

Happy simulating :)

Expand Down
5 changes: 5 additions & 0 deletions multiego.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def meGO_parsing():
args.root_dir = os.path.dirname(os.path.abspath(__file__))
multi_flag = False

# Check if no arguments are provided
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)

if args.config:
config_yaml = io.read_config(args.config, args_dict)
# check if yaml file is empty
Expand Down
6 changes: 3 additions & 3 deletions src/multiego/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def make_header(parameters):
now = time.strftime("%d-%m-%Y %H:%M", time.localtime())

header = f"""
; Multi-eGO force field version beta.1
; Multi-eGO force field version beta.4
; https://github.com/multi-ego/multi-eGO
; Please read and cite:
; Scalone, E. et al. PNAS 119, e2203181119 (2022) 10.1073/pnas.2203181119
Expand Down Expand Up @@ -698,7 +698,7 @@ def write_topology(
output_folder,
):
"""
Writes the topology output content into GRETA_topol.top
Writes the topology output content into topol_mego.top
Parameters
----------
Expand All @@ -721,7 +721,7 @@ def write_topology(
if write_header:
header = make_header(vars(parameters))

with open(f"{output_folder}/topol_GRETA.top", "w") as file:
with open(f"{output_folder}/topol_mego.top", "w") as file:
header += """
; Include forcefield parameters
#include "ffnonbonded.itp"
Expand Down

0 comments on commit 163bbe5

Please sign in to comment.