Comments (6)
Actually this is basically done. The only thing is that some of our objects are not perfectly picklable due to some lambda functions. So if that could be cleaned up then it would just work.
from pyqmc.
ok great, I can go through and change the lambda functions. By "done", do you mean there's a built-in python object that we can use as the "client" in our current structure? Like client=ThreadPoolExecutor(max_workers=2)
?
from pyqmc.
yeah you can use an executor for the client, at least in principle.
from pyqmc.
I think this will not work unless we remove the lambda function definitions from the objects: Some are overused; for example, there is a lot of repeated code in this get_wrapphase business.
../pyqmc/ewald.py: self.ee_const = lambda ne: ne * (ne - 1) / 2 * ijconst + ne * squareconst
../pyqmc/ewald.py: self.ei_const = lambda ne: -ne * i_sum * ijconst
../pyqmc/ewald.py: self.e_single = lambda ne: (ne - 1) * ijconst - i_sum * ijconst + squareconst
../pyqmc/ewald.py: rs = lambda ne: (3 / (4 * np.pi) / (ne * cellvolume)) ** (1 / 3)
../pyqmc/ewald.py: xc_correction = lambda ne: cexc / rs(ne)
../pyqmc/jastrowspin.py: a_value = list(map(lambda x: x.value(rvec, r), self.a_basis))
../pyqmc/jastrowspin.py: b_value = list(map(lambda x: x.value(rvec, r), self.b_basis[1:]))
../pyqmc/multislater.py: self.get_phase = (lambda x: x / np.abs(x)) if self.iscomplex else np.sign
../pyqmc/multislaterpbc.py: self.get_phase = lambda x: x / np.abs(x)
../pyqmc/multislaterpbc.py: self.get_wrapphase = lambda x: np.exp(1j * x)
../pyqmc/multislaterpbc.py: self.get_wrapphase = lambda x: (-1) ** np.round(x / np.pi)
../pyqmc/obdm.py: self.get_wrapphase = lambda x: np.exp(1j * x)
../pyqmc/obdm.py: self.get_wrapphase = lambda x: (-1) ** np.round(x / np.pi)
../pyqmc/slater.py: self.get_phase = lambda x: x / np.abs(x)
../pyqmc/slater.py: self.get_wrapphase = lambda x: np.exp(1j * x)
../pyqmc/slater.py: self.get_wrapphase = lambda x: (-1) ** np.round(x / np.pi)
from pyqmc.
yup i've already started a branch to work on cleaning those out. I was having an issue with the ewald test, I'll submit a PR when I get it worked out
from pyqmc.
It looks like the pull request #190 fixed this issue. Marking resolved.
from pyqmc.
Related Issues (20)
- J3.py has no testvalue_many attribute HOT 1
- Broken documentation
- [Question] Run VMC starting from CISD wavefunctions HOT 8
- Documentation error HOT 1
- New timestep algorithm? HOT 1
- compute variance
- Implement ensemble excited state optimization from Entwistle et al HOT 1
- distance function dist_i is confusing HOT 1
- Implement orbital evaluation HOT 3
- Conditional wave function package
- Unexpected kpts property generated by RKS() leading to UnboundLocalError in determinant_tools.py
- Abstract Base Classes for better documentation
- Attribute error in PeriodicConfigs object HOT 2
- Significant increase in energy with wavefunction optimization HOT 5
- Support batch optimization in linemin HOT 1
- sample_many should take a dictionary
- a problem with 3-body Jastrow factor HOT 3
- GeminalJastrow missing testvalue_many
- ThreeBodyJastrow missing testvalue_many
- Question Regarding T-Moves Implementation in PyQMC HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyqmc.