Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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_.

Expand All @@ -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*_.

Expand Down
5 changes: 4 additions & 1 deletion ipmof/interpenetration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import shutil
import time
import math
import yaml
from random import random
from glob import glob

Expand Down Expand Up @@ -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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think you can just do:

if sim_par['interpenetration_list']:

here.

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:
Expand Down
1 change: 1 addition & 0 deletions ipmof/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions settings/sim_par.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down