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

Change "DataSet already present" message from Warning to Error #850

Open
hainm opened this issue Oct 12, 2020 · 1 comment
Open

Change "DataSet already present" message from Warning to Error #850

hainm opened this issue Oct 12, 2020 · 1 comment

Comments

@hainm
Copy link
Contributor

hainm commented Oct 12, 2020

Hi, while working on Amber-MD/pytraj#1553, I've realized that cpptraj message is not very clear to me.

parm tz2.parm7
trajin tz2.nc
rms myrms @CA
radgyr myrms @CA nomax

Here is the message:

CPPTRAJ: Trajectory Analysis. V4.30.0 (GitHub)
    ___  ___  ___  ___
     | \/ | \/ | \/ | 
    _|_/\_|_/\_|_/\_|_

| Date/time: 10/11/20 22:11:19
| Available memory: 3.272 GB

INPUT: Reading input from 'c.in'
  [parm tz2.parm7]
	Reading 'tz2.parm7' as Amber Topology
	This Amber topology does not include atomic numbers.
	Assigning elements from atom masses/names.
	No SCEE section: setting Amber default (1.2)
	No SCNB section: setting Amber default (2.0)
  [trajin tz2.nc]
	Reading 'tz2.nc' as Amber NetCDF
  [rms myrms @CA]
    RMSD: (@CA), reference is first frame (@CA).
	Best-fit RMSD will be calculated, coords will be rotated and translated.
  [radgyr myrms @CA nomax]
Warning: DataSet 'myrms' already present.
Error: Could not initialize action [radgyr]
	1 errors encountered reading input.
TIME: Total execution time: 0.0671 seconds.
Error: Error(s) occurred during execution.

What's the reason of Error: Could not initialize action [radgyr]. Is that because of Warning: DataSet 'myrms' already present.. If yes, should the Warning should be Error?

@drroe
Copy link
Contributor

drroe commented Oct 12, 2020

What's the reason of Error: Could not initialize action [radgyr]. Is that because of Warning: DataSet 'myrms' already present.

Yes, you can't give 2 data sets the same name.

If yes, should the Warning should be Error?

Probably. I forget originally why I made it a warning. I think I had some half-baked idea to have cpptraj automatically append a number to the set so the calculation could continue, but ultimately decided that violated the principle of least surprise and wasn't worth it. I'll try to fix that this week.

@drroe drroe changed the title Error: Could not initialize action [radgyr] Change "DataSet already present" message from Warning to Error Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants