[Chimera-users] Buried_area python function

Kevin Wang kevinkw.wang at mail.utoronto.ca
Thu Aug 29 08:49:31 PDT 2019


Hi,

I am trying to use the buried_area function below. What are the arguments that I need to pass in?


def buried_area(operation, atoms1, atoms2,

                probeRadius = 1.4, vertexDensity = 2.0):

My current code is as follows:


#calculate buried area


import os

import chimera

import xlsxwriter

from Measure import measure

from chimera import *

workbook = xlsxwriter.Workbook('contactArea.xlsx')

worksheet = workbook.add_worksheet()

Path = "/Users/kevinwang/desktop/VEGFR_NO_LIGAND/results/clustering/pdbfit/split"


i = 0


filelist = os.listdir(Path)

for x in filelist:

    if x.startswith("trp.pdb."):

    #if (x == "trp.pdb.00001"):

        opened = chimera.openModels.open(x, type ="PDB")

        chimera.update.checkForChanges()

        try:

            runCommand('surface :286-596')

            runCommand('surface :899-1230')



            y = measure.buried_area()

            worksheet.write(i,0,x)

            worksheet.write(i,1,y)

        except:

            worksheet.write(i,0,x)

            worksheet.write(i,1,"ERROR")

        i = i + 1

        print("Processed: " + x)

        print("Total #: " + str(i))

    runCommand('close all')

    chimera.update.checkForChanges()


workbook.close()




Best,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20190829/f85095ed/attachment.html>


More information about the Chimera-users mailing list