Skip to content

How to fix the label clashing with itself #195

@vishal9506

Description

@vishal9506

Hi,

I have been trying to use chiLife to generate distance distribution of my own label on a protein. Unfortunately, when I have a look at the individual label conformation, I could see some conformations which is just not possible (label clashing with itself). Could someone please help me fix this issue.

Example:

Image

The script that I use:

import os
import numpy as np
import matplotlib.pyplot as plt
import chilife as chi
import MDAnalysis as mda

np.random.seed(100)
plt.style.use('chiLife')
plt.rcParams.update({'font.size':15})

os.chdir('C:\Users\uqvbayya\Desktop\Chilife\VBGd1_cysCNP\G147')

MBP = mda.Universe('C:/Users/uqvbayya/Desktop/Chilife/Protein/ERp29.pdb')

SL1 = chi.RotamerEnsemble('label', site=147, chain='A', protein=MBP, sample=10000, eval_clash=True)
SL2 = chi.RotamerEnsemble('label', site=403, chain='B', protein=MBP, sample=10000, eval_clash=True)

chi.save('ERp29_labelled.pdb', SL1, SL2, MBP)

traj, dE = chi.repack(MBP, SL1, SL2,
repetitions=10000, temp=298,
off_rotamer=True,
repack_radius=10)

SL1_repack = chi.SpinLabel.from_trajectory(traj, 147, burn_in=5000, spin_atoms=SL1.spin_atoms)
SL2_repack = chi.SpinLabel.from_trajectory(traj, 403, burn_in=5000, spin_atoms=SL2.spin_atoms)

chi.save('ERp29_labelled_repacked.pdb', SL1_repack, SL2_repack, MBP)

fig, ax = plt.subplots()
ax.plot(np.cumsum(dE))
ax.set_xlabel('step')
ax.set_ylabel(r'$\rm\Delta$ clash energy (kcal/mol)')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
plt.show()

fig.savefig('Trajectory.png', bbox_inches='tight', dpi=1200)

r = np.linspace(0, 100, 256)
P_repack = chi.distance_distribution(SL1_repack, SL2_repack, r)

fig, ax = plt.subplots(figsize=(6, 3))
ax.plot(r, P_repack)
ax.set_yticks([])
ax.set_xlabel('Distance ($\AA$)')

for spine in ['left', 'right', 'top']:
ax.spines[spine].set_visible(False)
plt.show()

fig.savefig('Distance_distributions.png', dpi=1200, bbox_inches='tight')

distancedistribution = np.column_stack((r, P_repack))
np.savetxt('distancedistribution.txt', distancedistribution, header="Distance[nm] Probability")

Kind regards,
Vishal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions