Week 4: Local builds and Python API design

ruhi
Published: 06/22/2023

Overview

This week I was setting up d-seams in my Mac, but that did not seem like a great idea as some requirements for d-seams were not supported on the M1 Mac (I opened an issue and PR regarding this). I had to figure out a way to run it on a remote linux machine.

I was also working with how the code design would look like.

import pyseams

# Configuration Variables
cutoffRadius = 3.5
oxygenAtomType = 2
hydrogenAtomType = 1
targetFrame = 1
finalFrame = 1
frameGap = 1
maxDepth = 6
isSlice = False
sliceLowerLimits = [0, 0, 0]
sliceUpperLimits = [0, 0, 0]
outDir = "runOne/"
trajectory = "input/traj/exampleTraj.lammpstrj"
lowestAtomID = 0

print("\nWelcome to the Ice Type Determination Module\n")

resCloud = None  # Initialize resCloud variable

for frame in range(targetFrame, finalFrame + 1, frameGap):
    resCloud = pyseams.readFrameOnlyOne(trajectory, frame, resCloud, oxygenAtomType, isSlice, sliceLowerLimits, sliceUpperLimits)
    nList = pyseams.neighborList(cutoffRadius, resCloud, oxygenAtomType)
    hbnList = pyseams.getHbondNetwork(trajectory, resCloud, nList, frame, hydrogenAtomType)
    hbnList = pyseams.bondNetworkByIndex(resCloud, hbnList)
    rings = pyseams.getPrimitiveRings(hbnList, maxDepth)
    pyseams.prismAnalysis(outDir, rings, hbnList, resCloud, maxDepth, lowestAtomID, targetFrame, frame, False)

print("Ice Type Determination completed.")

This is just a rough draft. I will be working on it to make it more perfectly.

Check-in Questions

What did you do this week?

  1. build issues in GitHub.

  2. did a pull request on GitHub.

  3. worked a little bit on pybind design.

What is coming up next?

  1. I will make a repository with python bindings which will be linked with d-seams as a shared library.

  2. d-seams and python binding uses cmake. I am not that comfortable with cmake so I was planning to use meson for the python bindings. Meson supports pybind11 as mentioned here

  3. I will also work on the python design a bit more.

Did you get stuck anywhere?

I was stuck as my M1-macos machine didn't support certain requirements of d-seams which set me back a little bit. I had to work on a linux machine. My mentor helped me out with the process.

DJDT

Versions

Time

Settings from gsoc.settings

Headers

Request

SQL queries from 1 connection

Static files (2312 found, 3 used)

Templates (11 rendered)

Cache calls from 1 backend

Signals

Log messages