?

VFF Optimizer Project Documentation

Geometry Optimization Toolkit for atomistic hetero-nanoparticles via the Keating Valence Force Field. Includes an input structure generator and 3D viewer.

OVERVIEW
THEORY
MATERIALS
SHAPES
USAGE
PARAMETERS
TROUBLESHOOTING

What is the VFF Optimizer?

VFF Optimizer is a web-based tool for structural relaxation of semiconductor nanostructures using the Keating Valence Force Field method. It predicts how atoms rearrange in response to strain, interfaces, and surfaces.

What This Tool Does:
  • Relaxes atomic positions to minimize strain energy
  • Analyzes bond length distributions in heterostructures
  • Generates realistic nanostructure geometries (11 shapes × 20 materials)
  • Supports core-shell heterostructures with flexible core geometry
  • Real-time strain visualization with interactive slicing

Why Use VFF?

Problem: When you grow a nanostructure with different materials (e.g., CdS shell on ZnSe core), the lattice mismatch creates strain. Atoms don't sit at ideal crystal positions—they shift to minimize energy.

Solution: VFF calculates these shifts by treating bonds as springs. It's much faster than DFT (Density Functional Theory) while capturing essential elastic effects.

Typical Applications

  • Core-Shell Quantum Dots: CdSe/ZnS, CdS/CdSe — strain affects emission wavelength
  • Nanorods: CdSe rods with ZnS tips — strain influences growth direction
  • Heterostructure Interfaces: GaN/AlN, ZnO/MgO — strain affects band alignment
  • 2D Nanoplatelets: NEW CdSe platelets for narrow-band LEDs
  • Curved Shells: NEW Fortune cookie structures for curved photonics

Key Features

1. Advanced Structure Generator

11 Morphologies: Nanorods, wires, dots, platelets, tetrapods, tripods, hexapods, pyramids, tubes, curved shells, branched rods

20 Materials: II-VI and III-V semiconductors in both wurtzite and zincblende phases

Core Shapes: Spherical, cylindrical, or ellipsoidal cores for advanced heterostructures

2. Material System Presets

Dropdown selection from validated material database with automatic parameter loading. No manual typing required!

3. Real-Time Visualization

WebSocket-powered live updates: energy convergence, strain maps, 3D structure viewing

4. Heterostructure Validation

Automatic lattice mismatch calculation with warnings for incompatible combinations (>10% mismatch)

Important: This tool uses classical force fields, not quantum mechanics. It does NOT calculate:
  • Electronic structure or band gaps
  • Charge transfer or ionicity beyond equilibrium parameters
  • Chemical reactions or bond breaking
For electronic properties, use the relaxed structure as input for DFT calculations.

Keating Valence Force Field

The VFF method models crystals as networks of springs, balancing two types of deformation:

1. Bond Stretching Energy

Penalizes changes in bond length from the equilibrium value R₀.

Vstretch = (3α / 16R₀²) × (r² - R₀²)²

Where:

  • r = actual bond length between atoms i and j
  • R₀ = equilibrium bond length (material-specific)
  • α (alpha) = stretching force constant [N/m or eV/Ų]

Physical Meaning: Strong α means stiff bonds (hard to stretch). Fitted to elastic constants C₁₁ and C₁₂.

2. Bond Bending Energy

Penalizes deviations from the ideal tetrahedral angle (109.47°) between two bonds sharing an atom.

Vbend = (3β / 8R₀²) × (r⃗ij · r⃗ik - C)²

Where:

  • r⃗ij = vector from atom j to i
  • r⃗ik = vector from atom j to k (j is central)
  • C = -R₀²/3 = ideal tetrahedral dot product
  • β (beta) = bending force constant [N/m or eV/Ų]

Physical Meaning: Strong β means rigid bond angles. Fitted to elastic constant C₄₄ and phonon frequencies.

Total Energy

Etotal = Σ Vstretch + Σ Vbend

Sum over all bonds and all angle triplets. Optimization minimizes this energy using L-BFGS-B algorithm.

Why This Form?

Harmonic Approximation: Near equilibrium, potential energy surfaces are parabolic (Hooke's law). The quadratic form captures this.

Why (r² - R₀²)² not (r - R₀)²? Keating's original formulation uses squared bond lengths to match experimental elastic constants more accurately. It also naturally satisfies rotational invariance.

Anisotropy in Wurtzite Structures

Wurtzite crystals (CdS, GaN, ZnO) have hexagonal symmetry, making them anisotropic:

  • Basal bonds: In xy-plane (perpendicular to c-axis) — weaker, longer
  • c-axis bonds: Along z-direction — stronger, shorter

This tool automatically detects bond orientation and applies appropriate parameters.

Limitations

  • Small Strains Only: Breaks down at >10% strain (anharmonic effects ignored)
  • No Bond Breaking: Cannot model fracture or phase transitions
  • Surface Energy Neglected: Unrealistic for very small clusters (<2 nm)
  • Temperature = 0 K: No thermal vibrations (phonons)
When VFF Works Best: Moderate strain (<5%), nanostructures>3 nm, heterointerfaces with <8% lattice mismatch. For stronger strain or charge effects, use DFT.

Supported Materials

This tool now supports 20 semiconductor materials across both crystal structures:

II-VI Semiconductors (Wurtzite)

Material a [Å] c [Å] Bandgap [eV] Applications
CdS 4.137 6.714 2.42 Solar cells, LEDs
CdSe 4.299 7.010 1.74 Quantum dots, displays
CdTe NEW 4.57 7.47 1.50 Thin-film solar cells
ZnS 3.820 6.260 3.68 Phosphors, shells
ZnSe 3.996 6.546 2.70 Blue-green lasers
ZnTe NEW 4.27 6.99 2.26 Mid-IR detectors
ZnO 3.250 5.207 3.37 Piezoelectrics, sensors

III-V Semiconductors (Wurtzite)

Material a [Å] c [Å] Bandgap [eV] Applications
GaN 3.189 5.185 3.44 Blue LEDs, lasers
AlN 3.112 4.982 6.20 UV LEDs, HEMTs
InN NEW 3.540 5.703 0.70 IR detectors

Zincblende Materials

Material a [Å] Bandgap [eV] Applications
ZnS 5.410 3.68 Phosphors
ZnSe 5.668 2.70 Lasers
ZnTe NEW 6.104 2.26 Detectors
CdTe 6.482 1.50 Solar cells
InP 5.869 1.35 Telecom lasers
InAs 6.058 0.36 IR detectors
GaAs 5.653 1.43 High-speed electronics
GaP NEW 5.451 2.26 Red LEDs
AlP NEW 5.467 2.45 UV optoelectronics
AlAs NEW 5.660 2.16 HBTs, HEMTs

Material Selection Guide

Single Material (Homogeneous)

  • One composition throughout (e.g., pure CdS nanorod)
  • Strain only at surfaces due to undercoordination
  • Set Core Material to "None" in generator

Core-Shell (Heterogeneous)

  • Two materials (e.g., CdSe core / ZnS shell)
  • Large strain at interface if lattice mismatch
  • Must use same crystal structure (both wurtzite OR both zincblende)
  • Tool validates compatibility and warns if mismatch >10%
Core/Shell Mismatch [%] Quality Applications
CdSe / CdS 4.0% Excellent Quantum dots, displays
GaN / AlN 2.4% Excellent LEDs, HEMTs
InP / GaP NEW 7.1% Good Optoelectronics
ZnSe / ZnS 4.3% Excellent Blue lasers

High-Mismatch Combinations (Caution)

Core/Shell Mismatch [%] Risk Notes
CdSe / ZnS 12.0% High Common but defective — requires shell grading
GaN / InN 11.0% High Extreme strain — use quantum wells instead
ZnO / CdS 21.5% Severe Not recommended — epitaxial growth fails

Nanostructure Morphologies

This tool generates 11 different shapes with physically realistic rounded surfaces:

1. Nanorod

Geometry: Cylindrical rod with hemispherical caps along [0001] c-axis

Parameters: Length, Diameter

Applications: LEDs, lasers, sensors, polarized emission

Typical Size: L=50-200 nm, D=10-50 nm, aspect ratio 3-10

2. Nanowire

Geometry: Ultra-thin rod (diameter <50 Å)

Parameters: Length, Diameter (<50 Å enforced)

Applications: Field-effect transistors, photodetectors, single-photon sources

3. Quantum Dot

Geometry: Spherical or ellipsoidal 0D structure

Parameters: Diameter, Ellipticity (c/a ratio)

Applications: Displays (QLED), bioimaging, solar cells

Size Regime: 2-10 nm for strong quantum confinement

4. Nanoplatelet NEW

Geometry: 2D flat rectangular sheet with rounded edges

Parameters: Lateral Size, Thickness

Applications: Narrow-band LEDs (FWHM <10 nm), waveguides, lasing

Unique Feature: Thickness controlled at monolayer precision (3-10 ML typical)

Growth: Colloidal synthesis with oriented attachment

Reference: Ithurria & Dubertret, J. Am. Chem. Soc. 130, 16504 (2008)

5. Tetrapod

Geometry: Four arms along tetrahedral <111> directions (109.47° angles)

Parameters: Arm Length, Arm Diameter, Core Size

Applications: Solar cells (charge separation), mechanical reinforcement

6. Tripod

Geometry: Three arms at 120° in xy-plane + one vertical

Applications: Self-assembly, oriented film growth

7. Hexapod

Geometry: Six orthogonal arms along ±x, ±y, ±z

Applications: Photocatalysis (high surface area), 3D scaffolds

8. Pyramid

Geometry: Hexagonal pyramid with {101̄1} or {101̄3} facets

Parameters: Base Diameter, Height

Applications: Plasmonic coupling, directional emission

NOTE: Only shape with intentionally SHARP edges for plasmonic applications

9. Nanotube

Geometry: Hollow cylindrical tube with rounded end caps

Parameters: Length, Outer Diameter, Wall Thickness

Applications: Gas sensing, Li-ion batteries, field emitters

Geometry: Curved saddle shell (hyperbolic paraboloid)

Parameters: Diameter, Curvature (0.2-0.8), Wall Thickness

Applications: Curved photonics, mechanical metamaterials, strain-engineered bandgaps

Unique Feature: Non-zero Gaussian curvature creates directional optical properties

Mathematical Form: z = k × (x²/a² - y²/b²) — saddle surface

Reference: Schreiber et al., Nano Lett. (2011) — Curved CdS nanostructures

11. Branched Rod

Geometry: Main rod with lateral branches

Parameters: Main/Branch Length & Diameter

Applications: Enhanced light absorption, hierarchical assemblies

Surface Rounding: Except for pyramids, all shapes have ROUNDED surfaces to match experimental TEM observations. Sharp edges have high surface energy and are removed during growth. This is a critical feature for physical realism.

Step-by-Step Workflow

Option 1: Upload XYZ File

  1. Prepare XYZ file with format:
    N_atoms
    Comment line
    Element X Y Z (one line per atom)
  2. Click UPLOAD FILE tab
  3. Select .xyz file
  4. Preview structure in 3D viewer (rotate with mouse)
  5. Optionally adjust parameters via ⚙️ Configuration button
  6. Click START OPTIMIZATION

Option 2: Generate Structure IMPROVED

  1. Click GENERATOR tab
  2. Select shape from dropdown (11 options including NEW platelet & cookie)
  3. Configure dimensions based on shape type
  4. Choose Shell Material from dropdown:
    Now with convenient material presets — no manual typing!
  5. Optionally enable Core Material:
    • Select from same dropdown (20 materials)
    • Choose core shape: Sphere, Rod, or Ellipsoid
    • Set core diameter and position (centered or off-center)
  6. Click GENERATE & PREVIEW
  7. Inspect structure, then START OPTIMIZATION

During Optimization

  • Energy Chart: Real-time convergence monitoring (should decrease smoothly)
  • Console Log: Detailed status messages with emoji indicators
  • Strain Plots: Live updates every ~1.5 seconds
  • Cancel Button: Responsive termination (closes Celery worker)

After Completion

  1. Status changes to COMPLETE
  2. Click Download Result for optimized XYZ
  3. Switch to 3D tab to compare input vs output
  4. Analyze strain plots for interface quality assessment

Interpreting Results

Bond Length Plots

  • Scatter above reference line: Tensile strain (stretched bonds)
  • Scatter below reference line: Compressive strain (compressed bonds)
  • Broad distribution: Large strain gradients (interface effects)
  • Tight cluster near reference: Well-relaxed, low strain

Energy Convergence

  • Smooth decrease: Good convergence
  • Oscillations: May need tighter tolerance
  • Plateau: Converged (gradient close to zero)
Typical Convergence: 100-500 iterations, 1-5 minutes on standard hardware

Configuration Parameters

Optimization Settings

Max Iterations Default: 1000 Range: 500 - 5000 Maximum optimizer steps
Tolerance (xtol) Default: 10⁻³ Range: 10⁻² - 10⁻⁵ Convergence threshold
Max Bond Default: 2.8 Å Range: 2.5 - 3.5 Å Neighbor search cutoff

Shape Parameters (Examples)

Nanorod Length, Diameter Typical: 112 Å, 45 Å
Quantum Dot Diameter, Ellipticity Typical: 40 Å, 1.0
Nanoplatelet NEW Lateral Size, Thickness Typical: 80 Å, 15 Å
Fortune Cookie NEW Diameter, Curvature, Wall Typical: 60 Å, 0.5, 8 Å
Tetrapod Arm Length, Arm Diameter, Core Typical: 80 Å, 30 Å, 20 Å

Core Geometry NEW

For heterostructures, choose core shape:

  • Sphere: Standard quantum dot core
  • Rod: Cylindrical core (rod-in-rod) — extends along z-axis
  • Ellipsoid: Elongated core with adjustable ellipticity (c/a ratio)

Common Issues & Solutions

Problem: "No bonds detected"

Cause: Max bond cutoff too small

Solution: Increase Max Bond to 3.0-3.5 Å in Configuration

Problem: High lattice mismatch warning

Cause: Selected materials have >10% lattice constant difference

Solution:

  • Choose better-matched pair (see Materials tab)
  • If intentional, click "Override & Continue" button
  • Expect high defect density and strain in results

Problem: Optimization not converging

Solution:

  • Increase Max Iterations to 2000-5000
  • Relax Tolerance to 10⁻²
  • Check for unrealistic geometry (overlapping atoms)

Problem: "Generated empty structure"

Cause: Dimensions too small for lattice constant

Solution: Increase all dimensions by 30-50%

Problem: Task limit reached (10 concurrent)

Cause: Session has 10 running/queued tasks

Solution:

  • Wait for tasks to complete
  • Cancel unwanted tasks
  • Close browser tab (auto-cancels associated task)

Performance Tips

Speed Up Optimization

  • Reduce atoms: Use smaller structures for testing (<500 atoms)
  • Relax tolerance: xtol=10⁻² converges faster than 10⁻⁴
  • Lower max iterations: For quick checks, try maxfun=500
  • Simplify shape: Spheres/rods faster than tetrapods

Memory Issues (Large Structures)

  • Structures >5000 atoms may exceed memory limits
  • Reduce generator size if getting memory errors
  • Close other browser tabs to free RAM
  • For production runs on very large systems, use local installation

When to Use VFF vs Other Methods

✅ Use VFF When:

  • Studying strain distributions in heterostructures
  • Quick structural relaxations (minutes not hours)
  • Exploring many geometry variations (parametric sweeps)
  • Moderate strain levels (<8% lattice mismatch)
  • Elastic properties are main concern

❌ Don't Use VFF When:

  • Need electronic structure (band gaps, wavefunctions) → Use DFT
  • Chemical reactions or bond breaking → Use DFT or MD
  • Extreme strain (>10%) → Use DFT with hybrid functionals
  • Temperature effects critical → Use molecular dynamics
  • Ionic/metallic materials → VFF designed for covalent bonds

Getting Help

Still stuck? Check these resources:
  • Console Log: Bottom panel shows detailed error messages
  • Browser Console: Press F12 to see JavaScript errors
  • GitHub Issues: Report bugs with example XYZ file
  • Literature: Keating (1966) Phys Rev 145, 637 - Original VFF paper

Validation & Accuracy

How Accurate is VFF?

Property VFF Error Comparison
Bulk elastic constants ~5% Fitted, so very accurate
Surface relaxation ~10-15% DFT more accurate
Interface strain ~8% Good for <5% mismatch
Phonon frequencies ~10% Acoustic modes good

Validation Checklist

To verify your results make sense:

  • Energy Check: Final energy should be lower than initial
  • Bond Lengths: Should cluster around R₀ ± 5%
  • Symmetry: Homogeneous structures should show symmetric strain
  • Interface: Strain should be highest at core-shell boundary
  • Surface: Outermost atoms may have longer/shorter bonds (undercoordinated)
Publication Note: If using VFF results in research papers, cite:
  • P.N. Keating, Phys. Rev. 145, 637 (1966) - Original VFF
  • R.M. Martin, Phys. Rev. B 1, 4005 (1970) - Parameter fitting
  • This tool: Provide GitHub link and version
Always cross-check critical results with DFT for publication.

Copyright © 2026 Dr. Felix Sébastien Bourier. All rights reserved.