Commit a3fec975 authored by Claudia Canevari's avatar Claudia Canevari
Browse files

added some new regression tests for epsmap and blobby surf validation

parent e3d4f143
This diff is collapsed.
###############################################################################
###################### NanoShaper 0.3.1 Configuration file ###################
###############################################################################
Compute_Vertex_Normals = true
Save_Mesh_MSMS_Format = true
Load_Balancing = true
Print_Available_Surfaces = false
Example_Surface_Parameter = 2.0
# NOTE
# for big molecules consider reducing to 1.5 for limiting memory usage.
# if still memory usage is too high, remove accurate triangulation
# and enable status map
################################ Grid params ##################################
# Grid scale
Grid_scale = 1.0
# Percentage that the surface occupies with respect to the total grid volume
# default value is 90.0; in the case of very small molecules (e.g. fullerene) keep more margin
# (e.g. lower the value to 50%)
Grid_perfil = 90.0
# Input atoms xyzr file name
XYZR_FileName = 6xm4.xyzr
############################## Internal maps ##################################
# Enable/Disable build of epsilon (dielectric) map
Build_epsilon_maps = false
# Enable/Disable build of map for cavity detection and for a non analytical
# triangulation
Build_status_map = true
########################## Surface Type params ################################
# Possible values: skin,blobby,mesh,ses,example
Surface = blobby
# Apply final surface smoothing
Smooth_Mesh = false
# Number of total threads
Number_thread = 16
# Skin surface parameter [0.05,0.95]
# the extrema are possibly not numerically stable,
# the suggested range is [0.15,0.95]
# default value is 0.45
Skin_Surface_Parameter = 0.45
# Blobbyness value for the blobby surface [-0.5,-5.0]
# default value is -2.5
Blobbyness = -2.5
# Name of the input surface file used if mesh Surface is enabled or msms.
# In case of msms remove any extension, .face and .vert file will be
# automatically loaded.
# In case of mesh, .off and .ply files are supported
Surface_File_Name = triangulatedSurf.vert
######################## Surface Processing params ############################
# Enable or disable cavity detection together with the volume conditional
# filling of voids and cavities
Cavity_Detection_Filling = false
# It is the value of the minimal volume of a cavity to get filled if
# cavity detection is enabled.
# The default value is an approximation of the volume of the water molecule
# default value is 11.4, this is the approximate volume of a water molecule
# in Angstrom
Conditional_Volume_Filling_Value = 11.4
# If this flag is true, cavities where a sphere of Probe_Radius cannot fit,
# are removed.
# Use this feature when cavity detection is enabled to filter out bad shaped
# cavities whose
# volume is higher than Conditional_Volume_Filling_Value.
Keep_Water_Shaped_Cavities = false
# The radius of the sphere that represents a water molecule in Angstrom
# default value is 1.4 Angstrom
Probe_Radius = 1.4
# Enable accurate triangulation: if accurate triangulation is enable all points
# are sampled from the original surface. If disabled the points are not
# analytically sampled and an high memory saving can be obtained
# together with a 3x speed-up on ray casting if both epsmap is disabled
# MC phase will be slower because vertices are calculated on the fly
Accurate_Triangulation = true
# Perform triangulation using a single ray-casting process. Vertex data is
# inferred.
Triangulation = true
# Check duplicated vertices when reading
Check_duplicated_vertices = false
# If true save the status map. Enable this for cavity detection and
# visualization of the coloured FD grid
Save_Status_map = false
# Save Skin/SES in a PovRay file for ray-tracing.
# This is a purely graphics representation because the surface is not in
# a left handed system as it should in Pov-Ray
Save_PovRay = false
####################### Acceleration Data Structures ##########################
# Mesh Projection(3D)/Ray Casting (3D) acceleration grid
# Increase *_size to increase performance and memory usage.
# Increase *_cell if requested by NanoShaper
# default 100
Max_mesh_auxiliary_grid_size = 100
# default 250
Max_mesh_patches_per_auxiliary_grid_cell = 250;
# default 100
Max_mesh_auxiliary_grid_2d_size = 100
# default 250
Max_mesh_patches_per_auxiliary_grid_2d_cell = 250
# SES Projection(3D)/Ray Casting (3D) acceleration grid
# default 100
Max_ses_patches_auxiliary_grid_size = 100
# default 400
Max_ses_patches_per_auxiliary_grid_cell = 400
# defualt 40
Max_ses_patches_auxiliary_grid_2d_size = 40
# default 400
Max_ses_patches_per_auxiliary_grid_2d_cell = 400
# Skin Projection(3D)/Ray Casting (3D) acceleration grid
# default 100
Max_skin_patches_auxiliary_grid_size = 100
# default 400
Max_skin_patches_per_auxiliary_grid_cell = 400
# default 50
Max_skin_patches_auxiliary_grid_2d_size = 50
# default 400
Max_skin_patches_per_auxiliary_grid_2d_cell = 600
###############################################################################
......@@ -26,13 +26,11 @@ Grid_perfil = 90.0
# Input atoms xyzr file name
XYZR_FileName = 6xm4.xyzr
#XYZR_FileName = 1vsz.xyzr
#XYZR_FileName = 1crn.xyzr
############################## Internal maps ##################################
# Enable/Disable build of epsilon (dielectric) map
Build_epsilon_maps = false
Build_epsilon_maps = true
# Enable/Disable build of map for cavity detection and for a non analytical
# triangulation
......@@ -104,7 +102,8 @@ Check_duplicated_vertices = false
# If true save the status map. Enable this for cavity detection and
# visualization of the coloured FD grid
Save_Status_map = false
Save_Status_map = true
Save_eps_maps = true
# Save Skin/SES in a PovRay file for ray-tracing.
# This is a purely graphics representation because the surface is not in
......
......@@ -6,6 +6,7 @@ import json
import time
import tarfile
import shutil
import filecmp
class ns_test:
......@@ -33,6 +34,7 @@ class ns_test:
self.outmsg = ''
self.shapemsg = ''
self.valuemsg = ''
self.mapsmsg = ''
self.execmsg = ''
self.genmsg = ''
......@@ -49,10 +51,19 @@ class ns_test:
return True
def is_area_file(self,p_filepath):
name, ext = os.path.splitext(p_filepath)
if ext != '.txt':
return False
return True
if 'Areas' in p_filepath:
return True
return False
def is_epsmap_file(self,p_filepath):
if 'epsmap' in p_filepath:
return True
return False
def is_status_file(self,p_filepath):
if 'status' in p_filepath:
return True
return False
def read_vert(self,p_filepath):
......@@ -135,6 +146,8 @@ class ns_test:
compare the shapes and values between output and reference arrays
.OFF values
Area values
.VERT values
MAPS
:param p_file name of the file containing values
......@@ -193,6 +206,16 @@ class ns_test:
self.valuemsg = "{} {}".format(self.valuemsg, p_file)
self.failed = True
elif self.is_epsmap_file(p_file):
if not filecmp.cmp(ref_file_path,out_file_path,shallow=False):
self.mapsmsg = "{} {}".format(self.mapsmsg, p_file)
self.failed = True
elif self.is_status_file(p_file):
if not filecmp.cmp(ref_file_path,out_file_path,shallow=False):
self.mapsmsg = "{} {}".format(self.mapsmsg, p_file)
self.failed = True
elif self.is_area_file(p_file):
ref_areas = self.read_area(ref_file_path)
areas = self.read_area(out_file_path)
......@@ -339,6 +362,9 @@ class ns_test:
if self.valuemsg != '':
self.valuemsg = "Different values in files: {} ".format(self.valuemsg)
print(self.valuemsg)
if self.mapsmsg != '':
self.mapsmsg = "Different maps in files: {} ".format(self.mapsmsg)
print(self.mapsmsg)
if self.genmsg != '':
self.genmsg = "Generic Errors: {}".format(self.genmsg)
print(self.genmsg)
......
Supports Markdown
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