Science topic
Python Scripting - Science topic
Explore the latest questions and answers in Python Scripting, and find Python Scripting experts.
Questions related to Python Scripting
Hello everyone:
I am trying to convert each spectrum in my pseudo-2D spectrum into ASCII files. My current approach is: using the "split2d" AU program to split the spectrum into multiple PROCNOs, then manually navigating to each PROCNO and running the "convbinasc" AU program to convert it into an ASCII file. Afterward, I process the data using a Python script. However, this process is somewhat cumbersome. I would like to know if it is possible to rewrite an AU program to automatically perform the step of reading PROCNO and executing "convbin2asc"?
Hi every one,
I have learn the qiime2 amplicon pipeline for paired-end sequencing files and these official tutorials are really helpful. There are some paired end sequencing files and full length amplicon files in my research. I want to analyze them using qiime2 pipeline but I have no idea how to import them together into QIIME2. I have come out two solutions but I didn't try it.
Solution 1: Create a slice of sequences comprised of target variant region and its primer, barcode sequences using awk or python script. Then, cut the slice into forward read and reverse read. These paired read sequences will be imported into qiime2.
Solution 2: First we merged the forward read and paired read after removing barcodes & primer sequences. Second, create a slice of target variant region. Finally, we import these single end sequences into qiime2.
Are there any available tutorials for importing both paired end files and full length single end files?
Hi All,
I nee script python to detect endpoints information(path, method, parameters) from code source of java farmwork such as Spring boot, jax-rs
Hi Folks,
In this discussion, I will provide my Python code for everyone interested in working with DEM in PFC software.
The calibration process in DEM modeling is highly time-consuming, requiring researchers to continuously monitor their computers and adjust their models through trial and error.
This process can be significantly streamlined by developing a Python script that runs in both PFC3D and 2D software. This script can manage other model scripts, run the model, save images, export data, and even adjust micro-parameters with new inputs!
All you need to do is define a range of possible inputs and run the Python script. It takes a few hours to input all your data into the model during each iteration. Finally, you can compare the outputs with the expected results.
I hope this code will assist you in your future DEM modeling endeavors.
Hi. I'm using the statannotations package in a python script to plot and statistically compare my data. Its a repeated measures ANOVA with multiple time points and two categories (control and treated). Some time points are significantly different, showing "*". Some are not different, showing "ns".
However, for some of the time points I get the annoyingly elusive "* (ns)" outcome, what does that mean? Is it significant? (then why put the ns in brackets instead of leaving it out). Is it not significant anymore after post hoc correction? (then why is the "ns" in brackets and not the "*"?). It doesn't make any sense to me. The documentation is not helpful and doesn't mention that case. Please help
To change mechanical properties from a part in abaqus created via a python script, i want to expand the code by a function that selects random elements from the selected part, add those elements to a new set and assign a section with different material properties to these elements. My code somehow won't work from the part when the new set, containing the selected elements is created. I'm unable to find my mistake; The failure-message is something like "Feature Creation Failed".
Code:
def replace_material_randomly(percentage, model_name, part_name):
print_cmd('------------------replace_material_randomly-----------------')
# Access the part from the model
p = mdb.models[model_name].parts[part_name]
# Define the new section
mdb.models[model_name].HomogeneousSolidSection(
name='New-Section', material='MATERIAL2', thickness=None)
# Get all elements in the decided set
elements = p.sets['All_solids'].elements
num_elements_to_replace = int(float(len(elements)) * float((percentage / 100)))
# Randomly select elements to replace
indices_to_replace = random.sample(range(len(elements)), num_elements_to_replace)
elements_to_replace = [elements[i] for i in indices_to_replace]
# Create a set of the elements to replace
region = p.Set(elements=elements_to_replace, name='Elements_to_replace')
# Delete previous section assignments for these elements
p.deleteSectionAssignments(elements=elements_to_replace)
# Assign the new section to the selected elements
p.SectionAssignment(region=region, sectionName='New-Section', offset=0.0,
offsetType=MIDDLE_SURFACE, offsetField='',
thicknessAssignment=FROM_SECTION)
I would really appreciate any kind of help!
Hello, I'm doing research on the degree of optimization of a groundwater monitoring network for a study area in The Netherlands. I'm conducting an elimination approach; monitoring wells that do not have informational relevance to the network are eliminated from the network. Now, I would like to analyze the sensitivity of the input data (groundwater level data of all monitoring wells) to understand how variations in the input data can affect the output of the model (optimal number of monitoring wells, monitoring wells that area eliminated). The sensitivity analysis would give insight into the reliability of the model, thinking of the eliminated monitoring wells and how I can minimize the RMSE of the model and MAE of the eliminated monitoring wells. What would be a suitable method for a SA in Python? I heard things about Monte Carlo and Sobol, but I'm not sure if those will fit in my Python script.
Many thanks in advance!
Scientists interested in Gamma spectrometry. I have written an open source Python program for Gamma spectrometry, it launches in your default browser and it is so easy to use you should not need the manual.
The program is compatible with any sound card spectrometer like the Gammaspectacular, as well as serial devices by Atom-Spectra.
Source code here:
Mac app bundle here:
Hello,
I'm writing Python scripts for Abaqus and I'm facing a problem. I need to change the coordinate system in a .odb file before extracting data but I'm stuck. I can create my coordinate system and extract the data but not the intermediate step. How can I change it using Python ? If you have any information, it would be great.
Best regards,
Benjamin Martin
Hi all,
I am looking to define a surface on one end of my wire element (or beam element) through a Python script. I can select this correctly in the Abaqus/CAE with no problem as I can see which end is needed based on the colour-coded arrows (magenta and yellow). However, when it comes to scripting, I was given the following options end1Edges, end2Edges & circumEdges to choose from. My question is, how do I know if the end I wanted is end1Edges or end2Edges?
Many thanks for any help!
Regards,
Heng
Which Machine learning algorithms suits best in the material science for the problems that aims to determine the properties and functions of existing materials. Eg. typical problem of determination of band gap of solar cell materials using ML.
Hello everyone,
I am currently exploring several options to give the collected data the greatest value possible.
I have demographic data on older people, where I perform various memory and mood tests. The previous hypotheses were the following:
- Drawing out the difference between dementia and depression.
- Identify if the digital tool is as effective as the classic one
- Contributing to the data collected as a predictor of dementia
A few years ago, studies talked about the real possibility of predicting some years before, what your future mental health will be in terms of memory.
Do you think there is any way to provide value in that sense, with demographic data, clinical tests like MoCa, Yesavage, Lawton, MFE?
Here you are some of these studies.
Study of the brain through images:
- Jagust, W. (2018). Images of the evolution and pathophysiology of Alzheimer's disease. Nature Reviews. Neuroscience, 19(11), 687–700. doi:10.1038/s41583-018-0067-3.
Analysis of biomarkers in cerebrospinal fluid or blood:
- Hampel, H., O'Bryant, S. E., Castrillo, J. I., Ritchie, C., Rojkova, K., Broich, K.,… Lista, S. (2018). PRECISION MEDICINE – The golden door for the detection, treatment and prevention of Alzheimer's disease. Journal of Alzheimer's Disease Prevention, 5(4), 243–259. doi:10.14283/jpad.2018.29.
Genetic studies:
- Karch, C. M., and Goate, A. M. (2015). Alzheimer's disease risk genes and mechanisms of disease pathogenesis. Biological Psychiatry, 77 (1), 43–51. doi:10.1016/j.biopsych.2014.05.006.
Cognitive evaluations and neuropsychological tests:
- Amariglio, R. E., Becker, J. A., Carmasin, J., Wadsworth, L. P., Lorius, N., Sullivan, C.,… Sperling, R. A. (2012). Subjective cognitive complaints and amyloid burden in cognitively normal older people. Neuropsychology, 50(12), 2880–2886. doi:10.1016/j.neuropsychologia.2012.08.011.
With python and with sk-learn is a best way to start?
Which features are the more relevants to add value to the prediction?
Thanks in advance,
i have performed simulation in two steps and I wasn't able to merge the energy files. Provide help
Does anyone knows how to convert an h5ad file into rds file, using an python script?
The focus is on computing Electrochemical Impedance Spectroscopy (EIS) computationally. If it's feasible to perform EIS calculations using VASP, Python scripts, or specialized software, kindly provide relevant links or information.
Hi experts,
I heard we can use Grand Canonical Monte Carlo (GCMC) or a combination of other ensembles and techniques like a third-party plugin or script by modifying the source code. Also, maybe the NVT ensemble can serve as a starting point for µVT simulation and then use a technique like semi-grand canonical Monte Carlo or Gibbs ensemble Monte Carlo, both of them require significant modifications to the simulation protocol and possibly the source code.
If there is a straightforward method, please tell me.
Best regards,
S.Ziaei
I am trying to select the face of a box and define it as a Surface using Python scripting in ABAQUS. I had already tried findAt and getBoundingBox. The face is getting selected, but I am unable to define that as a Surface.
After the face is selected, I use this command
"mdb.models['Model-1'].parts['BottomLayerB'].Surface(faces=faces, name='TopB')" to define this face as a surface.
The exact error is "TypeError: keyword error on faces".
It would be helpful if someone could provide a solution to this error.
Dear all,
I’m trying to define single nodes in an * equation line as below:
*Equation
2
8, 2, 1.
7, 2, -1.
Where 8 and 7 are nodes. When I import the file to ABAQUS, I’m getting this error Warning: The element set "EqnSet-…" was not imported.
I was trying to decrease the size of my code and .inp file by using node labels directly instead of putting every single node in a single set.
Am I missing something in my lines above?
Many thanks
Sadik
I am doing Finite Element Method (FEM) Analysis of a composite pressure vessel using ANSYS tool. I need to understand the creation of Lookup Table for defining the fiber angle orientation (especially the Dome region). Any help in regards to python scripting or CSV file import would be appreciated.
Recently, I installed Modeller 10.4 software into my windows 10, 10GB RAM, 64x bit laptop to predict a 3D structure of a membrane protein (a.a length 574).
In this case , i used advanced modeller option to prediction. Because we can use multiple templates for structure prediction. But from the start I got errors when running the python script.
1)May I know what is the maximum number of templates,which can be used for advanced modeling.
Dear colleagues,
I have a python script to read results from ODBs in Abaqus. More specifically, I am extracting the equivalent plastic strain PEEQ from different regions (sets previously defined).
For some files, I am getting the followng error: "rfm_ArrayRepr::rfm_ArrayRepr: Handle is not to an Array object in ODB/CAE file. File may be unusable".
When I rerun the job, the error disapears and the script works fine.
How can I avoid this?
Thanks in advance.
Fernando
Dear Research Community,
What software do you use for data analysis and creating charts? What are your experiences, and is it worth learning the Python programming language? I am considering learning Python, Pandas, and Jupyter Notebook. Would you recommend it?
Climate Models, Python Script, Euro-Cordex
I hope everyone is doing well! I was wondering if someone could please help me in that I want to discover Lineage-Specific proteins in a genus of archaea using Orthofinder. Therefore, could someone please help me either with what file from the Orthofinder output to use or if there are any scripts (python/bash) to collect this data.
In other words, I want to find the proteins that are only found within a specific genus of archaea; therefore, could someone please help me find this information please and thank you.
I have a python script to run Abaqus that worked perfectly fine with Abaqus 2021 version. Now that I have the 2023 version, none of my scripts work. I added a picture to show the error. Do anyone here know how to fix this issue? Most of them are related to the bonding type, i.e cohesive or TIE. The one attached here is appearing when using TIE.
The error says it is something wrong with line 541 which I believe make trouble for line 1863 due to the bonding type which consequently makes the file to crash.
As mentioned this script did work before the Abaqus upgrade.
Any ideas?
I have an Isight workflow which simply includes an optimization tool and an Abaqus component. My abaqus model is a single lap joint which has some pins. Thus, im trying Isight to calculate the maximum force the joint withstands (which i calculate from the odb file with an external python script) for a variable length of the pins.
However, when I run the workflow, i get the errors detailed in the picture.
Has anyone encountered a similar problem before? or has any idea of how to solve this?
Thanks beforehands!
In abaqus software I used to take the flux values on one edge of plate by this way - using "Path" I used to select the node by node and then get the csv file which gives the coordinates as well as nodes.
But I have to run abaqus around 1000 times with very small mesh elements. So I want to write a python script which could give the flux values at those specified nodes.
And I have written a python code and extracted the node ids and node coordinates at which I have to get flux values. But when I trying to get the flux values I am getting error.
Please suggest me some way to do it please...
Thank you in advance....
Does the python script, i.e. cgenff_charmm2gmx_py3_nx2.py (for CHARMM36) also works for a different force field such as CHARMM27 or AMBER99 SB or GROMOS96 54A7 ?
if not, where can I find the script for (each respective force field) generating ligand topology files such as .prm, .pdb and .itp ?
Is there any other way you may suggest to generate ligand topology files such as .prm, .pdb and .itp ?
Thanks in Advance
I need to download and display cloud data specially VFM from CALIOP . could you please help me with this issue? I need the amount of memory I need for that for about only 1-year of data.
I already find the python script for displaying that data but I am a bit confused over how to download data!!
these are 2 links I use for downloading data
but I can not figure out how much storage I do need for the data for the entire Arctic for the years 2018 to 2021. anyone can help me with the download process?
during working with BASH & and anaconda windows to generate SPI, I got an error in executing process_grid.py, could you please help me
Hello everyone,
I am currently conducting a stencil printing simulation using ABAQUS. The simulation needs to be performed in 20 different locations on the stencil, requiring a separate simulation for each of these locations. In my case, all components remain fixed, and only the location of the blade changes across these 20 locations. The simulation consists of seven steps. Throughout these 20 simulations, all conditions remain identical from the first step until the fifth step. However, after the fifth step, I change the blade's location in the sixth step and continue the simulation in the seventh step.
Given that the first five steps are the same in all simulations, I would like to explore if there is a way to execute these steps only once and then reuse or restart the results for the remaining 19 simulations. In other words, I aim to find a method that avoids repeating the first five steps in the subsequent simulations. Although I have attempted to utilize the restart option, it did not prove successful due to the blade's location change in the sixth step.
Hello dear colleagues
hope you're fine.
I wonder if there is a way to average a field output (eg. Von mises stress) in last 10 increments for each element using:
a. Abaqus subroutines
b. Abaqus python scripting
c. any other way
Thanks in advance,
Yunus.
Hi
I am trying to make a set of cells that are associated to one or more faces and save them in a set using python scripting for Abaqus CAE, but I cannot make it work. I have created and example that shows what I am trying to do and where it fails. Can anyone help in identifying what I should be doing instead?
from abaqus import *
from abaqusConstants import *
import section
import regionToolset
import assembly
import load
import interaction
import mesh
import section
import job
import visualization
from abaqus import getWarningReply, YES, NO
from abaqus import getInput
import mesh
import warnings
from warnings import warn
backwardCompatibility.setValues(includeDeprecated=True, reportDeprecated=False)
session.journalOptions.setValues(replayGeometry=COORDINATE, recoverGeometry=COORDINATE)
m = mdb.Model(name='getCellFromFaces')
mySketch = m.ConstrainedSketch(name='sketch01', sheetSize=200.0)
pointA=(0.0, 0.0)
pointB=(10.0,0.0)
pointC=(10.0, 4.0)
pointD=(0.0, 4.0)
mySketch.Line(point1=pointA, point2=pointB)
mySketch.Line(point1=pointB, point2=pointC)
mySketch.Line(point1=pointC, point2=pointD)
mySketch.Line(point1=pointD, point2=pointA)
part01 = m.Part(name='Part01', dimensionality=THREE_D, type=DEFORMABLE_BODY)
part01.BaseSolidExtrude(sketch=mySketch, depth=4.0)
part01.Set(faces=part01.faces.findAt(((3.333333, 4.0, 2.666667), )), name='Set-1')
#split the cell in three
part01.PartitionCellByPlanePointNormal(
cells=part01.cells.findAt(((6.666667, 0.0, 2.666667), )),
normal=part01.edges.findAt((10.0, 3.0, 4.0), ),
point=part01.InterestingPoint(part01.edges.findAt((10.0, 3.0, 4.0), ), MIDDLE))
part01.PartitionCellByPlanePointNormal(
cells=part01.cells.findAt(((0.0, 2.666667, 2.666667), )),
normal=part01.edges.findAt((2.5, 4.0, 4.0), ),
point=part01.InterestingPoint(part01.edges.findAt((7.5, 2.0, 4.0), ), MIDDLE))
# HERE IS THE PROBLEM:
# Getting the the cell id associated with one of the upper faces
cellsID= part01.faces.findAt(((3.333333, 4.0, 2.666667), ))[0].getCells()
print(cellsID)
#trying to make a set containing that cell but do not succeed.
part01.Set(cells=part01.cells[cellsID[0]], name="set of cells")
# returns: TypeError: keyword error on cells
#Also, how do I make a set of the two cells associated with the two upper faces?
# I mean basically doing the same as about but know with two surfaces and two cells
Hello every one.I am modelling a 2D element in abaqus with ductile damage built in material with elastic and plastic properties based on steel.I would like to apply different loading on my initial input file (for example uniaxial in x and y direction and shear in x and y).And after that extract stress and strain components as CSV file for each time increments in my step.I was wondering how can I use python script for that?specially for applying different load cases.Any help would be appreciated!
I have multiple line outlining annual glacier extent (over 20 lines per glacier). I would like to calculate the average linear retreat of the glaciers. Is there a tool to calculate such distance on arcGIS?Or is there a python script I could use?
I am a PhD student and new to ABAQUS CAE. I am using version 10.14-5.
I have a problem when submit the job file is not respond and it cant monitoring or even results kill results.
and the program is working correctly when using the command windows .
pleas can someone help me out?
Thanks in advance.
Hello everyone, dear colleagues!
You can write a script that translates grain boundaries in an alloy depicted in vector format or in raster format into a file containing a grid of finite elements and that can be used in ABAQUS?
I can give you an example of a publication
Here is a quote from your publication
"Then coordinates of individual grain boundaries were extracted through ImageJ software for ferrite as well as martensite. Finally with the help of Python Scripting the Abaqus/CAE Part module was constructed with partitioning along the grain boundaries as shown in figure 7."
2D RVE based micro-mechanical modeling with real microstructures of heat-treated 20MnMoNi55 steel Parichay Basu1, Sanjib Kumar Acharyya1 and Prasanta Sahoo1 Published 19 September 2018 • © 2018 IOP Publishing Ltd Materials Research Express, Volume 5, Number 12 Citation Parichay Basu et al 2018 Mater. Res. Express 5 126506 DOI 10.1088/2053-1591/aadfbb
Article 2-D RVE based micro-mechanical modeling with real microstruc...
I wish you good health and good luck!!!
Dear Colleagues, I started this discussion to collect data on the use of the Azure Kinect camera in research and industry. It is my intention to collect data about libraries, SDKs, scripts and links, which may be useful to make life easier for users and developers using this sensor.
Notes on installing on various operating systems and platforms (Windows, Linux, Jetson, ROS)
- Azure Kinect camera setup (automated scripts for Linux). https://github.com/juancarlosmiranda/azure_kinect_notes
- Azure Kinect ROS Driver. https://github.com/microsoft/Azure_Kinect_ROS_Driver
SDKs for programming
- Microsoft SDK C/C++. https://learn.microsoft.com/en-us/azure/kinect-dk/sensor-sdk-download
- Azure Kinect Body Tracking SDK. https://learn.microsoft.com/en-us/azure/kinect-dk/body-sdk-download
- Github Azure Kinect SDK. https://github.com/microsoft/Azure-Kinect-Sensor-SDK
- KinZ an Azure Kinect toolkit for Python and Matlab.
- pyk4a - a simple and pythonic wrapper in Python 3 for the Azure-Kinect-Sensor-SDK. https://github.com/etiennedub/pyk4a
Tools for recording and data extraction (update 10/08/2023)
- Azure Kinect DK recorder. https://learn.microsoft.com/en-us/azure/kinect-dk/azure-kinect-recorder
- Azure Kinect Viewer. https://learn.microsoft.com/en-us/azure/kinect-dk/azure-kinect-viewer
- AK_SM_RECORDER. A simple GUI recorder based on Python to manage Azure Kinect camera devices in a standalone mode. (https://pypi.org/project/ak-sm-recorder/)
- AK_ACQS is a software solution for data acquisition in fruit orchards using a sensor system boarded on a terrestrial vehicle. It allows the coordination of computers and sensors through the sending of remote commands via a GUI. At the same time, it adds an abstraction layer on library stack of each sensor, facilitating its integration. This software solution is supported by a local area network (LAN), which connects computers and sensors from different manufacturers ( cameras of different technologies, GNSS receiver) for in-field fruit yield testing. (https://github.com/GRAP-UdL-AT/ak_acquisition_system)
- AK_FRAEX is a desktop tool created for post-processing tasks after field acquisition. It enables the extraction of information from videos recorded in MKV format with the Azure Kinect camera. Through a GUI, the user can configure initial parameters to extract frames and automatically create the necessary metadata for a set of images. (https://pypi.org/project/ak-frame-extractor/)
Tools for fruit sizing and yield prediction (update 19/09/2023)
- AK_SW_BENCHMARKER. Python based GUI tool for fruit size estimation and weight prediction. (https://pypi.org/project/ak-sw-benchmarker/)
- AK_VIDEO_ANALYSER. Python based GUI tool for fruit size estimation and weight prediction from videos recorded with the Azure Kinect DK sensor camera in Matroska format. It receives as input a set of videos to analyse and gives as result reports in CSV datasheet format with measures and weight predictions of each detected fruit. (https://pypi.org/project/ak-video-analyser/).
Demo videos to test the software (update 10/08/2023)
- AK_FRAEX - Azure Kinect Frame Extractor demo videos. https://doi.org/10.5281/zenodo.6968103
- AK_FRAEX - Azure Kinect Frame Extractor demo videos (updated with BGRA32 videos for 3d point cloud extration). https://doi.org/10.5281/zenodo.8232445
Papers, articles (update 09/05/2024)
Agricultural
- AKFruitData: A dual software application for Azure Kinect cameras to acquire and extract informative data in yield tests performed in fruit orchard environments. [https://www.sciencedirect.com/science/article/pii/S2352711022001492]
- AKFruitYield: Modular benchmarking and video analysis software for Azure Kinect cameras for fruit size and fruit yield estimation in apple orchards. [https://www.sciencedirect.com/science/article/pii/S2352711023002443]
- Assessing automatic data processing algorithms for RGB-D cameras to predict fruit size and weight in apples. [https://www.sciencedirect.com/science/article/pii/S0168169923006907]
Clinical applications/ health
- Experimental Procedure for the Metrological Characterization of Time-of-Flight Cameras for Human Body 3D Measurements. [ ]
- Hand tracking for clinical applications: validation of the Google MediaPipe Hand (GMH) and the depth-enhanced GMH-D frameworks. [ ]
Keywords:
#python #computer-vision #computer-vision-tools
#data-acquisition #object-detection #detection-and-simulation-algorithms
#camera #images #video #rgb-d #rgb-depth-image
#azure-kinect #azure-kinect-dk #azure-kinect-sdk
#fruit-sizing #apple-fruit-sizing #fruit-yield-trials #precision-fruticulture #yield-prediction #allometry
I require the generation of peptide structures and computation of van der Waal interactions (1-4 interactions) from a given set of backbone Ramachandran angles, for fixed bond lengths and bond angles. I have utilized the fragbuilder module in Python for the generation of peptide structures, but have encountered an issue with the module, as it generates a PDB file on the hard disk, instead of storing it in RAM. As a result, the code must write and read the PDB for every newly generated peptide structure to compute the van der Waal interactions. I am seeking an alternative Python module that can directly compute van der Waal interactions for a given set of backbone Ramachandran angles.
I have written the script and it runs for a smaller RVE. But when I try to increase the RVE size and hence increase the number of spherical inclusions, it fails to run. I have attached the .py file herewith for your reference. It would be really helpful if someone could look into it and point out what I'm doing wrong.
Is there any code / package / script to automatically generate single-line diagrams from PYPOWER/MATPOWER casefile or IEEE CDF formats?
Number of nodes is 71,772,
Number of elements is 69,250,
but the number of 'S' or 'PEEQ' values in odb file is 277,008, it is 4 times of elements.
>>> len(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values)
277,008
>>> prettyPrint(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values[0])
({'baseElementType': 'CAX4',
'elementLabel': 1,
'integrationPoint': 1,
'nodeLabel': None})
>>> prettyPrint(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values[1])
({'baseElementType': 'CAX4',
'elementLabel': 1,
'integrationPoint': 2,
'nodeLabel': None})
>>> prettyPrint(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values[2])
({'baseElementType': 'CAX4',
'elementLabel': 1,
'integrationPoint': 3,
'nodeLabel': None})
>>> prettyPrint(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values[3])
({'baseElementType': 'CAX4',
'elementLabel': 1,
'integrationPoint': 4,
'nodeLabel': None})
>>> prettyPrint(odb.steps['step1'].frames[1].fieldOutputs['PEEQ'].values[4])
({'baseElementType': 'CAX4',
'elementLabel': 2,
'integrationPoint': 1,
'nodeLabel': None})
nodeLabel show None, how do I know which one is the node?
Hi There,
I am Ibrahim Kholil. I need your help .
I am working with abaqus python scripts.
Recently I face a problem . I need to export volume data from some portion of the material /element. So I am selecting the required portion by display option and create display group then save it.
Now How can I export volume data to excel for only display group.
Thank you
Ibrahim Kholil
I have a list of the path node labels, more than 10 thousand nodes, now I want to using this node labels to get the Field output values, how can I do?
I know I can get the values though python script below, but [45]'s nodeLabel is not 45.
prettyPrint(odb.steps['xxx'].frames[1].fieldOutputs['S'].values[45].mises)
prettyPrint(odb.steps['xxx'].frames[1].fieldOutputs['S'].values[45].nodeLabel)
# nodeLabel is not 45, it can be anything else.
How can I do?
It seems Abaqus can't save the excel files automatic. I want to export XY data using Excel Utilities tool, but it just open, can't save automatic. So I using win32com module, but it is wrong.
------------------
from win32com.client import GetActiveObject
def just_save():
try:
app = GetActiveObject('excel.Application')
print('Running Excel instance found.')
except:
print('No running Excel instance.')
xlBook = app.Workbooks(1)
xlBook.SaveAs(r'G:/FEA/xxx/xxx/xxx.xlsm')
xlBook.Close()
I need a collaborator with experience in code development and, if possible, numerical analysis too.
I am currently developing an open source code in python that can be used to solve different kinds of Integral Equations.
In the last one and half years I have done some work in numerical Algorithms for integral equations with some papers already published. It has culminated to several python codes which I have used to produce the results.
The codes are all private but the results are published so I am inclined to make these codes publicly available so that others can use them at no cost and minimum effort.
I, therefore, need a fellow Researcher who has good skills in software engineering and numerical analysis to join me in this line.
A minimum requirement is the knowledge of git and python.
You can email me at nwaigwe.chinedu@ust.edu.ng
Hi everyone. Is it possible to use python scripts for machine learning in OMNET++ or NS3?
I want to run a simulation for VANET in which I will use machine learning (based on python). Now I am confused about how to use python scripts in omnet++.
I'm trying to plot solar irradiance or GHI from WRF output. Is there any python script to visualize this ?
Hi everyone,
I am learning deep learning for satellite image classification using this tutorial "https://github.com/zia207/Deep-Neural-Network-with-keras-Python-Satellite-Image-Classification/blob/master/DNN_Keras_python.ipynb"
when I run the model.fit, it show error "InvalidArgumentError: Graph execution error:"
I googled this error but eventually couldn't found any solution.
The keras version I using now is 2.11. Pyton version is 3.10.9
How to write the python script for Strength of Double Skin steel concrete composite wall using Artificial Neural Network. I have attached the figure for your reference.
How to write the python script for Strength of Concrete using Artificial Neural Network in matlab?
For my projects I need to iterate over a text file containing some subjects and change the directory to access some files using continiuos loop in python .
The text file (test.txt) has some subjects listed line by line:
sub-3101
sub-3166
sub-3168
and each of them has its own directory for exmaple:
path = '/mnt/wwn-0x5000039a52203bb1-part1/run/backup_PD_swedd/PD_total/derivatives/nipype-1.8.0/sub-3101/ses-1/diffusion_pipeline/connectome_stage/compute_matrice'
Here is my code:
import os
import networkx as nx
from scipy.io import savemat
import numpy as np
import scipy.io
with open('test.txt') as f:
for line in f:
path = '/mnt/wwn-0x5000039a52203bb1-part1/run/backup_PD_swedd/PD_total/derivatives/nipype-1.8.0/line/ses-1/diffusion_pipeline/connectome_stage/compute_matrice'
os.chdir(path)
conn_mats = {}
connectivity_weights = ['FA_mean', 'ADC_mean', 'number_of_fibers', "fiber_density", "fiber_proportion","fiber_length"]
G = nx.read_gpickle('connectome_scale1.gpickle')
for weight in connectivity_weights:
conn_mats[weight] = nx.to_numpy_array(G, weight=weight)
fiber_length_mean = nx.to_numpy_array(G, weight='fiber_length_mean')
fiber_length_mean_mat = {'fiber_length_mean':fiber_length_mean}
savemat("fiber_length_mean_sub_3102.mat", fiber_length_mean_mat)
As you can see, this code must read the subjects from text file , change the directory, read the file named "connectome_scale1.gpickle" and finally create a mat file.
But when I run it, There is an error as below:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/wwn-0x5000039a52203bb1-part1/run/backup_PD_swedd/PD_total/derivatives/nipype-1.8.0/line/ses-1/diffusion_pipeline/connectome_stage/compute_matrice'
What is wrong with my approach? How to run the code for all subjects?
Any help would be much appreciated.
The project I am working on requires me to modify the Modle file (ModelName.inp ) after the Nth iteration while the optimization is running. It is possible to use checkpoint hooks during the optimization process in Tosca Structure to run python scripts during the optimization. I have used them to modify other files during the optimization process before.
So far I was able to modify the ModelName.inp file inside the automatically created optimization job folder. But it seems like the optimization process does not realize that the file has been modified. I have tried checkpoint hooks at different times of the iteration. But no success so far. I was thinking that I might be modifying the wrong file. Or is it possible that the ModelName.inp file only gets read at the beginning of the optimization, and therefore can't get modified during the optimization process?
Hi All,
I'm developing python script to read simulation results from Vissim. I'm following this paper which has sample code how to read the data from DataCollectionMeasurements and VehicleNetworkPerformanceMeasurement. But the simulation is not generating any output, always returns None.
Technical Report A practical manual for Vissim-COM programming in Matlab and ...
I need to observe the following details every 60 seconds for each node,
1. Arriving vehicles and time
2. Speed
3. Signal controllers cycle time, phases
4. Queue service time
5. Saturation headway
Please advise.
Thanks
Viji
How can I calculate center of mass for a molecule(AU)?
Hello every body
I want to calculate the center of mass for a molecule I want to know which atom the center of mass hold on.
please give me a full help.
thanks
I will be thankful for any kind of help to extract from binary files using R programming, Python or MATLAB.
Hello everyone,
I need code/program that I can integrate with python code for a forcefield calculation. My system is a large number of small organic molecules, and I only need the energy. Not interested in anything else. I will call the code/program from my existing python code. I want a quick and easy forcefield (code/program) without any complicated setup and customization.
Dear All,
I have executed >1000 drug molecules in a Vina docking study. Now I have >1000 log files that contain the top ten binding scores for every compound in a log file for each. I want to extract only the lowest binding energy from each log file and get it as an output.txt file. Can anybody show me the python script for this kind of workflow?
A sample log file is attached here. It is a default Vina output file. I have over 2000 of these files in a single folder. Please see the attachment.
Thank you,
Amal.
I am creating an Abaqus model with python scripts. But the main problem is when I am creating material. Here multiple data are shown in the table in python. I want to arrange data in excel or txt file then I will call data by python scripts. Can you help me? Advanced Thanks