Commit 85831804 authored by abbasaa's avatar abbasaa
Browse files

updated readme

parent 7a0fc402
# UPDATED INSTRUCTIONS (OLD)
# Ion Channel Mesh Generation Project
#### Required Packages
1. `fenics`
......@@ -7,38 +7,45 @@
Make sure relative to project dir, tetgen's rel path is ./tetgen/tetgen. Similarly for TMSmesh. Make sure fenics is downloaded or active python3 install (venv or conda env or global install)
#### Usage:
Makefile dependy tracking is faulty so make sure to make clean whenever updating source files
Links to each package's site below:
1. `make clean`
2. `make main`
3. // check that config.txt is configured correctly (1mag's membrane range is -6,11 btw)
4. ./main
5. // check pvd file to make sure they look ok
# Mesh Generation Project
### Notes
1. `memGen.cpp` can be tested with `/examples/box5.poly` by running it with tetgen flags `./tetgen -An` or `./tetgen -Anq4.0` (larger, higher quality mesh) and using tetgen's output files.
2. `splitMesh.py` can be tested with `/examples/output.xml` by moving the `.xml` file into the same directory as `splitMesh.py` and running it as described below.
3. `splitMesh.py` can also be tested with the output from `memGen.cpp` by ensuring that the output filename from `memGen.cpp` aligns with line 2 in `splitMesh.py`
## faceGen.cpp, face.h
- `fenics`: https://fenicsproject.org/download/
- `tetgen`: https://www.wias-berlin.de/software/index.jsp?id=TetGen
- `TMSmesh`: http://lsec.cc.ac.cn/~lubz/Meshing.html
### Usage:
#### Usage:
1. FIXME
First, ensure that `fenics` has been properly installed by running the command `python3 -c "import fenics"`. If no errors are thrown, the installation was successful.
## memGen.cpp
This file takes in .node, .ele, and .neigh files output from Tetgen and separates the cell membrane from the rest of the mesh.
Next, ensure that the compiled `tetgen` binary has been named `tetgen` and moved into the folder `/tetgen/`.
##### Usage:
1. `g++ -O3 memGen.cpp`
2. `./a.out <input .node file> <input .ele file> <intput .neigh file> <output .xml filename>`
Lastly, move the `TMSmesh` executable into the folder `/TMSmesh/` and set its executable permissions with `chmod +x <executable name>`. If on Linux, use the executable name `TMSmesh` and if on Mac, use the executable name `TMSmesh2`.
## splitMesh.py
This file takes an input file `output.xml` (filename can be changed on line 2 of `splitMesh.py`), and outputs `protein.pvd`, `solvent.pvd`, `membrane.pvd` files which can be opened in Paraview.
Makefile dependency tracking is faulty so make sure to `make clean` whenever updating source files
#### Usage:
1. `python splitMesh.py`
#### Required Packages:
1. `fenics`
\ No newline at end of file
1. `make clean`
2. `make main`
3. Move desired protein .pqr file to `/pqr/` folder
4. `cd main`
5. Set configuration settings in config.txt
6. `./main`
7. Output files are `/main/membrane.pvd`, `/main/protein.pvd`, `/main/solvent.pvd`
### Configuration Settings
| Parameter | Type | Description |
| ------------- | ------------- | ------------- |
| input_file | <filename.(pqr or off)> | Input filename for the protein mesh. Can be in .pqr format (converted to .off with TMSmesh) or .off format |
| poly_file | <filename.poly> | Filename for intermediate .poly file of surface mesh, stored in `/poly/` and used by `tetgen` |
| surface_membrane_density | \<float> | Specifies the density of additional points inserted for the bottom and top of membrane mesh. |
| box_length(x) | \<int> | Specifies half box length in the x-dimension |
| box_width(y) | \<int> | Specifies half box width in y-dimension |
| top_box_height | \<int> | Specifies height of the box above membrane |
| bottom_box_height | \<int> | Specifies height of box below membrane |
| membrane_top_height | \<float> | Specifies z value for top of membrane |
| membrane_bottom_height | \<float> | Specifies z value for bottom of membrane |
| offset | \<int> | Specifies width of connective layer between membrane and top and bottom of the box mesh |
| tmsmesh_density_value | \<float> | Relate to the surface mesh density generated by TMSmesh. When this reduces,the density increases |
| tmsmesh_decay_rate | \<float> | Decay rate in the Gaussian surface used by TMSmesh |
| tmsmesh_isovalue | \<float> | Isovalue in the Gaussian surface and controls the volume enclosed by the Gaussian surface |
| tetgen_quality_q | \<float> | Specifies minimum radius-edge ratio in final volume mesh. Set to 0 for no quality constraint. |
| tetgen_quality_a | \<float> | Maximum volume constraint. No tetrahedra with volume larger than this value would be generated. Set to 0 for no volume constraint. |
| verbose | \<true or false> | Sets whether program is run verbose |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment