make "coords" optional and infer natoms from "types" instead
This commit is contained in:
@ -814,7 +814,7 @@ for the "native" molecule file format.
|
||||
- overrides the auto-computed moments of inertia
|
||||
* - coords
|
||||
- a data block
|
||||
- yes
|
||||
- no
|
||||
- contains atom positions with the format "atom-id", "x", "y", "z" (same as Coords)
|
||||
* - types
|
||||
- a data block
|
||||
|
||||
@ -280,8 +280,8 @@ void Molecule::from_json(const std::string &molid, const json &moldata)
|
||||
error->all(FLERR, Error::NOLASTLINE, "Found {} instead of {} data entries for '{}'", sizevar, \
|
||||
sizecheck, #field);
|
||||
|
||||
JSON_INIT_FIELD(coords, natoms, xflag, true, 0);
|
||||
JSON_INIT_FIELD(types, dummyvar, typeflag, true, natoms);
|
||||
JSON_INIT_FIELD(types, natoms, typeflag, true, 0);
|
||||
JSON_INIT_FIELD(coords, dummyvar, xflag, false, natoms);
|
||||
JSON_INIT_FIELD(molecules, dummyvar, moleculeflag, false, natoms);
|
||||
JSON_INIT_FIELD(fragments, nfragments, fragmentflag, false, 0);
|
||||
JSON_INIT_FIELD(charges, dummyvar, qflag, false, natoms);
|
||||
|
||||
@ -302,5 +302,5 @@
|
||||
"required": ["format", "data"]
|
||||
}
|
||||
},
|
||||
"required": ["application", "format", "revision", "coords", "types"]
|
||||
"required": ["application", "format", "revision", "types"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user