Hello Peleg, I think there are other possibilities, but my data2bfactor.py script will do that for you. You create a file with whitespace-separated columns (spaces and/or tabs) in which each line contains:
chain resi resn name data (i.e. chain, residue number, residue name, atom name and value to be applied to the B-factor column). The number can also be applied to the occupancy column instead if you want to keep the B-factor intact. Then you can use the spectrum command or my color_b.py script to colour each atom according to the data value. My color_b.py script has a few more options than the spectrum command, including the ability to define a custom colour gradient scheme. You can find my scripts here: http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/ Cheers, Rob On Tue, 2017-02-14 17:12 +0100, Peleg Bar-Sapir <pel...@gmail.com> wrote: > Hello, > > I wish to write a script that will take the molecule loaded in PyMol, > and color the molecule according to values I will calculate using the > molecules' parameters (in the end there will be one floating number > per atom). Then, I would like to display that using surface mode. > > Could anyone direct me to a way of doing that? I saw scripts coloring > by atom type, but I'm not sure how to apply it for a molecule already > loaded in PyMol. > > Best, > > Peleg -- Robert L. Campbell, Ph.D. Adjunct Assistant Professor Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644 Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 <robert.campb...@queensu.ca> http://pldserver1.biochem.queensu.ca/~rlc ------------------------------------------------------------------------------ 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