markovmodel / PyEMMA

🚂 Python API for Emma's Markov Model Algorithms 🚂
http://pyemma.org
GNU Lesser General Public License v3.0
307 stars 118 forks source link

Assigning two features at a time #1534

Closed Bazzinga18 closed 2 years ago

Bazzinga18 commented 2 years ago

I want to assign a distance feature, where i want to specify pairs of atoms whose distances should be taken. for example in this: feat.add_distances(indices=(1829,1907,1302,1479), indices2=(2366,2344,2453,2566), periodic=False) i want that this feature to count the distances between (1829,1907) with (2366,2344) and (1302,1479) with (2453,2566).So how to specify this? please let me know as i am new to this it is appreciated if code for the same will be provided.

clonker commented 2 years ago

If I understand you correctly, you want to compute distances between groups of atoms. We had a very similar issue not too long ago #1501, please see if that helps solve your problem.

Bazzinga18 commented 2 years ago

thank you clonker, but what i want to know how to group atoms within a particular feature i.e., in the indices i want the distances between the particular atom not each atom from one indices to each atom of another indices.

clonker commented 2 years ago

In that case you can add multiple distance features with a specific atom pair each :slightly_smiling_face:

Bazzinga18 commented 2 years ago

Thank you so much i'll try to do in that way:)

gph82 commented 2 years ago

Hi! Is it possible that what you want is this? This would compute the minimum distance between the pair (1829,1907) -- (2366,2344) and so on. E.g. for when you're computing the interaction between two terminal Nitrogen atoms (e.g. in a Arg) and two terminal Oxygen atoms (e.g. in a Glu) http://www.emma-project.org/latest/api/generated/pyemma.coordinates.featurizer.html#pyemma.coordinates.data.featurization.featurizer.MDFeaturizer.add_group_mindist

clonker commented 2 years ago

I assume this is answered, otherwise please feel free to reopen