Generate Gaussian 09 input files for the rotamers of an input compound.

Overview

Rotapy

Logo

Purpose

Generate Gaussian 09 input files for the rotamers of an input compound.

Distance to the axis of rotation remains constant throughout the rotation.

Usage

To walk through how to use Rotapy, we will walk through the rotation of the alcohol group of ethanol.

Start by opening Rotapy:

Empty

In this area here, you can select a .com, .log, or .xyz file to analyze. This can be done by clicking Browse and finding the file, or by copying and pasting the absolute file path into the input box:

Selecting Import Molecule Browse

With Import Molecule Text

With the file selected, click on the "Show Molecule" button to view the molecule. This view is 3d projected into 2d, and doesn't have proper perspective. It is possible to rotate and view the molecule from different angles however.

Figure View

We will need to make note of two atoms. The anchor atom, assuming we are rotating the alcohol group, is atom 1. The center atom, the atom which has all the substituents we want to rotate, is atom 5.

We can go back to the main rotapy window, and type in the number for the anchor atom in the anchor input, and the center atom into the center input.

Center and Anchor Added

If we wanted to make rotamers of the 15 degree rotations of the alcohol group, we type 15 into the Angle input.

Angle Added

Once all three numbers are selected, clicking the "Add" button will add the rotation to the queue.

Add Selected Added Alcohol Rotation

Notice that the Total Rotamers has increased to 24. This means that in the end, there will be 24 rotamers made. If we add a rotation to the queue representing the methyl group being flipped 180 degrees, we can see the number of rotamers double.

Added Methyl Rotation

If we wanted to remove a rotation from the queue, we can click on the rotation in the queue, then click the "Remove" button.

Selected Methyl Rotation Removed Methyl Rotation

Now that we have all the rotations that we want added, we can prepare for getting output. If we want to have .com files as an output, a directory must be selected. If a directory is not in the input box, the .com files will not be generated. The same goes for the image files. Images of the rotamers will not be generated if the input box is empty. A path to the directory must be provided, either by pasting the absolute path to the directory, or by browsing to the directory.

Added Output Directories

Since both the Com and Img outputs both have a directory, .com and .png files will be generated for the rotamers.

Now that we have the output locations, we can click the "Change Output Settings" button for more .com file output options.

Added Output Directories

From here you can change the charge, multiplicity, job, level of theory, basis set, the number of cores, the amount of memory, and the linda cores used. There is no validation for these inputs, so you may go through the process of rotating a ton of files, and end up with invalid option errors in Gaussian. If this happens, use this program to generate new com files with different settings, without having to perform the rotation calculations again.

There is also a setting called "Sequentially Name Files". If this setting is used, the files will be labelled, file_1, file_2, etc. If this setting is not checked off, the explicit rotations will be added to the file name instead. In the example of the methyl and alcohol group of ethanol being rotated, this would look like: ethanol_1a0c180d, ethanol_1a0c180d_1a5c30d, etc. 1a0c180d means, anchor atom 1, center atom 0, rotated 180 degrees. If there are multiple rotations in the same file name, they are listed. 1a0c180d_1a5c30d means that we rotate the methyl group 180 degrees, then the alcohol group 30 degrees. This results in very long file names, which is why this is not the default setting.

The "Reset to Default" button will reset the values of the inputs to the settings shown above.

Clicking the "Save" button will close the window, but will save the options you have chosen. The saved options are lost when Rotapy is closed, or the "Reset to Default" button is clicked.

With the options selected, click the "Perform Calculations" button to execute the rotation queue.

Added Output Directories

The progress bar will show what step Rotapy is working on, and how much progress is left. Once it has finished, Rotapy will pop up a message saying it is done.

Added Output Directories

If given a directory, the com and image files will be contained within, named with the selected naming scheme, and formatted with the selected options.

Work remaining for me

  • Allow for individual rotations, rather than a scanned rotation.

References used in code

You might also like...
Program Input Data Mahasiswa Oop
Program Input Data Mahasiswa Oop

PROGRAM INPUT NILAI MAHASISWA MENGGUNAKAN OOP PENGERTIAN OOP object-oriented-programing/OOP adalah paradigma pemrograman berdasarkan konsep "objek", y

A simple calculator that can add, subtract, multiply or divide depending upon the input from the user

Calculator A simple calculator that can add, subtract, multiply or divide depending upon the input from the user. In this example, we should have the

API to summarize input text

summaries API to summarize input text normal run $ docker-compose exec web python -m pytest disable warnings $ docker-compose exec web python -m pytes

An app that mirrors your phone to your compute and maps controller input to the screen

What is 'Dragalia Control'? An app that mirrors your phone to your compute and maps controller input to the screen. Inputs are mapped specifically for

Tool to generate wrappers for Linux libraries allowing for dlopen()ing them without writing any boilerplate

Dynload wrapper This program will generate a wrapper to make it easy to dlopen() shared objects on Linux without writing a ton of boilerplate code. Th

A Bot Which Can generate Random Account Based On Your Hits.

AccountGenBot This Bot Can Generate Account With Hits You Save (Randomly) Keyfeatures Join To Use Support Limit Account Generation Using Sql Customiza

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Generate Azure Blob Storage account authentication headers for Munki

Azure Blob Storage Authentication for Munki The Azure Blob Storage Middleware allows munki clients to connect securely, and directly to a munki repo h

🪄 Auto-generate Streamlit UI from Pydantic Models and Dataclasses.
🪄 Auto-generate Streamlit UI from Pydantic Models and Dataclasses.

Streamlit Pydantic Auto-generate Streamlit UI elements from Pydantic models. Getting Started • Documentation • Support • Report a Bug • Contribution •

Comments
  • Saving a large number of images has memory leak

    Saving a large number of images has memory leak

    Steps to reproduce:

    1. Go through the import and rotation procedure
    2. Set the rotation number very small, so that a couple hundred rotations are performed
    3. Save the images of the rotamers
    4. Observe the ram usage increase greatly.

    This is most likely caused by matplotlib.pyplot.savefig not releasing the memory once the file has been saved.

    I've tried:

    plt.cfg() ax.cla() plt.close('all')

    and a slew of other combinations.

    Here's a pastebin of the memory usage across two consecutive calls fo the "plot_structure" function.

    https://pastebin.com/raw/qQVN20bP

    opened by jkelowitt 0
Releases(v2.1)
  • v2.1(Jul 2, 2021)

    Main Changes:

    • Used multi-threading for writing the jobs to file. This results in ~15x speed increase for this task.
      • This cannot be done for the images, as matplotlib is not thread safe. Pools don't work either, as they open a main gui window for every process opened, and the processes don't run until the windows are closed. If I can find a way to automatically close the Process opened windows, but not the original window, this would be a viable method of speeding up the image task.
    • The progress bar now accurately shows the number of rotations remaining when calculating the rotamers.
    • Additional under-the-hood documentation
    Source code(tar.gz)
    Source code(zip)
    Rotapy.exe(79.21 MB)
  • v2.0(Jun 30, 2021)

    Main Changes:

    • Added a GUI

    Things left to do:

    • Figure out how to use processes with the image saving without opening a bunch of windows
    • Update README.md
    • Make the GUI have less of a 'designed by someone who isn't good at design' aesthetic
    Source code(tar.gz)
    Source code(zip)
    Rotapy.exe(79.21 MB)
  • v1.8(Jun 22, 2021)

  • v1.7(Jun 19, 2021)

    Main Changes:

    • Gauss09 was moved to a new repo
    • Atom color defaults to magenta if the atom doesn't have a specified color in code
    • Sped up initialization speed of Atom class
    • Shortened explicit rotamer naming convention
    • Added optional sequential naming convention
    • "B3LPY" is incorrect. Changed default theory to correct "B3LYP"
    • Added splash text
    • Changed %Chk extension to .mo
    Source code(tar.gz)
    Source code(zip)
    Rotapy.exe(45.99 MB)
  • v1.6(Jun 5, 2021)

    Main Changes:

    • Added example data to the git
    • Made the error for file's not found print out the valid file types.
    • Search for files in the current directory and in lower directories. NOTE: Files will still be saved in the working directory, not in the location of the original file.
    • File list is sorted by file path length
    • Minor text formatting
    • Added progress bar to the bond error checking loop because I think its hilariously fast.
    • Manually call make_bond_graph, rather than calling after every atom replacement. Results in a 5x rotation calculation speed improvement. make_bond_graph and bonded_atom_search are probably the slowest functions in the program, baring the save_figure function. Any improvement to them would yield great returns.
    • Angles are now rounded to 5 decimal places. This is an excess of decimal places, but it rounds out the machine precision errors (i.e. 5.10000000000001 -> 5.10000)
    • Encrypted python byte code to try to prevent windows from being mad at running the exe. The aes key is "horrible-aes-key". I think pyinstaller uses AES256.
    Source code(tar.gz)
    Source code(zip)
    Rotapy.exe(45.82 MB)
  • v1.5(Jun 4, 2021)

  • v1.4(Jun 4, 2021)

    Main Changes:

    • Aesthetic ordering of the rotation queue. The more atoms being rotated, the sooner they will be calculated. This results in a tiny performance boost, but also when viewing images of the rotamers, there will be less movement of the larger components. An alcohol will spin faster than a methyl group, if both are being spun on the same molecule.

    Pre-Aesthetic Change

    Post-Aesthetic Change

    • Removed some numpy dependencies. The way that distance was calculated, with numpy.linalg.norm, was extremely slow. I replaced this with just the solved Pythagoras equation, and saw a small improvement.

    • Added numba JIT compilation. Since the distance function was still taking a long time, and since it was used very often (every time a bond was checked), I figured it would benefit from Just In Time Compilation. I was right. At the cost of 17mb of exe file size, I saw a 10x improvement in the overall rotation calculation time. If there is any room for improvement in the rotating step of the calculation, it will be in the bond detection function. JIT won't help me anywhere else, as I don't have any rout calculations going on, but it will remain for now, because I like having 100 rotations per second over 10 rotations per second.

    Source code(tar.gz)
    Source code(zip)
    gauss09v1-1(2.17 KB)
    Rotapy.exe(45.93 MB)
  • v1.3(Jun 3, 2021)

    Main Changes:

    • User input is now verified
    • Can now use the 3d view after each additional rotation
    • Progress bars now auto-resize
    • Rotamers which break or form bonds are now tagged with "##ERR", where ## tells the number of bonds added or removed from the original compound, followed by ERR
    • Decreased fontsize so long titles fit in the plot.
    • Adjusted image plot design
    • Com file settings should be working now.
    Source code(tar.gz)
    Source code(zip)
    gauss09v1-1(2.17 KB)
    Rotapy.exe(28.93 MB)
  • v1.2(May 30, 2021)

  • v1.1(May 29, 2021)

  • v1.0(May 27, 2021)

    This is the initial release. There's a good chance that it's garbage, but that's why we have version numbers.

    Run this .exe file in the same directory as the .log file you want to 'rotamate'.

    Follow the directions, and you'll end up with some rotamer .com files in your chosen directory.

    I've also thrown in a new version of gauss09, so that it will submit jobs for every .com file in the working directory, rather than the alphabetical first .com file.

    Source code(tar.gz)
    Source code(zip)
    gauss09v1.1(2.17 KB)
    Rotapy.exe(29.12 MB)
Owner
Chemistry undergraduate at BYU-Idaho
null
Plugin to generate BOM + CPL files for JLCPCB

KiCAD JLCPCB tools Plugin to generate all files necessary for JLCPCB board fabrication and assembly Gerber files Excellon files BOM file CPL file Furt

bouni 566 Dec 29, 2022
python scripts and other files to generate induction encoder PCBs in Kicad

induction_encoder python scripts and other files to generate induction encoder PCBs in Kicad Targeting the Renesas IPS2200 encoder chips.

Taylor Alexander 8 Feb 16, 2022
Generate PNG filles from NFO files.

Installation git clone https://github.com/pcroland/nfopng cd nfopng pip install -r requirements.txt Usage ❯ ./nfopng.py usage: nfopng.py [-h] [-v] [-i

null 4 Jun 26, 2022
What Do Deep Nets Learn? Class-wise Patterns Revealed in the Input Space

What Do Deep Nets Learn? Class-wise Patterns Revealed in the Input Space Introduction: Environment: Python3.6.5, PyTorch1.5.0 Dataset: CIFAR-10, Image

null 8 Mar 23, 2022
Multifunctional Analysis of Regions through Input-Output

MARIO Multifunctional Analysis of Regions through Input-Output. (Documents) What is it MARIO is a python package for handling input-output tables and

null 14 Dec 25, 2022
Appointment Tracker that allows user to input client information and update if needed.

Appointment-Tracker Appointment Tracker allows an assigned admin to input client information regarding their appointment and their appointment time. T

IS Coding @ KSU 1 Nov 30, 2021
Given tool find related trending keywords of input keyword

blog_generator Given tool find related trending keywords of input keyword (blog_related_to_keyword). Then cretes a mini blog. Currently its customised

Shivanshu Srivastava 2 Nov 30, 2021
A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scalar Curvature and the Kretschmann Scalar

A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scalar Curvature and the Kretschmann Scalar

null 2 Nov 27, 2021
The fetch of the delegator list and the input of the epoch nonce need to be done independently

raffle The fetch of the delegator list and the input of the epoch nonce need to be done independently. Get the list of delegators at the epoch change.

null 1 Dec 15, 2021
Program Input Nilai Mahasiswa Menggunakan Fungsi

PROGRAM INPUT NILAI MAHASISWA MENGGUNAKAN FUNGSI Nama : Maulana Reza Badrudin Nim : 312110510 Matkul : Bahas Pemograman DESKRIPSI Deklarasi dicti

Maulana Reza Badrudin 1 Jan 5, 2022