Stll ball and stick mode

User 13c4393203

25-10-2006 17:21:03

Hello





Does anyone know if there's any way to put an own color for the sticks? I mean a different color between the stick and the ball? And if there is also a possibility to change the colors of the balls?





Thanks a lot for answering if you know.

ChemAxon a3d59b832c

26-10-2006 13:19:59

You can color the bonds (sticks) and atoms (balls) using selection and Edit/Format Structure menu. See example attached.

User 13c4393203

26-10-2006 13:36:39

Thanks a lot, Szabolcs! I was so dumb not seeing that!





And if I may ask : Do you also know a way to make all balls have the same size? (the sulfur ball is for example always bigger than the carbon ball... and I want them all to have the same size)

ChemAxon a3d59b832c

26-10-2006 13:51:19

I do not know about a way to do that.





Probably the easiest is to use MarvinSpace: http://www.chemaxon.com/MarvinSpace/


(Also included in the Marvin beans package.)





It does not scale the balls in ball and stick mode. The 3D view in MarvinSketch/View is very limited.

ChemAxon 7c2d26e5cf

26-10-2006 14:23:30

Use carbon atoms instead of sulfur and put an alias to the atom. In this case, all ball will have got the same size. Then color it with the required color (by "Format Structure").

User 13c4393203

26-10-2006 14:27:29

Thanks for the tip, Tamas. That's a great idea!

User 13c4393203

26-10-2006 21:41:04

Just another thing... Does anyone know how to center the molecule in the document? I use the scale button after I modify my molecule with MarvinSketch and then I save it as a bitmap image. And the molecule always appears as centered on the horizontal level, but not on the vertical level. If someone knows... that would be fantastic!





Thanks a lot

ChemAxon 7c2d26e5cf

27-10-2006 09:05:32

I do not understand your problem. "File/Save Image" saves the content of the canvas and position the molecule into the center (both vertically and horizontally).


Can you show an image where you the positioning was wrong?

User 13c4393203

27-10-2006 09:50:49

Here's some images. On both of them, you can see the vertical level isn't at the center of the screen.





I really don't know what I do wrong. I sketch a molecule with MarvinSketch or import one as a .mol file, then I modify some stuff, then I press the "Autoscale" button and then File -> Save Image -> MS BMP. In some cases, I put 1.017 as relative scale, but it shouldn't change anything, right?





I tried to save the molecule as .bmp into using MarvinView, but the problem remains the same.





Maybe you'll know the answer. I hope so...

ChemAxon 7c2d26e5cf

27-10-2006 10:22:08

"center3.bmp" vertical position is right. It is in the middle of the frame. Currently, "File/Save Image" saves the whole canvas (also empty space).


Since the structure is not stratched vertically, it does not fill the whole frame. Actually, the problem is that the empy space is not cut down from the picture.


We fill solve this issue to save only the relevant part of the canvas.





By the way, if you use the "Molecule.toBinFormat(String)" method to generate image, only the molecule will be saved (not the whole canvas).


Code:
MSketchPane sketcher;


...


Molecule mol = sketcher.getMol();


byte[] data = mol.toBinFormat("msbmp");

User 13c4393203

27-10-2006 12:58:51

Sorry to bother you again, but I'm not sure I understand what you're saying





"center3.bmp" vertical position is right. It is in the middle of the frame."


but when I measure carefully, I see the distance between the lower atom of the molecule and the bottom of the image is bigger than the distance between the higher atom of the molecule and the top of the image.





"We fill solve this issue to save only the relevant part of the canvas." How do I do that?





"By the way, if you use the "Molecule.toBinFormat(String)" method to generate image, only the molecule will be saved (not the whole canvas).


Code, etc."


How do I do that too? I saw it seems to be possible to modify some of the basics of MarvinSketch using the HTML, but I don't know how I have to do. Is it not possible for me because I downloaded the program and I am using it on the computer and not via the Internet?





Sorry, I don't think I understand everything in this software.

ChemAxon 7c2d26e5cf

30-10-2006 10:43:12

Quote:
"center3.bmp" vertical position is right. It is in the middle of the frame."


but when I measure carefully, I see the distance between the lower atom of the molecule and the bottom of the image is bigger than the distance between the higher atom of the molecule and the top of the image.
The difference is about 1-2 pixels. I don't think it would be a serious problem.
Quote:
"We fill solve this issue to save only the relevant part of the canvas." How do I do that?
The boundaries of the image will be the edges of the molecule. (Currently, the Molecule.toBinFormat(String) method or the MolConverter application can creates such kind of images.)
Quote:
"By the way, if you use the "Molecule.toBinFormat(String)" method to generate image, only the molecule will be saved (not the whole canvas).


Code, etc."


How do I do that too? I saw it seems to be possible to modify some of the basics of MarvinSketch using the HTML, but I don't know how I have to do. Is it not possible for me because I downloaded the program and I am using it on the computer and not via the Internet?
As I see, you are an end-user, not a developer. I suggest to try the MolConverter command line application for image generation. (See also image export options.)


Code:
"C:\Program Files\ChemAxon\marvinbeans\bin\molconvert.bat" msbmp:ballstick,ballRadius0.6,scale72.4,#000000 center3.mol -o center3.bmp



If you do not give an exact size (only the scalling factor), the molecule border will determine the horizontal and vertical dimension of the image.

User 13c4393203

30-10-2006 19:06:52

It's really nice from you helping me this far, but I'm still lost... Hope you're not turning crazy because of me.





You said "As I see, you are an end-user, not a developer. I suggest to try the MolConverter command line application for image generation. (See also image export options.) - Code: "C:\Program Files\ChemAxon\marvinbeans\bin\molconvert.bat" msbmp:ballstick,ballRadius0.6,scale72.4,#000000 center3.mol -o center3.bmp





I thought I could enter the command you gave me by double-clicking on the molconvert.bat file, but when I did it, the MS-DOS window appeared and listed some datas I couldn't read (it went way too fast) before closing from himself. So... what did I do wrong?





Please, please, please tell me exactly what I got to do with my .bmp or with my .mol in order to create a .bmp or .jpg where the molecule is perfectly centered into the page. So far, I think I understood why it doesn't work. But I still don't get why I can't modify it... What part of the software do I have to open in order to do that? I know you're doing the best you can to help me and I'm very thankfull of that, but unfortunaly I'm no informatic genius (you probably knew that already...) so... I'M LOST!





Once again, thank you for helping

ChemAxon a3d59b832c

30-10-2006 21:55:37

"molconvert" is a command-line tool. So you should use the Command Prompt to run it. The following web page shows the usage:





http://www.chemaxon.com/marvin/doc/user/molconvert.html





Tamas just showed you an example to type(or copy-paste) into the Command Prompt to generate an image file you wanted.

ChemAxon 7c2d26e5cf

31-10-2006 10:26:20

Usage of MolConverter from Command Promp:





1. Select run from the Start menu and type cmd.exe.


2. Type the absolute path of "molconvert.bat" and the parameters of the application. ("molconvert.bat" is located in the "bin" sub directory of the folder of Marvin Beans).


Code:
"C:\Program Files\ChemAxon\marvinbeans\bin\molconvert.bat" msbmp:ballstick,ballRadius0.6,scale72.4,#000000 center3.mol -o center3.bmp



Notes:


- If the absolute path contains one or more spaces, give it between quotes.


- The above command should be typed without line-breaking.


- If the input molecule (center3.mol) is not in the current directory, give its exact location or go to its directory before you invoke "molconvert.bat".





You can find more details about the usage of command prompt in the following document: Command Prompt Basics. Consulting with the help of your Windows system can be also useful.

User 13c4393203

31-10-2006 15:36:16

OK, I finally understood what you meant with the Command Prompt, and I think I may handle it. But it still doesn't work, and I think I may type the wrong thing.





I tried with the command you gave me, but as my files aren't in the same place on my computer, it didn't work. So I tried with my path (hope I understand this word as right)





First I tell you where my files are.





The molconvert.bat command is at :


C:\Program Files\marvin beans\MarvinBeans\bin





The .mol molecule I wanted to do as a .bmp (called tentative) is at :


C:\Documents and Settings\Fabien Michel\Mes Documents\les molécules\marvinsketch





Using first the cmd.exe command, I could type





C:\Program Files\marvin beans\MarvinBeans\bin





without a problem. Then I typed





molconvert.bat





and it showed me what's in there. It came then to the first command (C:\Program Files\marvinbeans\Marvin Beans\bin). So I typed the command you gave me





(molconvert.bat msbmp:ballstick,ballRadius0.6,scale72.4,#000000 center3.mol -o center3.bmp)





by changing the name of center3.mol into tentative.mol. The same thing for the .bmp





I got the message "BallRadius0.6: not found". I thought you may have on your computer the molecule into such a "BallRadius0.6" file, so I put my "tentative.mol" into the bin file. And when I typed





molconvert tentative.mol -o tentative.bmp





I got the message Cannot export in "tentative.mol" format





I'm sure I do type something wrong, but what? I tried the same thing by typing not just "molconvert", but "molconvert.bat" and the same message appeared.





Reading the link you gave me (http://www.chemaxon.com/marvin/doc/user/molconvert.html) couldn't really help me.





Do you have any idea what I do wrong?





Thank you for answering and not going insane because of me

ChemAxon 7c2d26e5cf

31-10-2006 17:17:03

Do the follows (after opening command prompt):





1. Go to the directory where your mol files are located:


Code:
cd "C:\Documents and Settings\Fabien Michel\Mes Documents\les molécules\marvinsketch"



2. Type the molconvert.bat and its parameters (the previously mentioned document describes its syntax):


Code:
"C:\Program Filesmarvin beans\MarvinBeans\bin\molconvert.bat" "msbmp:ballstick,ballRadius0.6,scale72.4,#000000" tentative.mol -o tentative.bmp



In the above example, the working directory is "C:\Documents and Settings\Fabien Michel\Mes Documents\les molécules\marvinsketch". tentative.mol is located there. The output file (tentative.bmp) will be saved to the same directory.

User 13c4393203

31-10-2006 17:40:52

OK, something worked. I did what you told me and an image of the .mol file appeared. But this one isn't centered too. Can you tell me how I can define the exact size?

ChemAxon 7c2d26e5cf

02-11-2006 17:42:07

Quote:
OK, something worked. I did what you told me and an image of the .mol file appeared. But this one isn't centered too. Can you tell me how I can define the exact size?
I don't think this is something that is likely to be developed for some time.


To give the width and the height of the image, use "w" and "h" options in MolConverter (e.g.: w680,h200).


If you specify the width and hight of the image frame, the molecule will be fit to the frame.


If you give also the scaling factor, the molecule will be magnified to the specified size (not auto scalling). E.g.: w680,h200,scale72


See the image export options for more details.

User 13c4393203

02-12-2006 18:40:16

Hello





I wanted to ask if there's a way to increase the quality of the bond appearance in Ball and Stick Mode. I mean, I already changed it in "View -> Display -> Quality" to "high", but I saw that the bond pixelling becomes really "blurred" when the molecule's bigger. Maybe there's a way to make the bonds always look perfect?





Thanks for answering.

ChemAxon 7c2d26e5cf

05-12-2006 13:19:48

There is no way to set the quality of ball and stick mode.


I suggest to use MarvinSpace. It provides high quality displaying of structures (also in ball and stick mode). Both Marvin Beans and Marvin Applets packages include MarvinSpace.