Skip navigation
48660 Views 12 Replies Latest reply: Jul 25, 2012 2:09 AM by stodd RSS
Currently Being Moderated

Jun 18, 2010 6:31 AM

XYZ exporter

Hi there,

 

A very short script to export a molecule in the simple XYZ file format. This is based on a script in the Examples folder written by John Lear.

 

This script requires only the Materials Visualizer and will run on Materials Studio 4.1.

 

Best regards,

 

Stephen

Attachments:
  • lishu917 Contributor 2 posts since
    May 20, 2008
    Currently Being Moderated
    May 20, 2008 2:57 AM (in response to stodd)
    Re: XYZ exporter
    It's very useful.Thank you!
  • mjnikzad Contributor 3 posts since
    Oct 16, 2009
    Currently Being Moderated
    Oct 16, 2009 8:34 AM (in response to stodd)
    Re: XYZ exporter
    Tank you
    it is good.
    • JamesJack Accelrys 114 posts since
      Jan 14, 2011
      Currently Being Moderated
      Feb 23, 2012 6:00 AM (in response to stodd)
      Re: XYZ exporter

      Hi There,

       

      Just wanted to point out that there's also an add-in for Accelrys Draw than can save on approx. 100 different formats including .xyz.

       

      Here is Benzene saved as xyz from Accelrys Draw:

       

      6

      C 10.35280 -3.34640 0.00000

      C 11.37590 -2.75610 0.00000

      C 12.39510 -3.34580 0.00000

      C 12.39510 -4.52730 0.00000

      C 11.37840 -5.11680 0.00000

      C 10.35280 -4.53260 0.00000

       

  • purnimakhal Contributor 5 posts since
    Jun 24, 2012
    Currently Being Moderated
    Jun 24, 2012 4:43 PM (in response to stodd)
    XYZ exporter

    Hey stephen,

     

    I want to know more about the XYZ exporter. How to generate the XYZ coordinates from the .xsd file I have from a DMol3 Calculation. Is it possible to get the coordinates for an optimized structure of a huge material like an enzyme ( will need the center or the xyz coordinates of the amino acids in the enzyme). If this is possible how do we generate it. We have the version6.0 now.

     

    Thanks,

  • purnimakhal Contributor 5 posts since
    Jun 24, 2012
    Currently Being Moderated
    Jun 25, 2012 3:41 PM (in response to stodd)
    XYZ exporter

    hey stephen,

    Below are the instructions you have given for the script to run.

    I am not able to run the script for the xsd file and see the output. Can help me out how to give the output folder path.

    I dont know if my script file is added to My Favourites folder. Please help me out.

     

    --------------------------------------------------------------------------------------------------------------------------

     

    This version of the script, with the name *SL.pl, has been set up for use with the script library, using the default My Favorites location. To use this script, perform the following actions.

     

     

    1.          Extract the perl script and .xml files from the zip file.

    2.          Import the perl script into Materials Studio.

    3.          Use the Script Library dialog to add the script into your My Favourites folder.

    4.          Change to the User Menu tab and Import the xml

     

     

    A user menu option should be created in a Visualization group called Export XYZ. You should be able to run the script directly from the User Menu on an 3D Atomstic structure.

  • purnimakhal Contributor 5 posts since
    Jun 24, 2012
    Currently Being Moderated
    Jun 26, 2012 4:29 PM (in response to stodd)
    XYZ exporter

    Where do I need to given in the output folder path?

    When I run the script it gives me the error below:

     

    Could not write \\water.xyz file at -e line 38.

     

    -----------------------------------------------------------------------------

     

    # Simple XYZ exporter configured to work with the Script Library. In this case, the folder location should

    # be copy and pasted from Windows Explorer. The script will handle conversion and export.

     

    # Note that this will fail if you try to export a periodic structure.

     

     

    # Set up the output folder as an argument

    my %Args;

    GetOptions(\%Args, "OutputFolder=s");------------------------- do I need to change this???

    my $outputfolder = $Args{OutputFolder};

     

     

    # Set the document to the active document

    my $doc = Documents->ActiveDocument;

     

     

    # Check to see if a lattice is defined - if not, export the xyz file

    eval {$doc->Lattice3D->LengthA;};

  • purnimakhal Contributor 5 posts since
    Jun 24, 2012
    Currently Being Moderated
    Jun 27, 2012 2:51 PM (in response to stodd)
    Re: XYZ exporter

    I figured out to setup output folder. I have an active site of an enzyme with 97 atoms. ( Ca, PQQ molecule, three amino acids, three water molecules). I tried the script change you mentioned.

    foreach my $subUnit (@{$doc->SubUnits}) {
         print $subUnit->Center->X." ".$subUnit->Center->Y." ".$subUnit->Center->Z."\n";
    }

     

    Result :

    97

    Generated by Materials Studio on 2012-06-27 at 16:26:46

     

     

    Please help out. I have an active site with 13 amino acids, PQQ, Ca, water molecules. I will need the center for each of these.

     

    Thank you.

     

    Accordingly I also made changes to the script and attached is the file. Please let me know how to obtain the centers.

    Attachments:

More Like This

  • Retrieving data ...

Bookmarked By (1)