← Indietro
Altro

Laboratory 5 Optimization

Altro di Molecular Modeling of Materials per il corso di Biomedical Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Molecular Modeling of MaterialsAltro

Informazioni sul documento

Cosa trovi in questo materiale

Altro di Molecular Modeling of Materials per il corso di Biomedical Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

Optimization In the case of N atoms interacting within a cluster (=finite set of atoms), we can model them with the Lennard Jones Potential. All the atoms here are assumed to be identical. Scipy includes also optimization package. There are a lot of methods. The more general ones involve minimization of N-dimensional functions. Some of them are the CG: Conjugate Gradient, and others we have seen in the previous theoretical lecture. Remember that both local or global minimization can be performed. The Global optimization uses dedicated functions. Jupiter Notebook notes First of all I need to define the function to be minimized. We first define the LJ potential function We call the function ULJ, where sigma and epsilon are set to 1 Note: the triple apices are called document strings: it documents what the function does. Next we define the function which computes the derivates of the LJ potentials for 2 atoms at distance r. Then, 2 additional functions are introduduced (ULJmany and its derivative) that are not for 2 atoms anymore, but for N atoms. As you can see, the argument is coords1D: the coordinates of the atoms stored in a N by 3 array, where x[i,0], x[i,1] and x[i,2] corresponds to the x,y and z coordinates. The energy is computed by calling the 2 atoms LJ function! Note the line which expresses x as a 1-dimensional array. (although we said that the coordinates are a N- by-3 matrix. We are attaching the columns together to obtain a 1D representation. This is done using the tool contained in scipy to flatten the array or viceversa. This is exactly what the shape tool does. The number of atoms N is obtained by taking the first dimension of coords1D and dividing it by 3, because coords1 is like: X Y Z Then, x is obtained by taking this array and reshaping it from…

Anteprima

Prima pagina del documento.

Prima pagina: Laboratory 5 Optimization