Atomic Blender (PDB/XYZ)¶
The Atomic Blender (PDB/XYZ) add-on imports atomic structures
(molecules, crystals, clusters, particles, surfaces, etc.), which are described in
.pdb) and XYZ files (
.xyz) (Import PDB/XYZ). The add-on reads the coordinates of
all atoms in the PDB/XYZ file and represents the atoms as balls in the Blender world.
Also the sticks, which are described in PDB files only, can be shown if the sticks are listed in the PDB file.
For the import, many options can be chosen, which allow representing the atoms and sticks in different ways.
With help of several tools in the Atomic Blender Utilities panel, the atomic structures can be modified
after the import. Note that the coordinates of selected atomic structures in the Blender 3D world
can also be exported into PDB/XYZ files.
Atomic Blender (PDB/XYZ) is interesting for scientists, who want to visualize their atomic structures described in PDB or XYZ files with Blender. Thanks to Blender, fancy graphics of molecules, crystal structures, surfaces, nanoparticles, clusters and complex atomic arrangements can be obtained. Such graphics meet the standards of top-level journals, which have an high impact factor. See Examples at the end of this page.
Info about PDB and XYZ
Many molecules can be downloaded from the RCSB site (go to 'Download').
A list of software that deals with PDB in different ways can be found on the RCSB site. There also is Vesta, ASE and all the quantum chemical calculators used in research, which can create or even calculate atomic structures and store them in PDB/XYZ files.
Defects in an Atomic Structure
If you want to show defects like vacancies in an atomic structure, use an 'X' for the element name in the PDB or XYZ file. A defect is shown in the form of a cube.
Camera & Lamp¶
A camera and/or a light source are placed into the 3D world. Both are placed such that the entire atomic structure can be well seen by the camera with enough light from the light source.
Object to Origin (PDB)¶
The atomic structure is placed into the origin (0.0, 0.0, 0.0) of the 3D world.
Object to Origin (XYZ)¶
Either in only the first or in all frames, the atomic structure is put into the origin (0.0, 0.0, 0.0) of the 3D world.
- Type of
Choose either NURBS, Mesh or Metaballs for the atoms. For option Mesh the Azimuth and Zenith values can be chosen. Meta balls can lead to some fancy effects: for instance, if enough large, their shapes melt together showing some kind of surface effect.
- Scaling Factors
The atom radii as well as the distances between the atoms can be scaled by a simple factor.
The type of atom radius (atomic, van der Waals or as specified in the custom data file [predefined]) can be chosen.
Sticks/Bonds (only PDB)¶
- Use Sticks
Use sticks or not.
In general, the options Sector and Radius determine the precision and dimension of the sticks, respectively. Option Smooth always means that a Smooth operator is applied on the sticks. Option Color means that the stick is divided into two parts, showing the colors of the respective two atoms which it connects.
- Instancing Vertices
The sticks of one element are put into one instancing vertices structure and the sticks appear as cylinders. The instancing vertices structure makes the displaying and loading of many sticks relatively fast (Separate Atoms for more info). Options Unit is the length of a unit (a small cylinder): several of such units are put together forming actually the stick (cylinder). The longer the unit length is the less is the number of such units and thus the faster is the displaying. However, if the unit length is too long the stick becomes eventually longer than the bond length, which the stick will actually represent. This then creates some overlapping effects. Option Bonds displays apart from single also double, triple, etc. bonds whereas option Distance is the corresponding bond distance measured in stick diameter.
The skin and subdivision modifiers are used to build the sticks. This gives a nice network of sticks, which can be used to show, e.g. only the bonds of the structure (delete the atoms before!). Options SubDivV and SubDivR are parameters of the subdivision operator. If option Smooth is activated, the initial squarish profile of the sticks changes to a more circular one. Note that if this option is chosen, there is only one object representing all sticks.
Normal cylinders are used. For each bond, one individual cylinder is used. If option One Object is activated, about No sticks are joined into one mesh object. This makes displaying the sticks very fast. However, individual sticks do not exist anymore.
Frames (only XYZ)¶
- Load All Frames
Load only the first or all frames.
- Skip Frames
Skip and load only each n-th frame. This is quite useful for large data where it might be sufficient to show only each 4th frame.
Show a specific number of frames per key. Many frames in a key lead to a more fluid presentation.
The number of atoms in a frame has to be the same for all frames!
Atomic Blender Utilities Panel¶
The Atomic Blender Utilities panel makes your life easier during manipulating atoms of imported structures.
Custom Data File¶
A separate custom data file containing all types of radii and colors of the atoms can be loaded. Such an option is useful when it is desired to use predefined values for radii and colors. An example can be downloaded from here: Custom data file.
The custom data file is an ASCII file, which can be duplicated and modified by the user.
The radius and/or color of the atoms can be permanently changed as follows:
Open the ASCII file with a standard text editor, search the name of the atom
and change the radius (
Radius used). Do the same with the RGB values for the color.
The value RGBA(1.0, 1.0, 1.0, 1.0) corresponds to white and RGBA(0.0, 0.0, 0.0, 1.0) is black.
Note that the last value of a color tuple is the alpha value of the color.
Inside Blender, the data file needs to be loaded first. The colors and radii are changed after executing Apply. Note that only selected atoms are changed.
This is to measure the distance of two objects in Object Mode but also in Edit Mode. The unit is Ångström.
Change Atom Size¶
- Type of Radii
With this selector the type of radii can be chosen. Either one uses Predefined, Atomic or Van der Waals radii. The default values for Predefined radii are the Atomic radii.
For option Ionic radii, the charge state can be chosen and the radii of selected objects are instantaneously changed. Select one type of atom (e.g. only all hydrogen ones) and then apply the charge state. Changes only apply if a charge state of an atom is available.
- Radii in pm
All radii of a specific type of atom can be manipulated. Type in the name of the atom (e.g. 'Hydrogen') and choose the radius in picometer.
- Radii by Scale
This modifies the radii of all atoms with one scaling factor. Type in the scaling factor and increase or decrease the size of the radii by using the Bigger or Smaller button, respectively.
Change Stick Size¶
The diameter of the sticks are changed. The buttons Bigger and Smaller allow increasing or decreasing the diameter, respectively. The scale factor determines, how strong the change of diameter will be. By using the Outliner, one can apply these operators on only a selection of sticks (e.g. only the sticks of the hydrogen atoms). Note that changes only apply if the sticks are individual objects, e.g. single cylinders or if the sticks are described in instancing vertices structures.
Change Atom Shape¶
It is possible to change the shape (sphere, cube, icosphere, etc.) and material of the atoms. First, select your atoms in the 3D Viewport or the Outliner.
Choose the shape in the first selector.
Choose one of the materials in the second selector. The materials are only examples, further refinements can be done in the Materials tab of the Properties.
Here, you can choose an object with a special shape, material, etc. Such objects are quite nice to represent defects in atomic structures. When choosing such a special object, you cannot anymore separately choose the shape and material from above. In the Objects and Materials tabs of the Properties further changes can be done.
After all, push the Replace button. The shape and/or material of all selected atoms are then changed. This option works for objects and instancing vertices object structures.
If you want to have the default values (NURBS spheres and specific element colors and sizes) of selected atoms push the Default button.
When structures are imported via the PDB or XYZ importer, the atoms are put into a so-called instancing vertices structure, somewhat into 'groups' of elements (e.g. all hydrogen atoms form one instancing vertices structure). In the Edit Mode of Blender, single atoms can be deleted or displaced by modifying the position of the vertices. However, they are always a part of the structure and are not independent objects. Sometimes one would like to mark a single atom or replace an atom by something different: for instance, imagine you have a NaCl cube where you would like to replace an atom by an atomic defect in form of a ball with a different color.
To separate single atoms, one needs to select the atom (vertices) first in the Edit Mode. In the Atomic Blender Utilities panel, the Object selector and the Separate button appear at the bottom. If the selector remains on Unchanged the type of object (NURBS, mesh, meta) and its properties will not be changed upon separation. If desired also an other type of object can be chosen, which then replaces the standard type of object.
After having chosen the type of object, use button Separate Atoms to separate the selected atoms:
the atoms are then single, new objects, which can be manipulated in any way.
They appear in the Outliner and carry the suffix
Converting All Atoms of an Instancing Vertices Structure to Real Independent Objects
Do the following: Select the whole atomic structure with the mouse then use 实例独立化. With this you produce real independent objects! In the Outliner delete the remaining instancing vertices structures, named like "Carbon", "Hydrogen", etc.