Skip to content

Commit

Permalink
Update PCAsubs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alsinmr committed Jan 28, 2024
1 parent eba0575 commit 2c2cf60
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion PCA/PCAsubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ..MDtools import Ctcalc
from .. import clsDict
from .. import Defaults
from ..MDtools import vft
from copy import copy
import matplotlib.pyplot as plt
dtype=Defaults['dtype']
Expand Down Expand Up @@ -719,7 +720,8 @@ def bond(self,index:int,rho_index:int=None,PCAfit=None,frac:float=0.75):

return out

#%% Impulse response: A last attemp
#%% Impulse response: A last attempt

class Impulse():
def __init__(self,pca):
self.pca=pca
Expand All @@ -733,6 +735,12 @@ def PCamp(self):
self._PCamp=np.array([a[i0:i0+l2] for a,i0 in zip(self.pca.PCamp,i)])
return self._PCamp

@property
def v_dev(self):
v=vft.norm(self.pca.Vecs.v_mean_pos.T)
alpha,beta,gamma=vft.getFrame(v,return_angles=True)



#%% Port various correlation functions to data objects
class PCA2Data():
Expand Down

0 comments on commit 2c2cf60

Please sign in to comment.