All Questions
47
questions
6
votes
2
answers
870
views
Molecular simulation: Minimum Image Convention
Can you review the following code to check to see if the Minimum Image Convention is properly implemented?
...
6
votes
2
answers
482
views
Means square displacement (MSD)
I have written a code to calculate the MSD of some molecules. The code averages over multiple time origins (sliding time window) and over all the molecules. I have also made it do one extra thing: do ...
20
votes
3
answers
4k
views
Planetary simulation in python
I have created a program in python that calculates forces between bodies (i.e earth, moon and a hypothetical moon) and make them move according to the changes in velocity and forces. This is the code ...
5
votes
1
answer
231
views
Calculating the energy of the harmonic oscillator using a Monte Carlo method
The problem
The partition function for the quantum harmonic oscillator can be written in the path integral formulation as
$$Z\propto\int Dx(\tau)\exp\left(-\frac{S_E}{\hbar}\right)=\int Dx(\tau)\exp\...
0
votes
1
answer
229
views
Monte Carlo simulation for the harmonic oscillator
Is there any improvement that can be made to the following code, written to simulate the harmonic oscillator in the path integral formulation with Monte Carlo methods?
...
11
votes
3
answers
516
views
Membrane protein diffusion in different confinement models
I am a junior Software Engineer, C++ is usually my main jam but I started picking up Python for a research project I am doing in college. I am eager to learn as much Python syntax, tricks, best ...
2
votes
2
answers
1k
views
Solving the TDoA multilateration problem in 3-dimensions
Background.
I've written an algorithm to solve the Time Difference of Arrival (TDoA) multilateration problem in 3-dimensions. That is, given the known coordinates of ...
1
vote
1
answer
475
views
Solving a 3D heat diffusion PDE
I am trying to solve a heat diffusion type PDE using a finite difference method.
I would like to preface that I have seriously simplified the code. Just so that anyone who tries to help me, doesn't ...
8
votes
4
answers
1k
views
Python: Class to calculate different variables of a projectile motion with angle, velocity (+ initial height) (first OOP program)
I'd like to hear your constructive criticisms about my first OOP project. I explain more what I actually do in the code's comments, and I tried to be quite explanatory with names etc.
...
5
votes
1
answer
67
views
Exploring the space of 8 parameters of a physics problem to then be evaluated in ODE integrator as LSODA millions of times, efficently
there's a function in one of the scripts I've been working on that I really want to improve.
Disclaimer: Being honest, I'm not really very good at programming but I've been learning day to day and it'...
4
votes
1
answer
411
views
Path of a particle in a non-uniform B field
I have completed my project which simulates the path of a particle trapped in a device known as a magnetic mirror. I would like your thoughts and improvements on my implementation.
Here is the code:
<...
4
votes
1
answer
93
views
Phase diagrams of particles in a mirror
I have completed my project which models the paths of particles in a plasma experiencing a force. The program creates phase diagrams of a particle's perpendicular velocity against its parallel ...
4
votes
2
answers
117
views
Simulate transmission spectrum of extreme ultraviolet laser pulse through laser-dressed finite sample (Python Version)
I am currently participating in research on transient absorption spectroscopy and four wave mixing. In the experimental design, an extreme ultraviolet (XUV) laser pulse and infrared (IR) laser pulse ...
3
votes
0
answers
345
views
Suvat Calculator - Kinematics
Suvat stands for kinematics or
(s)displacement
(u)initial velocity
(v)final velocity
(a)acceleration
(t)time
This calculator can find the remaining 2 variables given 3 other variables!
Enter x on the ...
1
vote
2
answers
188
views
Better way to calculate double-scattering diffraction using cartesian product of arrays?
This script calculates points in reciprocal space for hexagonal 2D lattices, then uses the cartesian product from itertools to add each vector from one lattice to all of the vectors of the other in ...