-
Notifications
You must be signed in to change notification settings - Fork 1
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
ENH: Add RPC support #18
base: main
Are you sure you want to change the base?
Conversation
Since pycapnp uses dictionaries
Note that, thankfully, there is no real difference between working with this "simpler interface": @0xbd1f89fa17369103;
# Design kanged from eOn v4 C-style structs
# TODO(rg): Should be more object oriented
struct ForceInput {
natm @0 :Int32; # TODO(rg): Do we really need this..
pos @1 :List(Float64);
atmnrs @2 :List(Int32);
box @3 :List(Float64);
}
struct PotentialResult {
energy @0: Float64;
forces @1: List(Float64);
}
interface CuH2Pot {
calculate @0 (fip :ForceInput)
-> (result :PotentialResult);
} Or this redundant one: struct Position {
x @0 :Float64;
y @1 :Float64;
z @2 :Float64;
}
struct AtomMatrixRPC {
positions @0 :List(Position);
}
struct BoxMatrix {
box @0: List(Vector);
}
struct Vector {
x @0: Float64;
y @1: Float64;
z @2: Float64;
}
struct AtomTypes {
atomTypes @0: List(Int32);
}
struct PotentialResult {
energy @0: Float64;
forces @1: List(ForceVector);
}
struct ForceVector {
x @0: Float64;
y @1: Float64;
z @2: Float64;
}
interface CuH2Pot {
calculate @0 (positions :AtomMatrixRPC, atomTypes :AtomTypes, boxMatrix :BoxMatrix)
-> (result :PotentialResult);
} Which is essentially the design in 0e3d99c and 1dd36ad. Basically there is no time difference for running two servers.
Where Essentially this seems to suggest that more nested structures are OK, which is better (needs testing of course for buffer size). |
The design is still being threshed out.