diff --git a/README.md b/README.md index 876f7ab..62bdd39 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,25 @@ IPMOF uses Python 3.5.1 with required libraries listed in requirements.txt file. You can install IPMOF by cloning the repository and running setup.py as follows: -`git clone https://github.com/kbsezginel/IPMOF.git` +```python +git clone https://github.com/kbsezginel/IPMOF.git +cd IPMOF +python setup.py install +``` -`cd IPMOF` +If you wish to use HPC capabilities you need to install other dependencies: -`python setup.py install` +```python +pip install -r requirements_hpc.txt +``` -If you wish to use HPC capabilities you need to install other dependencies: +For mathutils python package (used in rotation operations), additional installation might be necessary. -`pip install -r requirements_hpc.txt` +In linux the following dependency for mathutils can be installed by: +```python +sudo apt-get install python3-dev +``` ## Usage IPMOF reads structure files from the mof folder in root directory. @@ -47,7 +56,9 @@ fashion: _full_ > _uniq_ > _qnd_ > _dummy_. All list types except for _uniq_ all **To generate energy map type following in a command-line window:** -`python ipmof_energymap.py` +```python +python ipmof_energymap.py +``` By default this will create energy maps for each MOF file in _~/mof_ directory. The atom list and energy map are stored as a numpy array. This can be changed to a human readable format (yaml) by changing the _energy_map_type_ simulation parameter to _yaml_. @@ -59,7 +70,9 @@ Energy map is required only for the _passive_ MOF (should be in _~/energymap_) a **To test intepenetration type following in a command-line window:** -`python ipmof_interpenetration.py` +```python +python ipmof_interpenetration.py +``` Simulation summary, simulation parameters, and information on discovered structures will be exported to _~/results/*Structure1_Structure2*/results.yaml_. Methods to analyze results are included in _~ipmof/analysis.py_ library. The structures discovered will be exported to _~/results/*Structure1_Structure2*_. diff --git a/ipmof/interpenetration.py b/ipmof/interpenetration.py index 9fa0d69..33e675b 100644 --- a/ipmof/interpenetration.py +++ b/ipmof/interpenetration.py @@ -5,6 +5,7 @@ import shutil import time import math +import yaml from random import random from glob import glob @@ -377,7 +378,9 @@ def get_interpenetration_list(sim_par, sim_dir): Format: interpenetration_list = {'emap_path': [], 'emap_mof_path': [], 'ip_mof_path': []} """ - if sim_par['core_database']: + if sim_par['interpenetration_list'] is not None: + interpenetration_list = yaml.load(open(sim_par['interpenetration_list'], 'r')) + elif sim_par['core_database']: if sim_par['core_limit'] is not None: interpenetration_list = core_interpenetration_list(sim_dir, limit=sim_par['core_limit']) else: diff --git a/ipmof/parameters.py b/ipmof/parameters.py index cd32edb..fdb4608 100644 --- a/ipmof/parameters.py +++ b/ipmof/parameters.py @@ -21,6 +21,7 @@ 'energy_map_atom_list': 'uniq', # Atom list for energy map ('full', 'uniq', 'dummy', 'qnd') 'energy_map_type': 'numpy', # Energy map file format ('numpy' or 'yaml') 'self_interpenetration': True, # Test for homo-interpenetration or not + 'interpenetration_list': None, # Interpenetration list in yaml format 'report_structures': 10, # Number of min. energy structures to report in results 'export_structures': 1, # Number of min. energy structures to export 'export_format': 'cif', # Export structure file format diff --git a/settings/sim_par.sample.yaml b/settings/sim_par.sample.yaml index e8607eb..798de16 100644 --- a/settings/sim_par.sample.yaml +++ b/settings/sim_par.sample.yaml @@ -10,6 +10,7 @@ rotation_freedom: 30 try_all_rotations: false force_field: uff self_interpenetration: true +interpenetration_list: None energy_map_atom_list: uniq energy_map_type: numpy report_structures: 10