Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PR for pycv #991

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
1cf992c
Attempting merge of pycv in v2.6
tonigi Oct 17, 2019
9d3542b
install PYCV prereqs and set PYTHON_BIN to python3
tonigi Oct 18, 2019
0444286
workaround the request for documenting components by adding the "py-"…
tonigi Oct 18, 2019
e3467bc
Delete README.md.upstream
tonigi Oct 18, 2019
5797ead
plumed-nest entry
tonigi Oct 18, 2019
04be32d
Update README.md
tonigi Oct 21, 2019
440212e
Merge tag 'v2.6.0' into v2.6-pycv-devel
tonigi May 23, 2020
7fa1259
update pybind to 2.5.0
tonigi May 23, 2020
e95e894
readme
tonigi May 23, 2020
bf6681f
readme
tonigi May 23, 2020
dd08b9f
add versions
tonigi May 23, 2020
147d476
add versions
tonigi May 23, 2020
f627fac
Merge tag 'v2.8.0' into v2.8-pycv-devel
tonigi Sep 5, 2022
1d64a49
regtest fixed
tonigi Sep 5, 2022
d023fd5
Attempting merge of pycv in v2.6
tonigi Oct 17, 2019
135d4cd
install PYCV prereqs and set PYTHON_BIN to python3
tonigi Oct 18, 2019
26439da
workaround the request for documenting components by adding the "py-"…
tonigi Oct 18, 2019
3e94e0e
Delete README.md.upstream
tonigi Oct 18, 2019
59bd537
plumed-nest entry
tonigi Oct 18, 2019
77e37a9
Update README.md
tonigi Oct 21, 2019
c7de834
update pybind to 2.5.0
tonigi May 23, 2020
007550b
add versions
tonigi May 23, 2020
66c8842
add versions
tonigi May 23, 2020
7dd5033
regtest fixed
tonigi Sep 5, 2022
517846c
update pybind 2.10.0
tonigi Sep 5, 2022
e6f9e17
travis restore
tonigi Sep 5, 2022
56990ca
add --embed for python
tonigi May 15, 2023
2946065
Merge remote-tracking branch 'origin/v2.8-pycv-devel' into pycvComm
Iximiel May 16, 2023
40b852a
remove possibly unused options for conda builds
tonigi May 16, 2023
fdada51
modernized the python interface
Iximiel Jun 9, 2023
9023646
updated gitignores
Iximiel Jun 9, 2023
ccd238d
added a test for the scopedIntepreter
Iximiel Jun 9, 2023
fa0c671
adjusted the tests
Iximiel Jun 13, 2023
e6e35f9
Merge branch 'v2.8-pycv-devel' of https://github.com/giorginolab/plum…
Iximiel Jun 14, 2023
5adb806
the base functionality is there
Iximiel Jun 19, 2023
9157624
now without verbose overloads
Iximiel Jun 19, 2023
aab51cf
setting up a better interface
Iximiel Jun 20, 2023
62cfede
passes the tests :)
Iximiel Jun 20, 2023
fd34d9a
small cosmetic changes
Iximiel Jun 20, 2023
40f6629
adding some "unit tests" to pyVector3d
Iximiel Jun 20, 2023
fc790dc
added and tested the interface to getPositions
Iximiel Jun 21, 2023
7c669a6
consolidating tests
Iximiel Jun 21, 2023
a3a28ea
added a toNumpy method for vector3D
Iximiel Jun 21, 2023
87a676c
the example should figure more clear now
Iximiel Jun 28, 2023
5a21e2b
added a test for the pbcs
Iximiel Aug 1, 2023
96a4006
now you can get the atomic positions as a np array
Iximiel Sep 21, 2023
22f1dbb
moved the embedded module in a separate source
Iximiel Sep 22, 2023
6e321ec
added an interface to the Pbcs
Iximiel Sep 22, 2023
6127962
moved test for clarity
Iximiel Sep 25, 2023
cf37bb8
adding getBox and getInvBox
Iximiel Sep 25, 2023
77393b9
Squashed commit of the following:
Iximiel Sep 27, 2023
1702a06
run astyle
Iximiel Sep 27, 2023
b0fa124
Changed the multicomponent return format
Iximiel Oct 2, 2023
cc3a06f
added the skeleton for the update func
Iximiel Oct 2, 2023
fa9d204
added a way to make data persist
Iximiel Oct 3, 2023
8b8a5dd
added charge and mass accessors but no tests
Iximiel Oct 12, 2023
74ae9de
added charge and mass accessors but no tests
Iximiel Oct 12, 2023
f413d99
Merge branch 'pycvCommUpdate' of https://github.com/Iximiel/plumed2 i…
Iximiel Oct 12, 2023
f0b7cce
first draft for the NL
Iximiel Oct 16, 2023
5f5b4c8
NL works, adding a test-example for the coordination
Iximiel Oct 17, 2023
5201992
the COORDINATIOn works (but no virial and devs)
Iximiel Oct 17, 2023
6a8d31a
added virial (for single value)
Iximiel Oct 17, 2023
009fd89
astyle'd
Iximiel Oct 17, 2023
488d303
setup rt-coord to test the virial
Iximiel Oct 17, 2023
f506f67
now the comment is more truthful
Iximiel Oct 17, 2023
5c85ab4
merged and changed how to compile the so
Iximiel Nov 9, 2023
3748b78
unification of the return interface
Iximiel Nov 9, 2023
f6ceb91
udpated tests + added list or tuple compatibility for return
Iximiel Nov 9, 2023
5d6f44a
added getAbsoluteIndex
Iximiel Nov 9, 2023
5fa428d
change in how AbsoluteIndexes are got
Iximiel Nov 10, 2023
e613092
preparing to add array getter for mass and charges
Iximiel Nov 10, 2023
d20ad68
Merge branch 'pycvCommUpdate' into pycvColvarMethods
Iximiel Nov 10, 2023
8fa06c5
added masses an charges array
Iximiel Nov 10, 2023
10a37b4
f Added some infomration on the ongoing MD
Iximiel Nov 10, 2023
f2560c0
set up the tests to be easier to work with
Iximiel Nov 10, 2023
5bb6bd7
set up the test for makeWhole
Iximiel Nov 14, 2023
5aa8f97
some reordering in the code
Iximiel Nov 14, 2023
197ba8b
moved the tree of pycv
Iximiel Nov 14, 2023
d9c0768
removed pybind11 from the directory
Iximiel Nov 14, 2023
59de055
moved the tree of pycv
Iximiel Nov 14, 2023
de7f0ab
set up a rationale for installation/compilation
Iximiel Nov 14, 2023
2e93bc9
moved also the tests
Iximiel Nov 14, 2023
018426b
clearer readme
Iximiel Nov 14, 2023
c557bec
Merge remote-tracking branch 'home/master' into pycvTree
Iximiel Nov 16, 2023
82e47b2
updated the LOAD to use the GLOBAL kw
Iximiel Nov 16, 2023
40caacd
preparing init for returning dictionary
Iximiel Nov 16, 2023
da034dd
Squashed commit of the following:
Iximiel Nov 23, 2023
b694f39
added a "doc" example
Iximiel Nov 23, 2023
4e8e14a
setting up function
Iximiel Nov 23, 2023
9e5b2e0
Squashed commit of the following:
Iximiel Nov 23, 2023
be6f6c9
preparinf for the emebedding
Iximiel Nov 23, 2023
77e548c
tested mdInfo in function
Iximiel Nov 24, 2023
847b106
now the function is embedded
Iximiel Nov 24, 2023
48295bc
changed how to threat errors, types and some movements
Iximiel Nov 24, 2023
8d726d1
added a test for func derivatives
Iximiel Nov 24, 2023
4b690d3
added arguments returned as ndarray
Iximiel Nov 24, 2023
8f98761
added components to pcvFunc
Iximiel Nov 24, 2023
f9aca88
applyed astyle
Iximiel Nov 24, 2023
87cb499
applyed astyle
Iximiel Nov 24, 2023
6ec0d6c
added some methods for function arguments
Iximiel Nov 24, 2023
8d5dfba
moved pycv in a 'plugins' folder
Iximiel Nov 29, 2023
bc2a118
Removing modifications to the respect of the master branch
Iximiel Nov 29, 2023
7a34d29
rmoved the old pycv tests
Iximiel Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added a test for the scopedIntepreter
  • Loading branch information
Iximiel committed Jun 9, 2023
commit ccd238d13f3b297c558292e8eeab23f0c41ef8ed
1 change: 1 addition & 0 deletions regtest/pycv/rt-multiplecalls/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../scripts/test.make
5 changes: 5 additions & 0 deletions regtest/pycv/rt-multiplecalls/colvar.out.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! FIELDS time cv1.py-d12 cv1.py-d13 cv12a cv13a
0.000000 7.071068 5.000000 7.071068 5.000000
1.000000 7.071068 8.660254 7.071068 8.660254
2.000000 7.071068 11.180340 7.071068 11.180340
3.000000 7.071068 8.660254 7.071068 8.660254
4 changes: 4 additions & 0 deletions regtest/pycv/rt-multiplecalls/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

type=driver
arg="--plumed plumed.dat --ixyz traj.xyz --dump-forces forces --dump-forces-fmt=%10.6f"
plumed_modules=pycv
45 changes: 45 additions & 0 deletions regtest/pycv/rt-multiplecalls/distcv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import numpy as np

# In reality one should not log stuff here...
log=open("log.txt","w",1)

print("At import",file=log)


# Define the distance function
def dist(x):
r = x[0,:]-x[1,:]
d2 = np.dot(r,r)
return np.sqrt(d2)

def grad_dist(x):
d = dist(x)
r = x[0,:]-x[1,:]
g = r/d
return np.array([g,-g])


# The CV function actually called
def cv(X):
print("At CV",file=log)
row12 = np.array([0,1])
row13 = np.array([0,2])

X12 = X[row12,:]
X13 = X[row13,:]

rf = {
'd12': dist(X12),
'd13': dist(X13)
}

gd12 = grad_dist(X12)
gd13 = grad_dist(X13)

rg = {
'd12': np.array([ gd12[0,:], gd12[1,:], [0.,0.,0.] ]),
'd13': np.array([ gd13[0,:], [0.,0.,0.], gd13[1,:] ])
}

return rf, rg

17 changes: 17 additions & 0 deletions regtest/pycv/rt-multiplecalls/plumed.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

cv1: PYTHONCV ATOMS=1,3,4 IMPORT=distcv FUNCTION=cv COMPONENTS=d12,d13

cv12a: DISTANCE ATOMS=1,3
cv13a: DISTANCE ATOMS=1,4

DUMPDERIVATIVES ARG=cv1.py-d12 FILE=GRAD_cv1d12 FMT=%.4f
DUMPDERIVATIVES ARG=cv1.py-d13 FILE=GRAD_cv1d13 FMT=%.4f
DUMPDERIVATIVES ARG=cv12a FILE=GRAD_cv12a FMT=%.4f
DUMPDERIVATIVES ARG=cv13a FILE=GRAD_cv13a FMT=%.4f

# RESTRAINT AT=0 SLOPE=-1 ARG=cv1

PRINT FILE=colvar.out ARG=*



24 changes: 24 additions & 0 deletions regtest/pycv/rt-multiplecalls/traj.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
4
100 100 100
X 5 0 0
X 0 0 0
X 0 5 0
X 5 5 0
4
100 100 100
X 5 0 0
X 0 0 0
X 0 5 0
X 0 5 5
4
100 100 100
X 5 0 0
X 0 0 0
X 0 5 0
X -5 5 0
4
100 100 100
X 5 0 0
X 0 0 0
X 0 5 0
X 0 5 -5