I wrote a program in Python to take an input file in the form of Ben's "bent" code and output geometry information. This geometry was used by a piece of software called "Gmsh" to generate the triangulated surface mesh of the CLC channel below.
The new boundary element code has been written to solve Poisson's equation over an unstructured triangulated surface represention an ion channel (or any other shape). Below are plots of energy profiles of a torus using the current iterative method and the new boundary element method with differing number of surface elements. The discrepancies are consistent with lack of curvature compensation code in the new method.
To generate lookup tables it was first necessary to generate a volume mesh. Gmsh is used to generate tetrahedra and the lookup data will be stored at the vertices of these. Below is the volume mesh of a torus generated by Gmsh.
In order to efficiently to extract values from a lookup table whose values are stored on an unstructured tetrahedral mesh a "bounding box tree" is generated. Bounding boxes are the smallest box (in x,y,z coordinates) that can envelope a given volume. A bounding box tree is a hierarchical structure of bounding boxes. Below is a representation of bounding boxes on the torus shown above.
The mesh for the CLC channel was produced and refined to match as closely as possible the channel shape used by Ben's "bent" code. The original radius data was used (not that used to generate lookup tables) as this produced better results with fixed charges present. Vestibules were added as they are present in the "bent" version.
It was found that there was some reasonable discrepancies when comparing the profiles for the boundary element and bent methods with fixed charges present. Without these the agreement is much better. There is a discrepancy which may be due to the lackThe mesh for the CLC channel was produced and refined to match as closely as possible the channel shape used by Ben's "bent" code. The original radius data was used (not that used to generate lookup tables) as this produced better results with fixed charges present. Vestibules were added as they are present in the "bent" version.
To concentrate the mesh in the channel a new kind of geoemetry was calculated which has large mesh elements on the outside and more refined ones in the channel.
The discrepancy between the original iterative method and the current 3D boundary element method is explained by a lack of "curvature compensation".
It was found that by refining the mesh where the fixed_charges are closest we could get a better match for the "bent" energy profile.
This plot shows some test cases each calculated with the original brown (F77) code and the new brownf90 code. The first two cases are for the glycine channel, the third is the clc channel and the fourth is the Na channel. The current and the error in the current is plotted for each case. From this we can see that the brownf90 code produces the sames results for the glycine channel as the brown code. It produces different results, however, for the clc channel and the Na channel.
The MSMS code which is distributed with the VMD package was used to generate a solvent accessible surface mesh of a Na channel. To use the boundary element method a membrane had to be attached. Code was written to cut out faces of the mesh which would be "in" the membrane. A membrane geometry was generated and attached to the mesh with some more locally written code.