Skip to content

Commit

Permalink
Changed command line flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladme committed Dec 18, 2024
1 parent 18ba1b8 commit 7f43115
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 203 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "gcenter"
authors = ["Ladislav Bartos <ladmeb@gmail.com>"]
description = "Center Any Group in a Gromacs Trajectory"
version = "1.5.0"
version = "2.0.0"
license = "MIT"
edition = "2021"
repository = "https://github.com/Ladme/gcenter"
Expand Down
4 changes: 2 additions & 2 deletions src/argparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Be aware that `gcenter` exclusively supports orthogonal simulation boxes."
)]
pub struct Args {
#[arg(
short = 'c',
short = 's',
long = "structure",
help = "Input structure file",
long_help = "Path to a gro, pdb, pqr, or tpr file containing the system structure. If a trajectory is also provided, the coordinates from the structure file are ignored.",
Expand Down Expand Up @@ -94,7 +94,7 @@ This option cannot be used when the trajectory is a gro file since gro files are
pub end_time: Option<f32>,

#[arg(
short = 's',
short = 't',
long = "step",
help = "Write every <STEP>th frame",
default_value_t = 1,
Expand Down
64 changes: 32 additions & 32 deletions src/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod test {

#[test]
fn create_references_main() {
let command_line = ["gcenter", "-c=tests/test_files/input.gro", "-o=output.gro"];
let command_line = ["gcenter", "-s=tests/test_files/input.gro", "-o=output.gro"];
let args = Args::parse_from(command_line);

let mut system = System::from_file("tests/test_files/input.gro").unwrap();
Expand All @@ -202,7 +202,7 @@ mod test {
fn create_references_main_xy() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"-o=output.gro",
"-r=@protein",
"-xy",
Expand All @@ -228,7 +228,7 @@ mod test {
fn create_references_yzmain_xref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"-o=output.gro",
];
Expand All @@ -255,7 +255,7 @@ mod test {
fn create_references_yzmain_xref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=resid 1-21",
"-o=output.gro",
];
Expand All @@ -280,7 +280,7 @@ mod test {
fn create_references_ymain_xref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"-o=output.gro",
"-y",
Expand Down Expand Up @@ -308,7 +308,7 @@ mod test {
fn create_references_ymain_xref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@protein",
"-o=output.gro",
"-y",
Expand All @@ -334,7 +334,7 @@ mod test {
fn create_references_zmain_xref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"-o=output.gro",
"-z",
Expand Down Expand Up @@ -362,7 +362,7 @@ mod test {
fn create_references_xzmain_yref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"-r=@protein",
"--yref=@membrane",
"-o=output.gro",
Expand Down Expand Up @@ -390,7 +390,7 @@ mod test {
fn create_references_xzmain_yref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"-r=@protein",
"--yref=Protein",
"-o=output.gro",
Expand All @@ -416,7 +416,7 @@ mod test {
fn create_references_xmain_yref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"-r=@protein",
"--yref=@membrane",
"-o=output.gro",
Expand Down Expand Up @@ -445,7 +445,7 @@ mod test {
fn create_references_xymain_zref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--zref=serial 1 to 43",
"-o=output.gro",
];
Expand All @@ -472,7 +472,7 @@ mod test {
fn create_references_xymain_zref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--zref=serial 1 to 42",
"-o=output.gro",
];
Expand All @@ -497,7 +497,7 @@ mod test {
fn create_references_ymain_zref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--zref=serial 1 to 43",
"-o=output.gro",
"-y",
Expand Down Expand Up @@ -525,7 +525,7 @@ mod test {
fn create_references_ymain_zref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--zref=serial 1 to 42",
"-o=output.gro",
"-y",
Expand All @@ -551,7 +551,7 @@ mod test {
fn create_references_zmain_xyref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--yref=@membrane or Protein",
"-o=output.gro",
Expand Down Expand Up @@ -581,7 +581,7 @@ mod test {
fn create_references_zmain_xyref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--yref=Membrane",
"-o=output.gro",
Expand Down Expand Up @@ -609,7 +609,7 @@ mod test {
fn create_references_zmain_xyref_all_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--yref=Membrane",
"-r=Membrane",
Expand All @@ -636,7 +636,7 @@ mod test {
fn create_references_ymain_xzref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--zref=@water",
"-o=output.gro",
Expand Down Expand Up @@ -666,7 +666,7 @@ mod test {
fn create_references_ymain_xzref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--zref=resname POPC",
"-o=output.gro",
Expand Down Expand Up @@ -694,7 +694,7 @@ mod test {
fn create_references_ymain_xzref_all_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=Protein",
"--zref=@protein",
"-o=output.gro",
Expand All @@ -720,7 +720,7 @@ mod test {
fn create_references_xmain_yzref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--yref=@membrane",
"--zref=@water",
"--reference=Protein",
Expand Down Expand Up @@ -751,7 +751,7 @@ mod test {
fn create_references_xmain_yzref_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--yref=@membrane",
"--zref=@membrane",
"--reference=Protein",
Expand Down Expand Up @@ -780,7 +780,7 @@ mod test {
fn create_references_xmain_yzref_all_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--yref=@protein",
"--zref=resid 1 to 21",
"--reference=Protein",
Expand All @@ -807,7 +807,7 @@ mod test {
fn create_references_xyzref() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--yref=@water",
"--zref=@ion",
Expand Down Expand Up @@ -838,7 +838,7 @@ mod test {
fn create_references_xyzref_all_same() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=Membrane",
"--yref=@membrane",
"--zref=resname POPC",
Expand All @@ -865,7 +865,7 @@ mod test {
fn create_references_xyref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--yref=@water",
"-o=output.gro",
Expand Down Expand Up @@ -893,7 +893,7 @@ mod test {
fn create_references_xzref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"--zref=@water",
"-o=output.gro",
Expand Down Expand Up @@ -921,7 +921,7 @@ mod test {
fn create_references_xzref_same_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@protein",
"--zref=Protein",
"-o=output.gro",
Expand All @@ -947,7 +947,7 @@ mod test {
fn create_references_yzref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--yref=@membrane",
"--zref=@water",
"-o=output.gro",
Expand Down Expand Up @@ -975,7 +975,7 @@ mod test {
fn create_references_xref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--xref=@membrane",
"-o=output.gro",
];
Expand All @@ -1000,7 +1000,7 @@ mod test {
fn create_references_yref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--yref=@membrane",
"-o=output.gro",
];
Expand All @@ -1025,7 +1025,7 @@ mod test {
fn create_references_zref_nomain() {
let command_line = [
"gcenter",
"-c=tests/test_files/input.gro",
"-s=tests/test_files/input.gro",
"--zref=@membrane",
"-o=output.gro",
];
Expand Down
Loading

0 comments on commit 7f43115

Please sign in to comment.