<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Kevin,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Those arguments are “surface pieces”. Each molecular surface has only one “piece” (despite possibly looking like multiple disjoint pieces). Once you run the “surface” command (generating two molecular surfaces) you can get the p1/p2 arguments with this code fragment:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>p1, p2 = [s.surface_piece for s in openModels.list(modelTypes=[MSMSModel])]</div><div class=""><br class=""></div><div class="">Both openModels and MSMSModel are in the “chimera” module, but since your code does a “from chimera import *” you can get away with just the above.</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><br class=""></div><div class=""><div class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div></div><div><blockquote type="cite" class=""><div class="">On Aug 27, 2019, at 1:03 PM, Kevin Wang <<a href="mailto:kevinkw.wang@mail.utoronto.ca" class="">kevinkw.wang@mail.utoronto.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Hi,</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">I am writing a python script to find the area between 2 proteins using the contact_area python command below.</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(155, 35, 147);" class=""><b class="">def</b></span><span class="Apple-converted-space"> </span>contact_area(p1, p2, d, color =<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">None</b></span>, offset =<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">None</b></span>, slab =<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">None</b></span>,</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>smooth = False, optimize = True):</div><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Is there a specific object for p1 and p2 and if so how do I get it?</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">My current code is as follows:</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; color: rgb(155, 35, 147); background-color: rgb(255, 255, 255);" class=""><b class="">import</b><span style="" class=""><span class="Apple-converted-space"> </span>os</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(155, 35, 147);" class=""><b class="">import</b></span><span class="Apple-converted-space"> </span>chimera</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(155, 35, 147);" class=""><b class="">from</b></span><span class="Apple-converted-space"> </span>Measure<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">import</b></span><span class="Apple-converted-space"> </span>contactarea</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(155, 35, 147);" class=""><b class="">from</b></span><span class="Apple-converted-space"> </span>chimera<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">import</b></span><span class="Apple-converted-space"> </span>*</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 20px;" class=""><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; color: rgb(196, 26, 22); background-color: rgb(255, 255, 255);" class=""><span style="" class="">Path =<span class="Apple-converted-space"> </span></span>"/Users/kevinwang/desktop/VEGFR_NO_LIGAND/results/clustering/pdbfit/split"</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 20px;" class=""><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">filelist = os.listdir(Path)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(155, 35, 147);" class=""><b class="">for</b></span><span class="Apple-converted-space"> </span>x<span class="Apple-converted-space"> </span><span style="color: rgb(155, 35, 147);" class=""><b class="">in</b></span><span class="Apple-converted-space"> </span>filelist:</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; color: rgb(83, 101, 121); background-color: rgb(255, 255, 255);" class=""><span style="" class=""><span class=""> <span class="Apple-converted-space"> </span></span></span><i class="">#if x.startswith("trp.pdb."):</i></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; color: rgb(196, 26, 22); background-color: rgb(255, 255, 255);" class=""><span style="" class=""><span class=""> <span class="Apple-converted-space"> </span></span></span><span style="color: rgb(155, 35, 147);" class=""><b class="">if</b></span><span style="" class=""><span class="Apple-converted-space"> </span>(x ==<span class="Apple-converted-space"> </span></span>"trp.pdb.00001"<span style="" class="">):</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span><span style="color: rgb(155, 35, 147);" class=""><b class="">print</b></span><span class="Apple-converted-space"> </span>x</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>opened = chimera.openModels.open(x, type =<span style="color: rgb(196, 26, 22);" class="">"PDB"</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>runCommand(<span style="color: rgb(28, 0, 207);" class="">'surface'</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>y = contactarea.contact_area(<span style="color: rgb(28, 0, 207);" class="">'0.1'</span>,<span class="Apple-converted-space"> </span><span style="color: rgb(28, 0, 207);" class="">'0.2'</span>,<span class="Apple-converted-space"> </span><span style="color: rgb(28, 0, 207);" class="">2.5</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>text_file = open(<span style="color: rgb(196, 26, 22);" class="">"buriedArea.txt"</span>,<span class="Apple-converted-space"> </span><span style="color: rgb(196, 26, 22);" class="">"w"</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>text_file.write(y)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 17px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span class=""> <span class="Apple-converted-space"> </span></span>text_file.close()</div><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">The error message I am getting is as follows:</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span class="">AttributeError: 'str' object has no attribute 'geometry'<br class=""></span><div class=""><br class=""></div><div class=""> File "/Applications/Chimera.app/Contents/Resources/share/Measure/contactarea.py", line 8, in contact_area<br class=""></div><div class=""> v1, t1 = p1.geometry<br class=""></div><span class=""></span><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">How should I be passing in my arguments?</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Best,</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Kevin</div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Chimera-users mailing list:<span class="Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Chimera-users@cgl.ucsf.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Manage subscription:<span class="Apple-converted-space"> </span></span><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>