Esempio n. 1
0
# global_cutoff = float(sys.argv[3])

# carpeta destino
directory = '/home/serch/pdbmani/Serch/pdbs/'

# Ya moficamos la cadenaa darle atomos
chain1 = 'A'
chain2 = 'A'

global_cutoff = 7  # modificar si quieres cambiar de cutoff!!! en filtro dihedral

# numero de cliques, preguntar en el software para generalizarlo INPUT...
number_elements_clique = 3

# se define la estructura
trj1 = rpt.Trajectory(file1)
trj2 = rpt.Trajectory(file2)
# se lee el pdb y se agrega al objeto
trj1.ReadTraj("%s" % file1)
trj2.ReadTraj("%s" % file2)

trj11 = trj1.frames
trj22 = trj2.frames

num_samples1 = int(len(trj11) * 0.05)
num_samples2 = int(len(trj22) * 0.05)

num_samples = num_samples1
if num_samples1 > num_samples2:
    num_samples = num_samples2
Esempio n. 2
0
#!/usr/bin/env python
import numpy as np
import sys
sys.path.append("math_tricks/")
sys.path.append("graphs/")
import read_pdb_tools as rpt
import math_vect_tools as mymath
import network_hb_from_md_traj as pdbnet

assert (len(sys.argv) > 1)
infile = sys.argv[1]
outfile = open('hh_%s.txt' % infile.split('.')[0], 'w')

trj = rpt.Trajectory("first")
trj.ReadTraj("%s" % infile, every=1)
trj.PrintTrajInfo()

while trj.current < trj.length:
    ref = trj.next()
    net = pdbnet.Network("first")
    net.set_nodes_on_frame(ref, mute=True)
    net.set_arists_on_nodes()
    #line = "# frame: %-4s  Nodes: %-6s  Edges: %-10s"%(trj.current ,net.count_nodes() ,net.count_arists())
    #print line
    #outfile.write('%s\n# Edge   Distance[A]\n'%line)
    net.write_arist_short(outfile, trj.current, short=True)
Esempio n. 3
0
# networks
import networkx as nx
# filtro distancia minima
# from scipy.spatial.distance import euclidean
# por si no jala
import os
os.chdir('/home/serch/pdbmani/Serch')
# multiprocessing
# import multiprocessing
# from functools import partial

# lectura de archivo
file1 = '/home/serch/pdbmani/Serch/pdbs/trj_0.pdb'  # sys.argv[1]

# se define la estructura
trj1 = rpt.Trajectory(file1)

# se lee el pdb y se agrega al objeto
trj1.ReadTraj("%s" % file1)

trj11 = trj1.frames[:3]

# set center_mass
for pdbstruct in trj11:
    pdbstruct.set_center_mass()



def get_df_distancias(ref):
    """Funcion para obtener los enlaces de distancias de cada residuo
    Dudas en codigo pueden revisar fc.distancia_entre_atomos en ese se basa