{'fraction_non_alphanumeric': 0.04143103024342267, 'fraction_numerical': 0.012048192771084338, 'mean_word_length': 4.899202320522117, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 4, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SurfStamp: 3D Printer Compatible Molecular Surface Representation

SurfStamp is an application that is used to generate textures for surface models of proteins. The textures contain information about surface residues and the information is drawn directly on the 3D object of the models. This approach is more intuitive than the labeling functions that most three-dimensional (3D) structure viewers use to show residue information. Therefore, the use of this application enables researchers, readers, or audiences to easily determine which residues are contributing the surface they are focusing on. Availability The application is provided under the open-source Apache License Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0). The application and source code are available from https://github.com/yamule/SurfStamp-public/releases.


Introduction
Since visualization of protein structures in 3D space is one of the fundamental ways to analyze properties and function of proteins, various techniques have been developed and are now in widespread use; e.g., tube models, ball-and-stick models, surface models, and so forth (Gu and Bourne, 2009). Among them, molecular surface model is one of the more important techniques; because the properties of the surface regions determine their binding affinities to other molecules (e.g. small chemical compounds, DNAs or other proteins) and these affinities are strongly related to the functions of proteins.
For this reason, popular 3D structure visualization software products such as PyMOL (http://www.pymol.org/), VMD (Humphrey, et al., 1996), and JMol (http://www.jmol.org/) each have functions that can be used to construct molecular surface models. Using these software products, researchers can see protein shapes and interesting regions such as cavities, hydrophobic regions, or charged clusters, which will expand their knowledge and provide clues for further experiments.
However, when examining surface models, it is often difficult to see which residues contribute to the regions under examination. While most molecular visualization software is capable of adding labels that represent residues, those labels often need manual rearrangement in order to make them understandable when they are shown with a surface.
In this paper, I introduce SurfStamp, a software tool for generating textures which show residue types and numbers on a surface model. Using this application, residue information is drawn directly on the surface object, which makes it easy to understand which residues are contributing to the regions of interest. In addition, since the residue information is included in a 3D object, either as paintings on the object or as part of the object, it can be utilized in 3D printing. Therefore, it is hoped to contribute to many scenes in research and pedagogy (Da Veiga Beltrame, et al., 2017).

Work flows
The work which SurfStamp does is quite simple. It can be broken down into 5 or 6 steps as follows.

Surface model generation
SurfStamp creates models using the similar approach of molecular surface mode of EDTSurf (Xu and Zhang, 2009), however, the integrity of the algorithm has not been tested. Users can import surface models created by other popular software products such as EDTSurf or PyMOL(Schrodinger, 2015).

Grouping faces (polygons)
All faces in those geometries are grouped according to their nearest residues. The distances between the center point of each face and any atoms of residues are used.

Topology validation
The topologies of grouped faces are checked. When the default setting is used, each group is separated into two groups heuristically if there are large areas that would not be seen from one side. If there are loop structures such as tori, which cause failures of UV unwrapping, those structures are removed. Structures such as sharp hills are also removed because they result in extremely skewed textures.

UV unwrapping
The faces are unwrapped onto a two-dimensional (2D) plane and the texture coordinates are decided.

Texture creation
The unwrapped faces are then painted according to the coloring scheme, after which text showing the residue types and numbers are placed inside the unwrapped textures. If the "-extrude" option is not present, the process stops here and result files are created.

Extrusion
With the "-extrude" option (extrusion mode), SurfStamp doesn't create texture files. It extrudes residue information from surface model as solid objects using the texture data created in step 5.

Coloring scheme
When the default setting is in place, a coloring scheme similar to ClustalX (Thompson, et al., 2002) is used. The Hydropathy index (Kyte and Doolittle, 1982) and Charge (Zimmerman, et al., 1968) extracted from AAIndex Database (Kawashima, et al., 2008) are provided as presets. The CPK coloring scheme (Corey and Pauling, 1953;Koltun, 1965), B-factor or occupancy columns can be used for atom, too. However, it should be noted that users can apply their own original coloring schemes by using a simple script (the details are written in the readme.txt file provided with the application).

Output file format
The default mode of SurfStamp produces 3D graphics files in .obj and Material library (.mtl) formats (https://en.wikipedia.org/wiki/Wavefront_.obj_file#Material_template_library), while texture image these formats are widely used in the 3D or 2D graphics field, they are supported by most 3D or 2D graphics software applications.
(https://www.w3.org/TR/SVG/), which can be processed with vector draw software such as Inkscape (https://inkscape.org/). Using this format (and its related software), users can change the texts, fonts, In extrusion mode, it exports objects in binary STL format.

Additional features
SurfStamp can produce ball-and-stick molecule models. This feature was added to allow researchers to determine whether a molecular surface has been successfully created. (Since some visualization software produce 3D objects according to its camera position, the coordinates of produced objects sometimes differ from coordinates of atoms.) Note, however, in addition to this debugging purpose, the feature is also useful for showing the positions of ligands, as can be seen in Fig. 1.

Running, copying, and distributing
I coded SurfStamp entirely in Java language and did not use any external libraries. As a result, it can be run in any operating system (OS) as long as Java VM is installed. In addition, since I provide this software under the open-source Apache License version 2.0 (http://www.apache.org/licenses/LICENSE-2.0), anyone can use, modify, and distribute this software freely as long as they follow the license term. Figure 1 shows a SurfStamp output example applied against the Galectin carbohydrate recognition domain (CRD), 3ZSJ (Saraboji, et al., 2012) molecule. As you can see, the surface consisting of residues, TRP181, GLU184, HIS158, and so forth, that are interacting with the beta-lactose shown in the ball-and-stick model.

Conclusion
Since SurfStamp provides intuitive representations of molecular surfaces, the contents made with this application will be useful in usual research, education, creating figures in academic papers, presentations, and so forth. In addition, since a generous license policy has been adopted, and since the application lacks significant platform dependencies, it can be bundled with other software and can be included in web services. As a result, SurfStamp can be expected to increase the power of molecular visualization techniques, and thereby facilitate research and education.  (Thompson, et al., 2002) coloring scheme was used. Beta-lactose is shown as a ball-and-stick model with green carbon and red oxygen atoms. The rendered image was created using an in-house .obj viewer, which uses 3D graphics library Three.js (http://threejs.org/). (B) Focused image of the 3ZSJ beta-lactose binding site. The structure was created with options; -tile -font_size 24 -nosep, which would be suitable for 2D images in manuscripts. Figure 2. An example 3D printed model created with the "-extrude" option using 3D object made by