Example: Learning Atom-based Parameters from an Ensemble of Structures

The learn statement is used to derive equilibrium geometries and energy constants simultaneously from a thermal ensemble of ten coordinate files:
        {*Only the active energy terms are affected by the learn statement.*}
flags exclude * include bonds angles dihedrals impropers end

                                           {*Initiate the learning process.*}
   learn initiate sele=(all) mode=statistics end

                                {*Loop through the ensemble of coordinates.*}
for $filename in ( "a1.pdb" "a2.pdb" "a3.pdb" "a4.pdb" "a5.pdb" 
                   "a6.pdb" "a7.pdb" "a8.pdb" "a9.pdb" "a10.pdb" )
    loop main

    coordinates @@$filename
       learn accumulate end 
end loop main   

                                   {*Now we terminate the learning process.*}
   learn terminate end 

           {*One could now compute energies with the learned parameters or *}
           {*reduce them to type-based parameters and write them to a file.*}

Instead of learning from an ensemble of coordinates, one could have also learned the coordinates from a trajectory (Section 12.2).

Xplor-NIH 2023-11-10