Hi Ritu, most of the script looks fine. See below for comments.
On 16.02.2012 01:02, Rituparna Sengupta wrote: > Hi, I tried using 'or'. I didn't get any errors, but now that I'm checking > the outputs, I found that I got the area for just the ligand and not the > complex, when I use 'get_area' on the complex. I noticed I get the area for > whichever (ligand/target) is before the "or" operator, not the one after and > definitely not for the complex. Here's the code I've been using: > > ## r=target(name read as user input) > ## s=ligand(name read as user input) > > e=r+".pdb" > f=s+".pdb" > cmd.load(e) > cmd.load(f) > cmd.h_add will do nothing, must be: cmd.h_add() > cmd.flag(25, NONE) did this work for you? NONE should be a string: cmd.flag(25, "none") > cmd.set("dot_solvent", 1) > cmd.set("dot_density", 3) > ligand_area=cmd.get_area(s) > target_area=cmd.get_area(r) > cmd.create("complex", s or r) This is not a string, but a logical expression on the python level. Must be: cmd.create("complex", s + " or " + r) I even prefer: cmd.create("complex", "(%s) or (%s)" % (s, r)) > complex_area=cmd.get_area("complex") > contact_area=((ligand_area+target_area)-complex_area)/2 > print ligand_area > print target_area > print complex_area > print contact_area > > Thanks in advance. > Ritu Cheers, Thomas > On 02/13/12, Thomas Holder wrote: >> Hi Ritu, >> >> put "ligand" and "target" in one string as an atom selection with a >> logical "or". >> >> cmd.load("ligand.pdb") >> cmd.load("target.pdb") >> cmd.create("complex", "ligand or target") >> >> Cheers, >> Thomas >> >> Rituparna Sengupta wrote, On 02/13/12 19:28: >>> Hi, >>> >>> I've just started using PyMol, so this may come across as a stupid >>> question. I'm using Python to make a plugin for a surface area >>> calculation. What is the api version for the command: >>> >>> create complex, ligand target >>> >>> ?(ligand and target are pdb files) I tried using, >>> >>> cmd.create(complex, ligand, target) >>> >>> but found errors. Apparently I'm supposed to put an integer after the >>> first two entries in the bracket(according to the 'create' command >>> api version instructions in the pymol wiki commands section). I tried >>> loading the molecules separately into 'complex', but the value of the >>> complex area is different from when loaded together(found this out by >>> typing directly into pymol). I'll be glad if someone could help. >>> >>> Thanks, Ritu -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net