Easy way to get calculation results for xyz input files

User 25d107bd42

22-12-2008 09:25:28

Hi,


in the topic Calculation result is not defined for query molecules" www.chemaxon.com/forum/ftopic3457.html





my last sentence was "I will look for another possibility to solve the problem.". Here it comes (Tue Jan 20, 2009).





In the post Fri Jan 16, 2009 of this topic cspeter showed the easiest way to get calculation results for xyz input files:





1) Choose Edit -> Preferences -> Bonds -> "Any" Bond Line Style and check "Dashed" instead of "Automatic", then open an XYZ file and see the first image below.





2) Then define the bond orders using the toolbar bond tool, second image.





3) Now all calculation tools are free to be used, see third picture.





The further discussion in this topic shows the internal details of these procedures.





Regards, Hans-Ulrich

User 25d107bd42

23-12-2008 13:53:26

Hi, further evaluating this topic, I found a very easy workaround:





1) Open the xyz-file in MarvinSketch.





2) Draw a single bond anywhere on the canvas, all bonds become dotted, which obviously means undefined, see bf0387.





3) Draw all bonds using the bond tool, by single or double clicking on the bonds. This leads to the Lewis formula, see bf0390 left.


Don't forget to delete the additional "line-molecule".





4) Now the calculation tools are free to use, see bf0390 right.





5) Save the molecule as mrv-file. The bond in the mrv-file orders are now correct and there is no item "anyBondsFromCoords", see bf0392.





The Hueckel calculation for this Lewis formula is exact correct and has the correct symmetry for the molecule.





The calculation of "major contributors" using the "resonance" tool does not work, but this is the theme of another topic.





One question: Is the Dreiding energy exactly the energy for this xyz-input when the option "Never" is used,


or is the geometry changed while calculating this Dreiding energy.






Regards, Hans-Ulrich

ChemAxon 7c2d26e5cf

23-12-2008 17:37:01

In the Christmas - New Year's Day period, most of my colleagues are on holiday. 2nd January is also holiday in Hungary. So the responsible people will give you detailed answer for your comment after the holiday period.

ChemAxon 8b644e6bf4

24-12-2008 18:55:58

Dear Hans-Ulrich,
Quote:
One question: Is the Dreiding energy exactly the energy for this xyz-input when the option "Never" is used,


or is the geometry changed while calculating this Dreiding energy.
In this case the geometry is not be changed and the energy is calculated using the given atom coordinates. However, an aromatization is invoked for the calculation.


In the future we might change this behavior by invoking a geometry optimization on the delivered structure in order to calculate energy for the "real" nearest local energy minimum.





Regards,


Gabor

User 25d107bd42

25-12-2008 10:14:44

Dear Gabor,
Quote:
In this case the geometry is not be changed and the energy is calculated using the given atom coordinates. However, an aromatization is invoked for the calculation.
Is it really necessary to invoke this (dubious) aromatization ?


I know the Dreiding force field uses parameters called C_R, N_R and O_R for "aromatic" bond systems, but this seems rather arbitrary.


I will evaluate the other force fields available about the handling of these so called "aromatic" bond systems.
Quote:
In the future we might change this behavior by invoking a geometry optimization on the delivered structure in order to calculate energy for the "real" nearest local energy minimum.
No, please do not invoke such an optimization. There should be the possibilty to calculate the "Dreiding energy" for a given 3D-structure, perhaps coming from X-ray, from other force field calculations or from quantum chemical calculations.





Having a calculation without changing the geometry would give the possibilty to calculate f.e. the energy of planar biphenyl, as transition state of the rotation about the central bond.





There is one example in the Dreiding energy paper of Goddard showing a biphenyl derivative, ACTHBZ. I have got the structure from the protein data base. And I hope I can now calculate the Dreiding energy using your implementation. And to compare the result with the Dreiding energy coming of an other program, which can also calculate Dreiding energies.





Another fine example, especially for teaching, would be the rotation around the central bond of n-butane with three minima and three maxima for the rotation.





To have the option to find the nearest local energy minimum would be fine. But, please, only as option.





And: Is the option "Always" an other optimization ?





Regards, Hans-Ulrich

ChemAxon 8b644e6bf4

05-01-2009 02:55:27

Dear Hans-Ulrich,
Quote:
Is it really necessary to invoke this (dubious) aromatization ?
Since the force field itself uses aromatic bond type it is required to percept these systems. Also, without any aromatization the requirement to find same energy for resonance structures would be much harder to meet.
Quote:
here should be the possibilty to calculate the "Dreiding energy" for a given 3D-structure, perhaps coming from X-ray, from other force field calculations or from quantum chemical calculations.
As far as I know it is not recommended to cross-compare structures resulted from different methods without optimization.





I generally agree to make the "raw" calculation available (even with no aromatization), however specifying the default behavior needs further consideration.
Quote:
And: Is the option "Always" an other optimization ?
Option "Always" will invoke 3D coordinate generation for the given structure. Option "Never" will us the given coordinates, and option "If molecule is in 2D" will invoke 3D coordinate generation for non-3D input structures.





Regards,


Gabor

User 25d107bd42

05-01-2009 08:23:35

Dear Gabor,


thank you for your detailed answer.
Quote:
Since the force field itself uses aromatic bond type it is required to percept these systems. Also, without any aromatization the requirement to find same energy for resonance structures would be much harder to meet.
OK. I agree. The Dreiding force field uses special parameters for "aromatic" bonds (called C_R) and so substructures must be aromatized.
Quote:
Option "Always" will invoke 3D coordinate generation for the given structure. Option "Never" will us the given coordinates, and option "If molecule is in 2D" will invoke 3D coordinate generation for non-3D input structures.
This would help to use the tool "Geometry" to give exactly the results I want to have in a given situation. Thank you.





Regards, Hans-Ulrich

User 25d107bd42

05-01-2009 08:54:19

Dear Gabor,


let me come back to the original subject of this topic: Easy way to get calculation results for xyz input files.





1) Opening the xyz-file produces formulas showing the topology with single lines between the atoms.


2) Drawing something on the canvas changes these topology lines to dotted lines and now it is clear, the bonds between the atoms are not defined.


3) Now you have to draw = define the bonds (single, double ...).


4) After drawing all bonds the structure is well-defined and can be saved in mrv and other formats and it is possible to do calculations etc.





Now I have the idea:


This procedure would be easier to do and it would be immediately clear what is done while opening a xyz-file, when


opening a xyz-file gives immediately the topology with dotted lines.


This would be a super feature and would avoid the unobvious workaround "2) Drawing something ...".





Regards, Hans-Ulrich

ChemAxon efa1591b5a

08-01-2009 08:20:50

Dear Hans-Ulrich,





we understand your concern regarding xyz files and we do very highly appreciate your kind support and feasible suggestions. Although, the support of XYZ files is far not our priority at the moment, I'm afraid.


Anyway, we will consider your suggestion which would provide an elegant solution for the problem you encountered.





Thank you for your continuous support.








Regards,


Miklos

User 25d107bd42

08-01-2009 11:30:35

Dear Miklos,


I cannot agree to your sentence:


"Although, the support of XYZ files is far not our priority at the moment, I'm afraid."


and I will repeat sentences of my first post in this topic:


"And in this context I must comment: The xyz-format is a very important format.


The molecule information comes either from the f.e. X-ray experiment or from force field or quantum chemical calculations.






Most other information about molecules which software as Marvin and other chemical software is using, is "artificial", born in our heads or programs.


Especially the bonds are a dubious information. Chemists believe in the VSEPR model. But f.e. our actual discussion about "resonance/mesomerism" show the problems of these concepts.





So it would be a real feature to import molecules coming from 3D structures and to do calculations, f.e.


Elemental analysis, IUPAC Name, Protonation, Charge, Isomers, Conformation, Geometry, H Bond Donor/Acceptor, Hueckel etc.





A colleague uses MarvinSketch to transfer xyz-data (coming from ab initio calculations) to formulas for publications.





And one can use the Marvin Applet to do this.





Imagine the following: There is a group of about 20 users, sitting at their computer and you are showing the workaround with a beamer. How many users can use it two days later?





I hate workarounds.





Is it really so difficult to change the MarvinSketch to do the display with dotted lines one step earlier than it's implement now?


Being also a JAVA programmer I say this must be only changing an event.





And: It is not for me. I know how to do it. It would be a real feature of MarvinSketch.





Regards, Hans-Ulrich

ChemAxon efa1591b5a

08-01-2009 13:04:43

Hi,


I was not saying "not important", I said it's not our priority.


Thanks


Miklos

User 25d107bd42

13-01-2009 18:04:49

Hi Miklos, some arguments more:





In the screenshot there is the display of a xyz-file and the "Error notification window" says:


"Cannot run plugin: Elemental analysis. Calculation result is not defined for query molecules."





This text is misleading:





1) The elemental analysis is defined for this molecule description. There is no need of bonds.





2) It is not a "query" molecule. This example was produced using MarvinSketch and the tool "Geometry", and then saved as xyz-file.





3) The text doesn't help how to solve the problem.





I suggest to change the text and to put a link to the User's guide,


where one can find the description of my "workaround" given earlier.





Changing and adding a few lines of code and Marvin would give a good


interface between different molecule data.





Regards, Hans-Ulrich

ChemAxon 990acf0dec

15-01-2009 13:36:37

Hi Hans-Ulrich,











Presently we do not have capacity to modify the XYZ format I/O in Marvin. I'm sorry.











Best regards,











Akos

User ef5e605ae6

16-01-2009 07:28:54

Hi,


Maybe I misunderstand something but it does not seem to be a problem for me:
Quote:
1) Opening the xyz-file produces formulas showing the topology with single lines between the atoms.


2)


Drawing something on the canvas changes these topology lines to dotted


lines and now it is clear, the bonds between the atoms are not defined.


3) Now you have to draw = define the bonds (single, double ...).


4) After drawing all bonds the structure is well-defined and can be saved in mrv and other formats and it is possible to do calculations etc.





Now I have the idea:


This procedure would be easier to do and it would be immediately clear what is done while opening a xyz-file, when


opening a xyz-file gives immediately the topology with dotted lines





Choose Edit -> Preferences -> Bonds -> "Any" Bond Line Style and check "Dashed" instead of "Automatic". Then open an XYZ file and see what happens.





regards,


Peter

User 25d107bd42

19-01-2009 08:17:31

Hi Peter,


thank you for your answer and the advice


how to get immediately the "dashed" lines when opening a xyz-file.





I will change the first post in this topic according to this information.





And my suggestion to change the "Error notification window" as mentioned earlier is still valid.





Having this information would have shortened the discussion


in this topic and in the previous topic ftopic3457.html .





It is once more a problem of documentation and information.





Now there are a new problems and questions in this context. First only one of these: Is it right to say ?


"The Error window comes when input file contains *no* bond information"


or are there other criteria?





Regards, Hans-Ulrich

ChemAxon efa1591b5a

26-01-2009 07:38:45

Hi Hans-Ulrich,





Peter is on sick leave. He may get back to you in a few weeks time.











Miklos

User 3e45eb4e71

19-02-2009 22:00:16

I came across this issue when I needed the ring counts for a set of polyaromatic hydrocarbons.  Here's how I resolved it.





I wrote a shell script called xyz2sdf.sh (see code below) that converted all XYZ files in current directory to MOL files and then generated a single SDF file, all using molconvert.  For my specific requirement, I added the "b" option during the conversion from XYZ to MOL file to force calculation of bond order (my set of molecules were simple with no ions, etc).  Then I used cxcalc, which is part of the topology analysis plugin, to identify the number of rings in each molecule in the SDF file.








Code:
#!/bin/csh





if ( $#argv == 0 ) then


    echo


    echo "  This script will run over all XYZ files in the current directory."


    echo "  Enter any argument to start...."


    echo


    exit


endif





foreach xyzFile (*xyz)





      set molFile=$xyzFile:r".mol"


      if (-e $molFile) then


          echo $molFile exists


      else


          ~/programs/ChemAxon/MarvinBeans/bin/molconvert mol $xyzFile\{b\} -o $molFile


      endif





end





~/programs/ChemAxon/MarvinBeans/bin/molconvert sdf *.mol -o mols.sdf


~/programs/ChemAxon/MarvinBeans/bin/cxcalc ringcount mols.sdf > ringCount.txt











Of course, you can add a line in the script to remove unwanted mol files....





Best regards,


Milind

User 25d107bd42

23-02-2009 08:17:14

Hi Milind,





thank you for your shell script.





After adapting the paths it worked immediately !!!





A good idea to store all molecules in one sdf-file.








Best regards, Hans-Ulrich

User ef5e605ae6

23-02-2009 10:40:52

Dear Hans-Ulrich,








Quote:
And my suggestion to change the "Error notification window" as mentioned earlier is still valid.








I changed the exception's message for the XYZ case in the Marvin 5.2 branch: "Calculation result is not defined for XYZ input without bond information.". I hope it is OK, I cannot put links here easily and they would soon become dead links anyway.








Quote:
"The Error window comes when input file contains *no* bond information"


or are there other criteria?






Although I'm not the author of any calculator plugin and all my contribution to their code was the above little correction, I can tell you the answer: yes. The code can throw exceptions from various places and from various reasons.





best regards,





Peter

User 25d107bd42

23-02-2009 10:52:23

Hi Peter,





thank you, that's good information.





But one question, what's the meaning of:





"I cannot put links here easily and they would soon become dead links anyway."





"dead links" ???





Best regards, Hans-Ulrich

User ef5e605ae6

23-02-2009 11:01:23

The directory structure of the documentation was changed a year ago and the current structure still do not seem to be "final" for me. I would not dare to link anything from the code, especially not from such hidden parts of it.





regards,


Peter

User 25d107bd42

23-02-2009 11:04:53

Hi Peter,





Thank you for this quick answer.





Regards, Hans-Ulrich