I did remove it. I get the same error.
Regards.
On Thu, Apr 6, 2017 at 3:59 PM, Jed Goldstone <jedg...@gmail.com> wrote:
> centerofmass 1a5m
> works just fine for me from the console.
> Try removing the ".pdb" from the command
> "com = cmd.centerofmass('1a5m.pdb')"
>
> Jed
>
> On 4/6/2017 9:36 AM, Ahmad Abdelzaher wrote:
>
>> I don't fully get what you mean, however, with or without the .pdb, I
>> get the same error.
>>
>> On Thu, Apr 6, 2017 at 3:28 PM, João M. Damas <jmda...@itqb.unl.pt
>> <mailto:jmda...@itqb.unl.pt>> wrote:
>>
>> When you do the load, the .pdb is stripped off. The selection is
>> 1a5m and not 1a5m.pdb
>>
>> On Thu, Apr 6, 2017 at 3:18 PM, Ahmad Abdelzaher
>> <underoath...@gmail.com <mailto:underoath...@gmail.com>> wrote:
>>
>> In the documentation, it said "atom selection. However i tried
>> the following as you suggested:
>>
>> import __main__
>> __main__.pymol_argv = ['pymol','-qc']
>> import pymol
>> from pymol import cmd
>>
>> cmd.delete('all')
>> cmd.load('1a5m.pdb')
>> com = cmd.centerofmass('1a5m.pdb')
>> print(com)
>>
>> I received the following:
>>
>> File
>> "C:\Users\Ahmad\Anaconda3\lib\site-packages\pymol\querying.py",
>> line 1674, in centerofmass
>> states = [get_selection_state(selection)]
>>
>> File
>> "C:\Users\Ahmad\Anaconda3\lib\site-packages\pymol\querying.py",
>> line 1641, in get_selection_state
>> _self.get_object_list('(' + selection + ')')))
>>
>> TypeError: 'NoneType' object is not iterable
>>
>> On Thu, Apr 6, 2017 at 1:09 PM, David Hall
>> <li...@cowsandmilk.net <mailto:li...@cowsandmilk.net>> wrote:
>>
>> >how to calculate the center of mass of an entire structure
>>
>> Let's say I want the center of mas of the structure from the
>> PDB 1vdd
>>
>> cmd.fetch('1vdd', async=0)
>>
>> cmd.centerofmass('1vdd')
>>
>> Now, I see 1vdd has a bunch of water molecules that I don't
>> want in in my calculation
>>
>> cmd.centerofmass('1vdd and not solvent')
>>
>> Now maybe I only care about chain A.
>>
>> cmd.centerofmass('1vdd and not solvent and chain A')
>>
>> I suggest reading more about selections in the pymolwiki.
>> That is actually a topic where I feel the wiki could be
>> better organized, but almost every command in pymol operates
>> on selections, so it is a fundamental concept you should
>> spend time to understand if you are planning to use pymol.
>>
>> https://pymolwiki.org/index.php/Category:Selecting
>> <https://pymolwiki.org/index.php/Category:Selecting>
>>
>>
>> On Thu, Apr 6, 2017 at 1:13 AM, Ahmad Abdelzaher
>> <underoath...@gmail.com <mailto:underoath...@gmail.com>>
>> wrote:
>>
>> Hi Tsjerk,
>>
>> What you said makes perfect sense. Since an atom could
>> be considered as a point with uniform density, it's
>> center of mass is indeed its position.
>>
>> Which, begs the question, what is the purpose of
>> cmd.centerofmass() and how to calculate the center of
>> mass of an entire structure (the only calculation that
>> would make sense with regards to the center of mass).
>>
>> Cheers.
>>
>>
>> On Thu, Apr 6, 2017 at 6:49 AM, Tsjerk Wassenaar
>> <tsje...@gmail.com <mailto:tsje...@gmail.com>> wrote:
>>
>> Hi Ahmad,
>>
>> The center of mass of an atom is its position. A
>> function like cmd.centerofmass in the context of
>> pymol only makes sense with a selection. E.g.:
>>
>> x,y,z = cmd.centerofmass('byres n. ca')
>> print "COM of protein:", x, y, z
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>> On Thu, Apr 6, 2017 at 6:30 AM, Ahmad Abdelzaher
>> <underoath...@gmail.com
>> <mailto:underoath...@gmail.com>> wrote:
>>
>> Well I'm assuming the selection goes in the
>> argument of cmd.centerofmass(), however, does it
>> have to be an atom? How should I calculate the
>> center of mass for an entire protein?
>>
>> On Thu, Apr 6, 2017 at 4:48 AM, David Hall
>> <li...@cowsandmilk.net
>> <mailto:li...@cowsandmilk.net>> wrote:
>>
>> It returns the x, y, and z coordinates of
>> the center of mass as a list of 3 floats,
>> presumably in that order?
>>
>> Is there another question? The page
>> describes the arguments and their defaults
>> so I am unsure what is lacking.
>>
>> -David
>>
>> On Apr 5, 2017, at 10:29 PM, Ahmad
>> Abdelzaher <underoath...@gmail.com
>> <mailto:underoath...@gmail.com>> wrote:
>>
>> I find the documentation about the python
>>> api here to be a bit lacking.
>>>
>>> https://pymolwiki.org/index.php/Centerofmass
>>> <https://pymolwiki.org/index.p
>>> hp/Centerofmass>
>>>
>>> I would appreciate more info on how to use
>>> this: cmd.centerofmass() returns a list of
>>> 3 floats.
>>> ------------------------------
>>> ------------------------------------------------
>>> Check out the vibrant tech community on
>>> one of the world's most
>>> engaging tech sites, Slashdot.org
>>> <http://Slashdot.org>!
>>> http://sdm.link/slashdot
>>> ______________________________
>>> _________________
>>> PyMOL-users mailing list
>>> (PyMOL-users@lists.sourceforge.net
>>> <mailto:PyMOL-users@lists.sourceforge.net>)
>>> Info Page:
>>> https://lists.sourceforge.net/
>>> lists/listinfo/pymol-users
>>> <https://lists.sourceforge.net
>>> /lists/listinfo/pymol-users>
>>> Archives:
>>> http://www.mail-archive.com/py
>>> mol-us...@lists.sourceforge.net
>>> <http://www.mail-archive.com/p
>>> ymol-us...@lists.sourceforge.net>
>>>
>>
>>
>>
>> ------------------------------
>> ------------------------------------------------
>> Check out the vibrant tech community on one of
>> the world's most
>> engaging tech sites, Slashdot.org!
>> http://sdm.link/slashdot
>> _______________________________________________
>> PyMOL-users mailing list
>> (PyMOL-users@lists.sourceforge.net
>> <mailto:PyMOL-users@lists.sourceforge.net>)
>> Info Page:
>> https://lists.sourceforge.net/
>> lists/listinfo/pymol-users
>> <https://lists.sourceforge.net
>> /lists/listinfo/pymol-users>
>> Archives:
>> http://www.mail-archive.com/py
>> mol-us...@lists.sourceforge.net
>> <http://www.mail-archive.com/p
>> ymol-us...@lists.sourceforge.net>
>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net
>> <mailto:PyMOL-users@lists.sourceforge.net>)
>> Info Page:
>> https://lists.sourceforge.net/lists/listinfo/pymol-users
>> <https://lists.sourceforge.net/lists/listinfo/pymol-users>
>> Archives:
>> http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>> <http://www.mail-archive.com/pymol-users@lists.sourceforge.net>
>>
>>
>>
>>
>> --
>> João M. Damas
>> PhD Student
>> Protein Modelling Group
>> ITQB-UNL, Oeiras, Portugal
>> Tel:+351-214469613
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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