Re: Dear Prof. Wang,

49 views
Skip to first unread message

Y. Wang

unread,
Nov 18, 2024, 5:35:04 AM11/18/24
to Mike Tse (MachineCrab), Tools from yuxiangwang321
Hi Mike,

Thank you for trying the code. My first impression is: is the number of atoms too large? If so, this could be a hardware problem. But it is also possible due to other reasons such as the use of parameters. If you don't mind, can you share a short piece of your trajectory, i.e., about 100 frames in which you have the memory problem, and your command and output files as well, so I can give a test. Thank you.

Best regards,
Yuxiang

On Mon, 18 Nov 2024 at 18:08, Mike Tse (MachineCrab) <zhiya...@gmail.com> wrote:
  I am grateful for the program that calculates the contact angle. However, I encountered an issue while using it and would appreciate your assistance in resolving it. The wetting angle can typically be calculated in the trajectory file (file extension .lammpstrj). However, as the calculation time progresses, the system memory gradually becomes full. Once full, the VMD software (64-bit) displays a flashing back and crashes. It is necessary to manually clear the memory during the calculation process. Initially, the program was functioning correctly; however, after calculating approximately 80 frames of data, the computer displayed a black screen for several seconds, and then the VMD program crashed. Could this issue be related to the format of the trajectory file? How should this problem be resolved? I look forward to receiving your reply.

Best wishes,
Mike

--
You received this message because you are subscribed to the Google Groups "Tools from yuxiangwang321" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tools-from-yuxiang...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tools-from-yuxiangwang321/333e0135-03cf-4b63-b203-8d06518c0895n%40googlegroups.com.

Y. Wang

unread,
Nov 23, 2024, 6:41:59 PM11/23/24
to Mike Tse (MachineCrab), Tools from yuxiangwang321
Hi Mike,

First, It would be better to discuss the code issue in this GOOGLE group instead of a private one, so other users can learn if they have similar ones.

Thank you for sharing your trajectory file. I just had a check (sorry for the late response), my laptop can process the file to frame 222 but also crash by using your command:

cac Test.lammpstrj Test.lammpstrj xy 50 300 1 {index 0 to 5975} 3 0.0324 0.1 3 0.5 0.5

Here the atomselection parameter is modified, you have 5976 water atoms with index starting from 0, so your atomselection parameter should be {index 0 to 5975}. Your previous command made two mistakes here:1, you didn't start from 0, and the number of atoms is wrong.
----------------------- PLEASE NOTE -----------------------
                 VMD atom index start from 0

I think there does exist a memory problem. But don't worry, this can be addressed.  I suggest you do the following:

Solution_1
1, Load your whole trajectory into VMD;
2, Save the frames you would like to compute in VMD; 
3. Load the new saved smaller trajectory file, and do the calculation.
Try this command:
cac Test.lammpstrj Test.lammpstrj xy 0 250 1 {index 0 to 5975} 3 0.0324 0.1 3 0.5 0.5
But this may still cause the memory problem, if so, try the next.

Solution_2
You said you can compute about 80 frames, this is good. Please note, it is unnecessary to set the step as 1, you can use a larger step, such as 5 or 10, so you can still compute frome frame 50 and stop at frame 300, but with a much smaller number of computed frames, such as only 50 if the step is 5, that normally can still give you a smooth profile I think.
Try this command:
cac Test.lammpstrj Test.lammpstrj xy 50 300 5 {index 0 to 5975} 3 0.0324 0.1 3 0.5 0.5

I hope that can help you.

Best regards,
Yuxiang

Mike Tse (MachineCrab)

unread,
Nov 24, 2024, 9:22:59 PM11/24/24
to Tools from yuxiangwang321
Dear Prof. Wang,

Thank you very much for your kind help and I apologies for my accidental private reply, this is the first time I've used google group, maybe I need to click ‘reply all’ when replying?

I tried the  Solution_1  method before requesting your help, and it does still have the memory error, but the  Solution_2  you provided does a good job of providing me with the data I need, which has been able to greatly improve the efficiency with which I can get the data, thank you very much.

Best wishes,
Mike

Y. Wang

unread,
Nov 25, 2024, 12:13:25 AM11/25/24
to Mike Tse (MachineCrab), Tools from yuxiangwang321
Glad to hear you made it!

Yes, "Reply to all" will reply to both me and the group.

Reply all
Reply to author
Forward
0 new messages