Putting labels of different sizes on one PyMOl ObjectDo any publicly available databases detail protein structure and functional domains?How to colour multiple residues in Pymol?Label protein strucuture residues in ChimeraDetermining position of side chain hydrogen in glycine residues from coordinates of backbone atomsExecuting PyMOL from a Shell scriptGet residue position from Pymol SelectionPDB file downloading: pymol automation vs. manualpymol script to only select 5 chains within a distance from a reference and save the selection
Spirit guardians and iron golems
process numerical input arguments of mixed ints, floats, and "array-like" things of same length>1
Why does General Grievous say “Ah yes, the negotiator?”
Is there a spell, magical item, or any other method to accurately calculate how long ago an object/construct was created?
How to keep files accessible after reinstalling linux OS?
How do you help a new player evaluate complex multiclassing options without driving them and yourself crazy?
pdflatex fonts in lualatex
Why is this negated with nicht and not kein?
Students requesting to switch partners mid term
My time machine can go back farther than yours -- why?
Is Communism intrinsically Authoritarian?
How do you say "to play Devil's advocate" in German?
Why is Euler's Formula for Planar Graph Not Working Here?
Is there any obvious warning when auto-pilot is disengaged or when the mode changes?
Aliens kill as an art form, surprised that humans don't appreciate
Can I apply for a passport in the country I'm in so I can travel to my home country?
Will transcribing music improve my ability to play a song by ear?
Anacruses, Bar Lines, and Line Breaks
Finding how much time it takes for a complete Earth revolution around the Sun
Character Development - Robert Baratheon
Stack Exchange Answerer
Increasing ESD protection on Isolator part of the board
Can Mathematica provide a reliable estimate of the numerical error from NDSolve?
Does a Thief rogue's Fast Hands allow you to drink a potion as a bonus action?
Putting labels of different sizes on one PyMOl Object
Do any publicly available databases detail protein structure and functional domains?How to colour multiple residues in Pymol?Label protein strucuture residues in ChimeraDetermining position of side chain hydrogen in glycine residues from coordinates of backbone atomsExecuting PyMOL from a Shell scriptGet residue position from Pymol SelectionPDB file downloading: pymol automation vs. manualpymol script to only select 5 chains within a distance from a reference and save the selection
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;
$begingroup$
I'm new to PyMol (and StackExchange!) and working on my first project. I have the structure of a protein as an object, called PolyA-M, and the idea is that the residues of it are shown as spheres of differing sizes based on a calcualted conservation value. I want to label each sphere with it's amino acid, but to have the label size corresponding to sphere size. Here is a sample of the code that might be used to label one amino acid.
alter ( resid 138 ), resn = "Q135"
alter ( name CB and resid 138 ), vdw = vdw * 0.8 * 0.679934640522875
set_color col138, [ 1.0, 0.181, 0.181 ]
show spheres, name CB and resi 138
show sticks, ( name CA or name CB ) and resid 138
set label_size, 14, PolyA-M
label PolyA-M and name CB and resid 138, "Q"
color col138, name CB and resi 138
In this case, residue 138 is medium sized sphere with a size 14 label Q that fits well. However, if later on in the code another residue is labelled as so:
alter ( resid 198 ), resn = "A208"
alter ( name CB and resid 198 ), vdw = vdw * 0.8 * 0.359803921568627
set_color col198, [ 1.0, 0.601, 0.601 ]
show spheres, name CB and resi 198
show sticks, ( name CA or name CB ) and resid 198
set label_size, 8, PolyA-M
label PolyA-M and name CB and resid 198, "A"
color col198, name CB and resi 198
This will label residue 198 with a small A to fit the small sphere. However, this will also change the earlier label to size 8 as well, making it too small for the sphere.
Is there any way for me to prevent this, such that each residue keeps its own label size?
I know that one way is to create multiple identical objects and keep all labels of the same size restricted to the same object (For example, PolyA-M_10 contains all residues with label size 10, polyA-M_14 all residues with label size 14) but I was wondeirng if there is a more efficient way?
Thank you for any help! This is my first Stack Exchange question so any feedback would be appreciated :)
protein-structure structural-biology pymol
$endgroup$
migrated from biology.stackexchange.com Sep 20 at 10:10
This question came from our site for biology researchers, academics, and students.
add a comment
|
$begingroup$
I'm new to PyMol (and StackExchange!) and working on my first project. I have the structure of a protein as an object, called PolyA-M, and the idea is that the residues of it are shown as spheres of differing sizes based on a calcualted conservation value. I want to label each sphere with it's amino acid, but to have the label size corresponding to sphere size. Here is a sample of the code that might be used to label one amino acid.
alter ( resid 138 ), resn = "Q135"
alter ( name CB and resid 138 ), vdw = vdw * 0.8 * 0.679934640522875
set_color col138, [ 1.0, 0.181, 0.181 ]
show spheres, name CB and resi 138
show sticks, ( name CA or name CB ) and resid 138
set label_size, 14, PolyA-M
label PolyA-M and name CB and resid 138, "Q"
color col138, name CB and resi 138
In this case, residue 138 is medium sized sphere with a size 14 label Q that fits well. However, if later on in the code another residue is labelled as so:
alter ( resid 198 ), resn = "A208"
alter ( name CB and resid 198 ), vdw = vdw * 0.8 * 0.359803921568627
set_color col198, [ 1.0, 0.601, 0.601 ]
show spheres, name CB and resi 198
show sticks, ( name CA or name CB ) and resid 198
set label_size, 8, PolyA-M
label PolyA-M and name CB and resid 198, "A"
color col198, name CB and resi 198
This will label residue 198 with a small A to fit the small sphere. However, this will also change the earlier label to size 8 as well, making it too small for the sphere.
Is there any way for me to prevent this, such that each residue keeps its own label size?
I know that one way is to create multiple identical objects and keep all labels of the same size restricted to the same object (For example, PolyA-M_10 contains all residues with label size 10, polyA-M_14 all residues with label size 14) but I was wondeirng if there is a more efficient way?
Thank you for any help! This is my first Stack Exchange question so any feedback would be appreciated :)
protein-structure structural-biology pymol
$endgroup$
migrated from biology.stackexchange.com Sep 20 at 10:10
This question came from our site for biology researchers, academics, and students.
add a comment
|
$begingroup$
I'm new to PyMol (and StackExchange!) and working on my first project. I have the structure of a protein as an object, called PolyA-M, and the idea is that the residues of it are shown as spheres of differing sizes based on a calcualted conservation value. I want to label each sphere with it's amino acid, but to have the label size corresponding to sphere size. Here is a sample of the code that might be used to label one amino acid.
alter ( resid 138 ), resn = "Q135"
alter ( name CB and resid 138 ), vdw = vdw * 0.8 * 0.679934640522875
set_color col138, [ 1.0, 0.181, 0.181 ]
show spheres, name CB and resi 138
show sticks, ( name CA or name CB ) and resid 138
set label_size, 14, PolyA-M
label PolyA-M and name CB and resid 138, "Q"
color col138, name CB and resi 138
In this case, residue 138 is medium sized sphere with a size 14 label Q that fits well. However, if later on in the code another residue is labelled as so:
alter ( resid 198 ), resn = "A208"
alter ( name CB and resid 198 ), vdw = vdw * 0.8 * 0.359803921568627
set_color col198, [ 1.0, 0.601, 0.601 ]
show spheres, name CB and resi 198
show sticks, ( name CA or name CB ) and resid 198
set label_size, 8, PolyA-M
label PolyA-M and name CB and resid 198, "A"
color col198, name CB and resi 198
This will label residue 198 with a small A to fit the small sphere. However, this will also change the earlier label to size 8 as well, making it too small for the sphere.
Is there any way for me to prevent this, such that each residue keeps its own label size?
I know that one way is to create multiple identical objects and keep all labels of the same size restricted to the same object (For example, PolyA-M_10 contains all residues with label size 10, polyA-M_14 all residues with label size 14) but I was wondeirng if there is a more efficient way?
Thank you for any help! This is my first Stack Exchange question so any feedback would be appreciated :)
protein-structure structural-biology pymol
$endgroup$
I'm new to PyMol (and StackExchange!) and working on my first project. I have the structure of a protein as an object, called PolyA-M, and the idea is that the residues of it are shown as spheres of differing sizes based on a calcualted conservation value. I want to label each sphere with it's amino acid, but to have the label size corresponding to sphere size. Here is a sample of the code that might be used to label one amino acid.
alter ( resid 138 ), resn = "Q135"
alter ( name CB and resid 138 ), vdw = vdw * 0.8 * 0.679934640522875
set_color col138, [ 1.0, 0.181, 0.181 ]
show spheres, name CB and resi 138
show sticks, ( name CA or name CB ) and resid 138
set label_size, 14, PolyA-M
label PolyA-M and name CB and resid 138, "Q"
color col138, name CB and resi 138
In this case, residue 138 is medium sized sphere with a size 14 label Q that fits well. However, if later on in the code another residue is labelled as so:
alter ( resid 198 ), resn = "A208"
alter ( name CB and resid 198 ), vdw = vdw * 0.8 * 0.359803921568627
set_color col198, [ 1.0, 0.601, 0.601 ]
show spheres, name CB and resi 198
show sticks, ( name CA or name CB ) and resid 198
set label_size, 8, PolyA-M
label PolyA-M and name CB and resid 198, "A"
color col198, name CB and resi 198
This will label residue 198 with a small A to fit the small sphere. However, this will also change the earlier label to size 8 as well, making it too small for the sphere.
Is there any way for me to prevent this, such that each residue keeps its own label size?
I know that one way is to create multiple identical objects and keep all labels of the same size restricted to the same object (For example, PolyA-M_10 contains all residues with label size 10, polyA-M_14 all residues with label size 14) but I was wondeirng if there is a more efficient way?
Thank you for any help! This is my first Stack Exchange question so any feedback would be appreciated :)
protein-structure structural-biology pymol
protein-structure structural-biology pymol
asked Sep 20 at 9:34
A. KingA. King
415 bronze badges
415 bronze badges
migrated from biology.stackexchange.com Sep 20 at 10:10
This question came from our site for biology researchers, academics, and students.
migrated from biology.stackexchange.com Sep 20 at 10:10
This question came from our site for biology researchers, academics, and students.
migrated from biology.stackexchange.com Sep 20 at 10:10
This question came from our site for biology researchers, academics, and students.
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
$begingroup$
'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size.
It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL
$endgroup$
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
add a comment
|
$begingroup$
I ended up fixing this by just putting this into the boilerplate code:
copy PolyA-MC_4, PolyA-MC
copy PolyA-MC_6, PolyA-MC
copy PolyA-MC_8, PolyA-MC
copy PolyA-MC_10, PolyA-MC
copy PolyA-MC_12, PolyA-MC
copy PolyA-MC_14, PolyA-MC
copy PolyA-MC_16, PolyA-MC
copy PolyA-MC_18, PolyA-MC
copy PolyA-MC_20, PolyA-MC
This copied my object such that I had one per size of label text, and then each label was placed on the object. As all labels on a given object are the same size, it worked! e.g. for one residue the labelling is now:
set label_size, 4, PolyA-MC_4
Effectively, it's the same as what I was already doing, but instead of having ten copy filies in the directory only one is needed. Much easier for sending to people, and more efficient!
$endgroup$
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "676"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbioinformatics.stackexchange.com%2fquestions%2f10442%2fputting-labels-of-different-sizes-on-one-pymol-object%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size.
It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL
$endgroup$
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
add a comment
|
$begingroup$
'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size.
It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL
$endgroup$
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
add a comment
|
$begingroup$
'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size.
It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL
$endgroup$
'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size.
It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL
answered Sep 20 at 10:25
bunherbunher
211 bronze badge
211 bronze badge
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
add a comment
|
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
$begingroup$
Ah, I see what you mean! The way I've been doing it with multiple objects is to just create multiple copies in the directory (So PolyA-M_1 to PolyA-M_10) such that it reads those in too, and then writes labels of different sizes onto them. But if there isn't a command which is able to change label size at a residue level, then this definitely sounds more efficient than having loads of different files. It would also be good for me to learn more scripting in general. Thank you!
$endgroup$
– A. King
Sep 20 at 10:32
add a comment
|
$begingroup$
I ended up fixing this by just putting this into the boilerplate code:
copy PolyA-MC_4, PolyA-MC
copy PolyA-MC_6, PolyA-MC
copy PolyA-MC_8, PolyA-MC
copy PolyA-MC_10, PolyA-MC
copy PolyA-MC_12, PolyA-MC
copy PolyA-MC_14, PolyA-MC
copy PolyA-MC_16, PolyA-MC
copy PolyA-MC_18, PolyA-MC
copy PolyA-MC_20, PolyA-MC
This copied my object such that I had one per size of label text, and then each label was placed on the object. As all labels on a given object are the same size, it worked! e.g. for one residue the labelling is now:
set label_size, 4, PolyA-MC_4
Effectively, it's the same as what I was already doing, but instead of having ten copy filies in the directory only one is needed. Much easier for sending to people, and more efficient!
$endgroup$
add a comment
|
$begingroup$
I ended up fixing this by just putting this into the boilerplate code:
copy PolyA-MC_4, PolyA-MC
copy PolyA-MC_6, PolyA-MC
copy PolyA-MC_8, PolyA-MC
copy PolyA-MC_10, PolyA-MC
copy PolyA-MC_12, PolyA-MC
copy PolyA-MC_14, PolyA-MC
copy PolyA-MC_16, PolyA-MC
copy PolyA-MC_18, PolyA-MC
copy PolyA-MC_20, PolyA-MC
This copied my object such that I had one per size of label text, and then each label was placed on the object. As all labels on a given object are the same size, it worked! e.g. for one residue the labelling is now:
set label_size, 4, PolyA-MC_4
Effectively, it's the same as what I was already doing, but instead of having ten copy filies in the directory only one is needed. Much easier for sending to people, and more efficient!
$endgroup$
add a comment
|
$begingroup$
I ended up fixing this by just putting this into the boilerplate code:
copy PolyA-MC_4, PolyA-MC
copy PolyA-MC_6, PolyA-MC
copy PolyA-MC_8, PolyA-MC
copy PolyA-MC_10, PolyA-MC
copy PolyA-MC_12, PolyA-MC
copy PolyA-MC_14, PolyA-MC
copy PolyA-MC_16, PolyA-MC
copy PolyA-MC_18, PolyA-MC
copy PolyA-MC_20, PolyA-MC
This copied my object such that I had one per size of label text, and then each label was placed on the object. As all labels on a given object are the same size, it worked! e.g. for one residue the labelling is now:
set label_size, 4, PolyA-MC_4
Effectively, it's the same as what I was already doing, but instead of having ten copy filies in the directory only one is needed. Much easier for sending to people, and more efficient!
$endgroup$
I ended up fixing this by just putting this into the boilerplate code:
copy PolyA-MC_4, PolyA-MC
copy PolyA-MC_6, PolyA-MC
copy PolyA-MC_8, PolyA-MC
copy PolyA-MC_10, PolyA-MC
copy PolyA-MC_12, PolyA-MC
copy PolyA-MC_14, PolyA-MC
copy PolyA-MC_16, PolyA-MC
copy PolyA-MC_18, PolyA-MC
copy PolyA-MC_20, PolyA-MC
This copied my object such that I had one per size of label text, and then each label was placed on the object. As all labels on a given object are the same size, it worked! e.g. for one residue the labelling is now:
set label_size, 4, PolyA-MC_4
Effectively, it's the same as what I was already doing, but instead of having ten copy filies in the directory only one is needed. Much easier for sending to people, and more efficient!
edited Sep 30 at 16:05
answered Sep 30 at 13:16
A. KingA. King
415 bronze badges
415 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Bioinformatics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbioinformatics.stackexchange.com%2fquestions%2f10442%2fputting-labels-of-different-sizes-on-one-pymol-object%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown