How many atoms in MarvinSketch ?

User 25d107bd42

03-12-2007 15:08:11

How many atoms can a molecule have to produce


the geometry xyz-coordinates ? Is there a limit ?

ChemAxon 7c2d26e5cf

03-12-2007 19:03:10

Since atoms of a Molecule object are stored in a Java array, the real question is the follow: What's the max size you can put in an array?


I quote the related topic from Sun's Java forum to answer to the question:
Quote:
The language will let you declare up to Integer.MAX_VALUE elements (a little over 2,000,000). However, your available memory and limits imposed by your OS and hardware will almost certainly impose a much lower limit in practice

User 25d107bd42

03-12-2007 20:49:33

Thank you. This is a very good answer for me.

ChemAxon 7c2d26e5cf

06-12-2007 13:04:09

I've recognized that the quoted text contained false data.
Quote:
The language will let you declare up to Integer.MAX_VALUE elements (a little over 2,000,000).
Instead of two millions, the Integer.MAX_VALUE is 2^31 - 1 (the exact value is 2,147,483,647). So there are couple of digit difference between the two values. :)

User 25d107bd42

08-12-2007 08:23:47

Thank you once more. This is about 1000 times better !


As a JAVA-Programmer I have now the question: Does the formula Integer.MAX_VALUE is 2^31 - 1 correspond to the 32 bit processor we are using ?





PS: The automatic forum email message is a very good thing.

User 25d107bd42

08-12-2007 19:00:13

To my question "How many atoms can a molecule have" and your answer I found evaluating MarvinSketch an interesting answer, see screenshot054.jpg.


Does this memory limit constrict the application ?

ChemAxon 7c2d26e5cf

11-12-2007 15:41:13

In default, the maximum allocatable memory for Java is 64MB.


But you can increase this value with the help of the -Xmx JVM parameter. You can specify it in command line. In this case, this settings is valid for only the launched application.


E.g.:


Code:
marvinbeans/bin/msketch -Xmx128M



or


Code:
java -Xmx128M -classpath marvinbeans/lib/MarvinBeans.jar chemaxon.marvin.Sketch



You can also give this parameter in the Java's Control Panel to apply this settings to all Java applications. Consult with the help of your Java how to do this.

User 25d107bd42

11-12-2007 15:51:45

Thank you. This commando line option is a good thing for me.

User 25d107bd42

14-12-2007 20:19:06

Extending the memory was a very good tip.


Editing a molecule with 508 atoms it took 2 minutes to add a double bond.


By extending the JAVA memory to 256 MB (using msketch -Xmx256M) MarvinSketch worked as fast as usual.

User 25d107bd42

09-07-2008 07:11:42

Hi,


I found an easy way to enlarge the JAVA memory using the Desktop launcher: Please see the topic Different MarvinSketch and msketch scripts ? Post: Wed Jul 09, 2008 8:04 am.


http://www.chemaxon.com/forum/ftopic3852.html





Regards, Hans-Ulrich

ChemAxon 7c2d26e5cf

11-07-2008 13:14:45

Thanks for sharing your experience.