There are two kinds of defects: Equilibrium defects, and Non-Equilibrium defects. Self-assembled structures contain defects. Dislocations caused during the assembling of nanomaterials can majorly affect the final structure and in general defects are never completely avoidable. Current research on defects is focused on controlling defect density.[23] In most cases, the thermodynamic driving force for self-assembly is provided by weak intermolecular interactions and is usually of the same order of magnitude as the entropy term. In order for a self-assembling system to reach the minimum free energy configuration, there has to be enough thermal energy to allow the mass transport of the self-assembling molecules. For defect formation, the free energy of single defect formation is given by:
The enthalpy term,  does not necessarily reflect the intermolecular forces between the molecules, it is the energy cost associated with disrupting the pattern and may be thought of as a region where optimum arrangement does not occur and the reduction of enthalpy associated with ideal self-assembly did not occur. An example of this can be seen in a system of hexagonally packed cylinders where defect regions of lamellar structure exist.
If  is negative, there will be a finite number of defects in the system and the concentration will be given by:
N is the number of defects in a matrix of N self-assembled particles or features and  is the activation energy of defect formation. The activation energy, , should not be confused with . The activation energy represents the energy difference between the initial ideally arranges state and a transition state towards the defective structure. At low defect concentrations, defect formation is entropy driven until a critical concentration of defects allows the activation energy term to compensate for entropy. There is usually an equilibrium defect density indicated at the minimum free energy. The activation energy for defect formation increases this equilibrium defect density.