Free energy landscape plot from PCA

How do I calculate free energy landscape plot from the trajectory of PCA? I am using DS 2017 R2. Please provide the protocol.