MJLMills / rhorix

Python 3.3 Blender Add-On for Importing QCT Data
Other
1 stars 1 forks source link

Add vdW radius dictionary #12

Closed MJLMills closed 9 years ago

MJLMills commented 9 years ago

Nuclear attractors should be differently sized according to element. The relative sizes can be based on vdW radii of the atoms. A general scale factor should also be defined to size them relative to the whole scene.

MJLMills commented 9 years ago

Do this by adding a dictionary just like for the colors.

MJLMills commented 9 years ago

Will probably need a scaling constant for the CPs separate from the nuclei.

MJLMills commented 9 years ago

From the old GUI:

public static float lookUpRadius(String name) { float radius = 2.0f; float[] radii = {1.72f, 1.88f, 1.85f, 1.66f, 1.85f, 1.70f, 1.58f, 1.75f, 1.40f, 1.47f, 1.87f, 1.20f, 1.40f, 1.55f, 1.98f, 1.93f, 2.75f, 2.02f, 1.82f, 1.73f, 1.55f, 2.27f, 1.54f, 1.63f, 1.52f, 1.80f, 2.02f, 1.63f, 1.72f, 1.80f, 1.90f, 2.10f, 2.17f, 2.06f, 1.96f, 1.86f, 2.16f, 1.39f, 0.5f}; String[] types = {"Ag", "Ar", "As", "Au", "Br", "C", "Cd", "Cl", "Cu", "F", "Ga", "H", "He", "Hg", "I", "In", "K", "Kr", "Li", "Mg", "N", "Na", "Ne", "Ni", "O", "P", "Pb", "Pd", "Pt", "S", "Se", "Si", "Sn", "Te", "Tl", "U", "Xe", "Zn", "ZZ"}; for(int i=0; i<radii.length; i++) { if (types[i].equalsIgnoreCase(name)) { radius = radii[i]; } } return radius; }

MJLMills commented 9 years ago

This is now in the code but the data is not used. Need to alter sphere size in the method that makes CP spheres.

MJLMills commented 9 years ago

This was done by adding the size to the sphere creation method.